Documentation ¶
Index ¶
- func FeatureFlag(settingsService dataservices.SettingsService, feature portainer.Feature) mux.MiddlewareFunc
- func FetchEndpoint(request *http.Request) (*portainer.Endpoint, error)
- func FetchItem[T any](request *http.Request, contextKey string) (*T, error)
- func RestrictDemoEnv(isDemo func() bool) mux.MiddlewareFunc
- func WithEndpoint(endpointService dataservices.EndpointService, endpointIDParam string) mux.MiddlewareFunc
- func WithItem[TId ~int, TObject any](getter ItemGetter[TId, TObject], idParam string, contextKey ItemContextKey) mux.MiddlewareFunc
- type ItemContextKey
- type ItemGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FeatureFlag ¶
func FeatureFlag(settingsService dataservices.SettingsService, feature portainer.Feature) mux.MiddlewareFunc
func RestrictDemoEnv ¶
func RestrictDemoEnv(isDemo func() bool) mux.MiddlewareFunc
restrict functionality on demo environments
func WithEndpoint ¶
func WithEndpoint(endpointService dataservices.EndpointService, endpointIDParam string) mux.MiddlewareFunc
func WithItem ¶
func WithItem[TId ~int, TObject any](getter ItemGetter[TId, TObject], idParam string, contextKey ItemContextKey) mux.MiddlewareFunc
Types ¶
type ItemContextKey ¶
type ItemContextKey string
type ItemGetter ¶
Click to show internal directories.
Click to hide internal directories.