Documentation
¶
Index ¶
- func NewHandler(options ...Option) (http.Handler, error)
- type Option
- func WithCookieDomain(d string) Option
- func WithCookieName(n string) Option
- func WithCookiePath(p string) Option
- func WithCookieSecure(a bool) Option
- func WithCookieTTL(d time.Duration) Option
- func WithCustomizedWording(copy, yes, no string) Option
- func WithLogger(l *log.Logger) Option
- func WithStylesheet(loc string) Option
- func WithTemplatesDirectory(dir string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*handler) error
Option is a function used to configured the server.
func WithCookieDomain ¶
WithCookieDomain sets the Domain attribute used when setting cookie headers.
func WithCookieName ¶
WithCookieName sets the name of the cookie that is used for storing user's consent decisions
func WithCookiePath ¶
WithCookiePath sets the Path attribute used when setting cookie headers.
func WithCookieSecure ¶
WithCookieSecure defines whether used cookies are using the Secure attribute
func WithCookieTTL ¶
WithCookieTTL defines the expected lifetime of a cookie.
func WithCustomizedWording ¶
WithCustomizedWording passes custom copy to be used in the default consent UI
func WithLogger ¶
WithLogger overrides the server's default logger with the given implementation.
func WithStylesheet ¶
WithStylesheet adds a stylesheet that is injected into the iframe element.
func WithTemplatesDirectory ¶
WithTemplatesDirectory configures the server to look for custom templates in the given location.