Documentation ¶
Index ¶
- type SessionsAPI
- func (sa *SessionsAPI) API(ctx context.Context, r *chi.Mux)
- func (sa *SessionsAPI) GetAllSessions(ctx context.Context, w http.ResponseWriter, r *http.Request, usrTkn string) (err error)
- func (sa *SessionsAPI) GetSession(ctx context.Context, w http.ResponseWriter, r *http.Request)
- func (sa *SessionsAPI) KillSession(ctx context.Context, w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SessionsAPI ¶
type SessionsAPI struct {
// contains filtered or unexported fields
}
func NewSessionsAPI ¶
func NewSessionsAPI( ur interfaces.UsersRepo, sr interfaces.SessionsRepo, logger *slog.Logger) SessionsAPI
func (*SessionsAPI) API ¶
func (sa *SessionsAPI) API(ctx context.Context, r *chi.Mux)
func (*SessionsAPI) GetAllSessions ¶
func (sa *SessionsAPI) GetAllSessions(ctx context.Context, w http.ResponseWriter, r *http.Request, usrTkn string) (err error)
TODO: rewrite using domain layer
func (*SessionsAPI) GetSession ¶
func (sa *SessionsAPI) GetSession( ctx context.Context, w http.ResponseWriter, r *http.Request)
Handling request to /sessions/{tknOrID}
func (*SessionsAPI) KillSession ¶
func (sa *SessionsAPI) KillSession(ctx context.Context, w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.