Documentation
¶
Index ¶
- Variables
- type Service
- func (s *Service) AuthenticateSession(ctx context.Context, sessionToken string) (User, bool, error)
- func (s *Service) ListUsersForViewer(ctx context.Context, viewer User) ([]User, error)
- func (s *Service) Login(ctx context.Context, email string, password string) (User, string, error)
- func (s *Service) Logout(ctx context.Context, sessionToken string) error
- func (s *Service) Register(ctx context.Context, email string, password string) (User, error)
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmailRequired = errors.New("email is required") ErrInvalidEmail = errors.New("email must be valid") ErrPasswordRequired = errors.New("password is required") ErrPasswordTooShort = errors.New("password must be at least 8 characters") ErrEmailAlreadyExists = errors.New("email is already registered") ErrInvalidCredentials = errors.New("invalid email or password") ErrSessionExpired = errors.New("session has expired") )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) AuthenticateSession ¶
func (*Service) ListUsersForViewer ¶
Click to show internal directories.
Click to hide internal directories.