Documentation ¶
Index ¶
- func ListenAndServeHTTP(ctx context.Context, handler http.Handler, logger *slog.Logger, listen string, ...)
- func MakeVGSocketRealmAPIHandler(api *operations.VGSBrigadeRealmAPI, pcors bool) http.Handler
- func NewAPI() *operations.VGSBrigadeRealmAPI
- func NewLogger(logger *slog.Logger, r *http.Request, principal *models.Principal) *slog.Logger
- func SetBrigadeHandlers(ctx context.Context, opts *APIOpts)
- func SetSecurityHandlers(ctx context.Context, opts *APIOpts, jwtMethod jwt.SigningMethod, ...)
- type APIOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListenAndServeHTTP ¶
func ListenAndServeHTTP(ctx context.Context, handler http.Handler, logger *slog.Logger, listen string, pollOpts *queue.PollConfig)
ListenAndServeHTTP starts a HTTP server. Actually, can be extended to support HTTPS.
func MakeVGSocketRealmAPIHandler ¶
func MakeVGSocketRealmAPIHandler(api *operations.VGSBrigadeRealmAPI, pcors bool) http.Handler
MakeVGSocketRealmAPIHandler - finally create a HTTP handler for the API.
func NewLogger ¶
NewLogger - logger for API and Core. It is used by endpoint handlers for metadata access.
func SetBrigadeHandlers ¶
func SetSecurityHandlers ¶
func SetSecurityHandlers(ctx context.Context, opts *APIOpts, jwtMethod jwt.SigningMethod, jwtVerifier interface{})
SetSecurityHandlers - set handlers for security.
Types ¶
type APIOpts ¶
type APIOpts struct { Logger *slog.Logger API *operations.VGSBrigadeRealmAPI Db *pgxpool.Pool SqFmt sq.StatementBuilderType Testing bool }
Click to show internal directories.
Click to hide internal directories.