Documentation
¶
Index ¶
- type Domain
- type Repository
- func (r *Repository) Create(ctx context.Context, session *Session) error
- func (r *Repository) Delete(ctx context.Context, id string) error
- func (r *Repository) DeleteByUserId(ctx context.Context, userId string) error
- func (r *Repository) Get(ctx context.Context, id string) (*Session, error)
- func (r *Repository) GetByUserId(ctx context.Context, userID string) (*Session, error)
- func (r *Repository) Migrations() fs.FS
- type Service
- func (s *Service) Create(ctx context.Context, session *Session) error
- func (s *Service) CreateSessionForUser(ctx context.Context, userId string) (string, error)
- func (s *Service) DeleteSession(ctx context.Context, id string) error
- func (s *Service) DeleteSessionsByUserId(ctx context.Context, userId string) error
- func (s *Service) Get(ctx context.Context, id string) (*Session, error)
- func (s *Service) GetByUserId(ctx context.Context, id string) (*Session, error)
- func (s *Service) GetUserIdFromSessionId(ctx context.Context, id string) (string, error)
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Domain ¶
type Domain struct {
Repository *Repository
Service *Service
}
func (*Domain) GetRepository ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db db) *Repository
func (*Repository) Create ¶
func (r *Repository) Create(ctx context.Context, session *Session) error
func (*Repository) DeleteByUserId ¶
func (r *Repository) DeleteByUserId(ctx context.Context, userId string) error
func (*Repository) GetByUserId ¶
func (*Repository) Migrations ¶
func (r *Repository) Migrations() fs.FS
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(repo *Repository) *Service
func (*Service) CreateSessionForUser ¶
func (*Service) DeleteSession ¶
func (*Service) DeleteSessionsByUserId ¶
func (*Service) GetByUserId ¶
Click to show internal directories.
Click to hide internal directories.