Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { // Get returns the session with the specified user ID. Get(ctx context.Context, ID string) (*Session, error) // Create saves a new entity in the storage. Set(ctx context.Context, entity *Session) error // Delete removes the entity with given ID from the storage. Delete(ctx context.Context, ID string) error }
Repository encapsulates the logic to access session from the data source.
type Session ¶
type Session struct { ID string // обязательное AccountSettings *account.AccountSettings // обязательное JwtClaims *jwt.Claims // только после первой аутентификации (но факт аутентификации проверяем по переменной в контексте isAuth) User *user.User // только после первой аутентификации (но факт аутентификации проверяем по переменной в контексте isAuth) }
Click to show internal directories.
Click to hide internal directories.