interfase_lib

package
v0.0.0-...-6f0a835 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InvalidArgument  = 3
	NotFound         = 5
	AlreadyExists    = 6
	PermissionDenied = 7
	Internal         = 13
	OK               = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth interface {
	Login(
		ctx context.Context,
		email string,
		password string,
		ipAddress string,
	) (LoginResponse SessionResponse, err error)
	RegisterNewUser(
		ctx context.Context,
		email string,
		password string,
		name string,
	) (RegisterResponse RegisterResponse, err error)
	Logout(
		ctx context.Context,
		sessionUuid string,
		userId uint64,
	) int
	SessionList(
		ctx context.Context,
		userId uint64,
	) ([]models.Session, int)
}

type RegisterResponse

type RegisterResponse struct {
	UserId int64 `json:"user_id"`
	Code   int   `json:"code"`
}

type SessionResponse

type SessionResponse struct {
	SessionUUID string `json:"session_uuid"`
	Success     bool   `json:"success"`
	Code        int    `json:"code"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL