Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Make ¶
func Make(ctx context.Context, options ...MakeOption)
func New ¶
func New() transports.Middleware
func NewWithCache ¶
func NewWithCache(cache Cache) transports.Middleware
Types ¶
type DefaultCache ¶
type DefaultCache struct{}
func (*DefaultCache) Close ¶
func (cache *DefaultCache) Close()
type MakeOption ¶
type MakeOption func(option *MakeOptions)
func MaxAge ¶
func MaxAge(age int) MakeOption
func MustRevalidate ¶
func MustRevalidate() MakeOption
func Private ¶
func Private() MakeOption
func ProxyRevalidate ¶
func ProxyRevalidate() MakeOption
func Public ¶
func Public() MakeOption
type MakeOptions ¶
type MakeOptions struct {
// contains filtered or unexported fields
}
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
Middleware use @cache-control max-age=10 public=true must-revalidate=false proxy-revalidate=false
func (*Middleware) Close ¶
func (middleware *Middleware) Close() (err error)
func (*Middleware) Construct ¶
func (middleware *Middleware) Construct(options transports.MiddlewareOptions) (err error)
func (*Middleware) Handler ¶
func (middleware *Middleware) Handler(next transports.Handler) transports.Handler
func (*Middleware) Name ¶
func (middleware *Middleware) Name() string
Click to show internal directories.
Click to hide internal directories.