Documentation ¶
Index ¶
- func RegisterHandlers(e *echo.Echo, s *Server)
- type Info
- type KeyStore
- type Role
- type Server
- func (s *Server) AdminDeleteKey(ctx echo.Context, apiKeyID string) error
- func (s *Server) AdminGetKey(ctx echo.Context, apiKeyID string) error
- func (s *Server) AdminGetKeys(ctx echo.Context) error
- func (s *Server) AdminSetKey(ctx echo.Context) error
- func (s *Server) GetLogLevel(ctx echo.Context) error
- func (s *Server) GetTimeZone(ctx echo.Context) error
- func (s *Server) GetToken(ctx echo.Context, params gen.GetTokenParams) error
- func (s *Server) SetLogLevel(ctx echo.Context) error
- func (s *Server) SetTimeZone(ctx echo.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHandlers ¶
func RegisterHandlers(e *echo.Echo, s *Server)
RegisterHandlers registers all the API handlers.
Types ¶
type KeyStore ¶
type KeyStore struct {
// contains filtered or unexported fields
}
KeyStore persists the API keys.
func NewKeyStore ¶
NewKeyStore creates a new API key store.
type Role ¶
type Role int
Role is the role of a user.
func (Role) MarshalText ¶
func (*Role) UnmarshalText ¶
type Server ¶
type Server struct { LogLevel *zap.AtomicLevel TimeZone *timeserver.TimeZone KeyStore *KeyStore Logger *zap.Logger JWTKey []byte }
Server implements the configuration API.
func (*Server) AdminDeleteKey ¶
AdminDeleteKey deletes an API key.
func (*Server) AdminGetKey ¶
AdminGetKey serves a single API key info.
func (*Server) AdminGetKeys ¶
AdminGetKeys serves a list of a API key infos.
func (*Server) AdminSetKey ¶
AdminSetKey sets a API key.
func (*Server) GetLogLevel ¶
GetLogLevel wraps the zap log level handler
func (*Server) GetTimeZone ¶
GetTimeZone serves the currently configured time zone.
func (*Server) GetToken ¶
func (s *Server) GetToken(ctx echo.Context, params gen.GetTokenParams) error
GetToken issues a token.
func (*Server) SetLogLevel ¶
SetLogLevel wraps the zap log level handler
func (*Server) SetTimeZone ¶
SetTimeZone sets the time zone.
Click to show internal directories.
Click to hide internal directories.