Documentation ¶
Index ¶
- Variables
- type Cookie
- type DomainProvider
- type DomainProviderOption
- type DomainProviderOptions
- type Option
- func WithDomainProvider(v DomainProvider) Option
- func WithExpires(v time.Duration) Option
- func WithHTTPOnly(v bool) Option
- func WithMaxAge(v int) Option
- func WithPath(v string) Option
- func WithSameSite(v http.SameSite) Option
- func WithSecure(v bool) Option
- func WithTimeProvider(v TimeProvider) Option
- type TimeProvider
- type TimeProviderOption
- type TimeProviderOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDomainNotAllowed = errors.New("domain not allowed")
Functions ¶
This section is empty.
Types ¶
type Cookie ¶
type Cookie struct { Name string // Path the path of the created cookie Path string // Secure the secure flag of the created cookie Secure bool // MaxAge the max age flag of the created cookie MaxAge int // Expires the expires flag of the created cookie Expires time.Duration // Secure the secure flag of the created cookie SameSite http.SameSite // HTTPOnly the http only of the created cookie HTTPOnly bool // TimeProvider function to retrieve the now time for the expires flag of the created cookie TimeProvider TimeProvider // DomainProvider function to retrieve the domain flag of the created cookie DomainProvider DomainProvider }
type DomainProvider ¶
func NewDomainProvider ¶
func NewDomainProvider(opts ...DomainProviderOption) DomainProvider
type DomainProviderOption ¶
type DomainProviderOption func(options *DomainProviderOptions)
func DomainProviderWithDomains ¶
func DomainProviderWithDomains(v ...string) DomainProviderOption
func DomainProviderWithMappings ¶
func DomainProviderWithMappings(v map[string]string) DomainProviderOption
type DomainProviderOptions ¶
func GetDefaultDomainProviderOptions ¶
func GetDefaultDomainProviderOptions() DomainProviderOptions
type Option ¶
type Option func(options *Cookie)
func WithDomainProvider ¶
func WithDomainProvider(v DomainProvider) Option
WithDomainProvider middleware option
func WithTimeProvider ¶
func WithTimeProvider(v TimeProvider) Option
WithTimeProvider middleware option
type TimeProvider ¶
func NewTimeProvider ¶
func NewTimeProvider(opts ...TimeProviderOption) TimeProvider
type TimeProviderOption ¶
type TimeProviderOption func(options *TimeProviderOptions)
func TimeProviderWithOffset ¶
func TimeProviderWithOffset(v time.Duration) TimeProviderOption
type TimeProviderOptions ¶
func GetDefaultTimeProviderOptions ¶
func GetDefaultTimeProviderOptions() TimeProviderOptions
Click to show internal directories.
Click to hide internal directories.