Documentation ¶
Index ¶
- Variables
- type ClientID
- type Middleware
- type Option
- func WithEnforcmentPolicy(p enforcement.Policy) Option
- func WithExtractor(e extractor.Extractor) Option
- func WithHeaderExtractor(headers ...string) Option
- func WithRequired() Option
- func WithS3Store(session aws_client.ConfigProvider, arn string) Option
- func WithStage(stage string) Option
- func WithStore(s Store) Option
- func WithStoreCache() Option
- type Store
Constants ¶
This section is empty.
Variables ¶
View Source
var FromContext = models.FromContext
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware struct { Tracer middleware.Tracer // contains filtered or unexported fields }
func New ¶
func New(opts ...Option) *Middleware
New returns a new Client ID middleware which embedds an valid client ID if provided in the request. Without providing any Options the client id is extracted from the request header "X-Client-ID", is optional and, using an empty in-memory store.
func (*Middleware) Middleware ¶
func (m *Middleware) Middleware() func(http.Handler) http.Handler
type Option ¶
type Option func(*Middleware)
func WithEnforcmentPolicy ¶
func WithEnforcmentPolicy(p enforcement.Policy) Option
func WithExtractor ¶
func WithHeaderExtractor ¶
func WithRequired ¶
func WithRequired() Option
func WithS3Store ¶
func WithS3Store(session aws_client.ConfigProvider, arn string) Option
func WithStoreCache ¶
func WithStoreCache() Option
Click to show internal directories.
Click to hide internal directories.