Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RouterOption

type RouterOption interface {
	Apply(s *RouterSettings)
}

func WithCustomCacheExpiration

func WithCustomCacheExpiration(cacheExpiration time.Duration) RouterOption

WithCustomCacheExpiration returns a RouterOption that specifies custom expiration value for cache

func WithMiddlewares

func WithMiddlewares(middlewares ...echo.MiddlewareFunc) RouterOption

WithMiddlewares returns a RouterOption that specifies an array of echo.Middleware

func WithNoCache

func WithNoCache() RouterOption

WithNoCache returns a RouterOption that disable cache

type RouterSettings

type RouterSettings struct {
	Middlewares           []echo.MiddlewareFunc
	CustomCacheExpiration *time.Duration
	NoCache               bool
}

func ApplyOptions

func ApplyOptions(options ...RouterOption) *RouterSettings

Source Files