Documentation ¶
Index ¶
- Variables
- type Account
- type User
- type UserRepo
- type UserService
- func (a *UserService) CheckSessionID(ctx context.Context, id *session.ID) (*session.Session, error)
- func (a *UserService) CreateAccount(ctx context.Context, user *User) (*Account, error)
- func (a *UserService) DeleteSessionID(ctx context.Context, id *session.ID) error
- func (a *UserService) GenerateSessionID(ctx context.Context, login, password string) (*session.ID, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoUser = errors.New("no user exists") ErrEmailAlreadyExists = errors.New("email already exists") )
Functions ¶
This section is empty.
Types ¶
type UserRepo ¶
type UserRepo interface { CreateUser(ctx context.Context, user models.User, tx *sqlx.Tx) (int, error) GetUser(ctx context.Context, email, password string) (models.User, error) ExistsEmail(ctx context.Context, email string) (bool, error) InTx(ctx context.Context, opts *sql.TxOptions, fn func(tx *sqlx.Tx) error) error }
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService( repo *repository.UserDB, sm *session.Manager, cfg config.BalanceClient, log *zap.Logger, ) *UserService
func (*UserService) CheckSessionID ¶
func (*UserService) CreateAccount ¶
func (*UserService) DeleteSessionID ¶
func (*UserService) GenerateSessionID ¶
Click to show internal directories.
Click to hide internal directories.