Documentation ¶
Index ¶
- func Body[T any](c echo.Context) *T
- func BodyP[T any](c echo.Context) *T
- type CodeResponse
- type Configuration
- func WithDefaultMiddleware() Configuration
- func WithFrontend(data *embed.FS, dir string) Configuration
- func WithMetrics() Configuration
- func WithMiddleware(middleware ...fiber.Handler) Configuration
- func WithOIDC(opts OIDCOptions) Configuration
- func WithOpts(opts ...ServerOptions) Configuration
- func WithQueue(url, pw string, opts queue.Queues, fn func(q *queue.Queue)) Configuration
- func WithTracing(url ...string) Configuration
- type OIDCOptions
- type Route
- func Delete[O any](path string, handler ...fiber.Handler) *Route
- func Get[O any](path string, handler ...fiber.Handler) *Route
- func Group(path string, rts ...*Route) (string, []*Route)
- func Patch[O any, B any](path string, handler ...fiber.Handler) *Route
- func Post[O any, B any](path string, handler ...fiber.Handler) *Route
- func Put[O any, B any](path string, handler ...fiber.Handler) *Route
- type Server
- func (s *Server) Group(path string, routes ...*Route) *Server
- func (s *Server) Route(routes ...*Route) *Server
- func (s *Server) Routes(path string, routes []*Route) *Server
- func (s *Server) Run()
- func (s *Server) ValidateJWTRequest(ctx context.Context, req *http.Request) (map[string]any, error)
- func (s *Server) ValidateJWTToken(ctx context.Context, token string) (map[string]any, error)
- type ServerOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CodeResponse ¶
type CodeResponse struct { AccessToken string `json:"access_token" url:"accessToken"` ExpiresIn int `json:"expires_in" url:"expiresIn"` RefreshExpiresIn int `json:"refresh_expires_in" url:"refresh_expires_in"` RefreshToken string `json:"refresh_token" url:"refresh_token"` TokenType string `json:"token_type" url:"token_type"` NotBeforePolicy int `json:"not-before-policy" url:"notBeforePolicy"` SessionState string `json:"session_state" url:"sessionState"` Scope string `json:"scope" url:"scope"` }
CodeResponse == oidc successful login data
type Configuration ¶
Configuration ...
func WithMiddleware ¶
func WithMiddleware(middleware ...fiber.Handler) Configuration
WithMiddleware add middleware to Echo
func WithOpts ¶
func WithOpts(opts ...ServerOptions) Configuration
WithOpts create Server with options
type OIDCOptions ¶
type OIDCOptions struct { Issuer string `json:"issuer,omitempty" yaml:"issuer,omitempty"` AuthURI string `json:"authUri,omitempty" yaml:"authUri,omitempty"` KeysURI string `json:"keysURI,omitempty" yaml:"keysURI,omitempty"` TokenURI string `json:"tokenURI,omitempty" yaml:"tokenURI,omitempty"` ClientID string `json:"clientId,omitempty" yaml:"clientId,omitempty"` Secret string `json:"secret,omitempty" yaml:"secret,omitempty"` RedirectURI string `json:"redirectURI,omitempty" yaml:"redirectURI,omitempty"` ClientRedirectURI string `json:"clientRedirectURI,omitempty" yaml:"clientRedirectURI,omitempty"` }
OIDCOptions ...
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route ...
func (*Route) WithAPIAuth ¶
WithAPIAuth mark spec that it needs to be authenticated with api key
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server ...
func (*Server) ValidateJWTRequest ¶
ValidateJWTRequest validates jwt against jwks etc
type ServerOptions ¶
type ServerOptions struct { ID string `json:"id,omitempty" yaml:"id,omitempty"` Description string `json:"description,omitempty" yaml:"description,omitempty"` Version string `json:"version,omitempty" yaml:"version,omitempty"` Host string `json:"host,omitempty" yaml:"host,omitempty"` Port int `json:"port,omitempty" yaml:"port,omitempty"` HideBanner bool `json:"hideBanner,omitempty" yaml:"hideBanner,omitempty"` RequestLogger bool `json:"requestLogger,omitempty" yaml:"requestLogger,omitempty"` }
ServerOptions ...
Click to show internal directories.
Click to hide internal directories.