Documentation
¶
Index ¶
- func HandleEchoError(srcErr error, c echo.Context)
- func HasAnyAuthoritiesEcho(authorities ...string) echo.MiddlewareFunc
- func HasAuthoritiesEcho(authorities ...string) echo.MiddlewareFunc
- func IsResourceOwnerEcho(resourceOwnerParamKey string) echo.MiddlewareFunc
- func IsResourceOwnerOrHasAnyAuthoritiesEcho(resourceOwnerParamKey string, authorities ...string) echo.MiddlewareFunc
- func NewDefaultEchoMiddlewareGroup(params DefaultEchoMiddlewareParams, paramsTrace TraceIDEchoParams) []echo.MiddlewareFunc
- func NewEcho(params NewEchoParams) *echo.Echo
- func NewEchoJWTAuthenticator(config echojwt.Config) echo.MiddlewareFunc
- func NewEchoJWTAuthenticatorConfig(params NewEchoJWTAuthenticatorConfigParams) echojwt.Config
- func NewLogRequestEcho(logger logging.Logger) echo.MiddlewareFunc
- func NewRecoverRequestEcho(logger logging.Logger) echo.MiddlewareFunc
- func NewTraceIDEcho(params TraceIDEchoParams) echo.MiddlewareFunc
- func RegisterControllersEcho(params RegisterControllersEchoParams)
- func RegisterMiddlewaresEcho(params RegisterMiddlewaresEchoParams)
- type ActuatorControllerHTTP
- type ConfigActuatorHTTP
- type ConfigHTTP
- type ControllerHTTP
- type Data
- type DefaultEchoMiddlewareParams
- type Error
- type ErrorDetail
- type Errors
- type NewActuatorControllerHTTPParams
- type NewEchoJWTAuthenticatorConfigParams
- type NewEchoParams
- type RegisterControllersEchoParams
- type RegisterMiddlewaresEchoParams
- type TraceIDEchoParams
- type VersionedControllerHTTP
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleEchoError ¶
func HandleEchoError(srcErr error, c echo.Context)
func HasAnyAuthoritiesEcho ¶
func HasAnyAuthoritiesEcho(authorities ...string) echo.MiddlewareFunc
func HasAuthoritiesEcho ¶
func HasAuthoritiesEcho(authorities ...string) echo.MiddlewareFunc
func IsResourceOwnerEcho ¶
func IsResourceOwnerEcho(resourceOwnerParamKey string) echo.MiddlewareFunc
func NewDefaultEchoMiddlewareGroup ¶
func NewDefaultEchoMiddlewareGroup(params DefaultEchoMiddlewareParams, paramsTrace TraceIDEchoParams) []echo.MiddlewareFunc
NewDefaultEchoMiddlewareGroup allocates an Echo middleware group. An array is returned to guarantee ordering within this group. Any other middlewares outside this group will be injected into application in a non-deterministic way (regarding ordering).
func NewEcho ¶
func NewEcho(params NewEchoParams) *echo.Echo
func NewEchoJWTAuthenticator ¶
func NewEchoJWTAuthenticatorConfig ¶
func NewEchoJWTAuthenticatorConfig(params NewEchoJWTAuthenticatorConfigParams) echojwt.Config
func NewLogRequestEcho ¶
func NewRecoverRequestEcho ¶
func NewTraceIDEcho ¶
func NewTraceIDEcho(params TraceIDEchoParams) echo.MiddlewareFunc
NewTraceIDEcho appends a trace identifier to each request using tracing.NewTracedContext.
func RegisterControllersEcho ¶
func RegisterControllersEcho(params RegisterControllersEchoParams)
func RegisterMiddlewaresEcho ¶
func RegisterMiddlewaresEcho(params RegisterMiddlewaresEchoParams)
Types ¶
type ActuatorControllerHTTP ¶
type ActuatorControllerHTTP struct { Manager *actuator.Manager Logger logging.Logger Config ConfigActuatorHTTP }
func NewActuatorControllerHTTP ¶
func NewActuatorControllerHTTP(params NewActuatorControllerHTTPParams) ActuatorControllerHTTP
func (ActuatorControllerHTTP) SetRoutes ¶
func (a ActuatorControllerHTTP) SetRoutes(e *echo.Echo)
type ConfigActuatorHTTP ¶
type ConfigActuatorHTTP struct {
ActuatorRoleAllowlist []string `env:"HTTP_SERVER_ACTUATOR_ROLE_ALLOWLIST"`
}
func NewConfigActuatorHTTP ¶
func NewConfigActuatorHTTP() (ConfigActuatorHTTP, error)
type ConfigHTTP ¶
type ConfigHTTP struct { Address string `env:"HTTP_SERVER_ADDRESS" envDefault:":8080"` AuthenticationWhitelist []string `env:"HTTP_SERVER_AUTHN_WHITELIST" envDefault:"/healthz,/readiness"` RequestIDTargetHeader string `env:"HTTP_REQ_ID_TARGET_HEADER" envDefault:"X-Request-ID"` AuthenticationWhitelistSet sets.Set[string] }
func NewConfigHTTP ¶
func NewConfigHTTP() (ConfigHTTP, error)
type ControllerHTTP ¶
type ControllerHTTP interface {
SetRoutes(e *echo.Echo)
}
type DefaultEchoMiddlewareParams ¶
type DefaultEchoMiddlewareParams struct { fx.In Config ConfigHTTP Logger logging.Logger }
type Error ¶
type Error struct { Code int `json:"code"` Message string `json:"message"` Status string `json:"status"` Details []ErrorDetail `json:"details"` Internal error `json:"-"` }
type ErrorDetail ¶
type NewEchoJWTAuthenticatorConfigParams ¶
type NewEchoJWTAuthenticatorConfigParams struct { fx.In Config security.ConfigJWT ServerConfig ConfigHTTP Logger logging.Logger PrincipalFactory security.PrincipalFactory[*jwt.Token] KeyFunc keyfunc.Keyfunc `optional:"true"` }
type NewEchoParams ¶
type RegisterControllersEchoParams ¶
type RegisterControllersEchoParams struct { fx.In Echo *echo.Echo Config application.Config Logger logging.Logger RootControllers []ControllerHTTP `group:"root_controllers_http"` VersionedControllers []VersionedControllerHTTP `group:"versioned_controllers_http"` }
type TraceIDEchoParams ¶
type TraceIDEchoParams struct { fx.In TraceFactory tracing.TraceFactory `optional:"true"` }
type VersionedControllerHTTP ¶
type VersionedControllerHTTP interface { ControllerHTTP SetVersionedRoutes(g *echo.Group) }
Click to show internal directories.
Click to hide internal directories.