Versions in this module Expand all Collapse all v0 v0.1.1 Aug 24, 2023 Changes in this version type Server + DisableAuth bool v0.1.0 Aug 23, 2023 Changes in this version + const APIKeyHeaderName + const SessionCookieName + type AuthService interface + IntrospectToken func(ctx context.Context, token string) (auth.TokenInfo, error) + Login func(ctx context.Context, username, password string) (auth.Token, error) + Logout func(ctx context.Context, session string) error + ValidateAPIKey func(ctx context.Context, key string) error + type ClientService interface + CreateClient func(ctx context.Context, client store.NewClient) (store.Client, error) + DeleteClient func(ctx context.Context, id uuid.UUID) error + DeleteClientAPIKey func(ctx context.Context, clientID, keyID uuid.UUID) error + GenerateAPIKey func(ctx context.Context, newKey store.NewAPIKey) (string, error) + GetClient func(ctx context.Context, id uuid.UUID) (store.Client, error) + ListClientAPIKeys func(ctx context.Context, clientID uuid.UUID) ([]store.APIKey, error) + ListClients func(ctx context.Context) ([]store.Client, error) + UpdateClient func(ctx context.Context, id uuid.UUID, patch store.ClientPatch) (store.Client, error) + type Server struct + AuthService AuthService + ClientService ClientService + Logger level.Logger + Router chi.Router + UserService UserService + func NewServer() *Server + func (s *Server) ListenAndServe(addr string) error + func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) + type UserService interface + CreateUser func(ctx context.Context, user store.NewUser) (store.User, error) + DeleteUser func(ctx context.Context, id uuid.UUID) error + GetUser func(ctx context.Context, id uuid.UUID) (store.User, error) + ListUsers func(ctx context.Context) ([]store.User, error) + UpdateUser func(ctx context.Context, id uuid.UUID, patch store.UserPatch) (store.User, error)