Documentation ¶
Index ¶
Constants ¶
View Source
const ( CacheName ctxKey = "souin_ctx.CACHE_NAME" RequestCacheControl ctxKey = "souin_ctx.REQUEST_CACHE_CONTROL" )
View Source
const ( GraphQL ctxKey = "souin_ctx.GRAPHQL" HashBody ctxKey = "souin_ctx.HASH_BODY" IsMutationRequest ctxKey = "souin_ctx.IS_MUTATION_REQUEST" )
View Source
const ( Key ctxKey = "souin_ctx.CACHE_KEY" DisplayableKey ctxKey = "souin_ctx.DISPLAYABLE_KEY" IgnoredHeaders ctxKey = "souin_ctx.IGNORE_HEADERS" Hashed ctxKey = "souin_ctx.HASHED" )
View Source
const ( TimeoutCache ctxKey = "souin_ctx.TIMEOUT_CACHE" TimeoutCancel ctxKey = "souin_ctx.TIMEOUT_CANCEL" )
View Source
const CacheControlCtx ctxKey = "souin_ctx.CACHE-CONTROL-CTX"
View Source
const Mode ctxKey = "souin_ctx.MODE"
View Source
const Now ctxKey = "souin_ctx.NOW"
View Source
const SupportedMethod ctxKey = "souin_ctx.SUPPORTED_METHOD"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { CacheName ctx GraphQL ctx Key ctx Method ctx Mode ctx Now ctx Timeout ctx }
func GetContext ¶
func GetContext() *Context
func (*Context) Init ¶
func (c *Context) Init(co configurationtypes.AbstractConfigurationInterface)
type ModeContext ¶
type ModeContext struct {
Strict, Bypass_request, Bypass_response bool
}
func (*ModeContext) SetContext ¶
func (mc *ModeContext) SetContext(req *http.Request) *http.Request
func (*ModeContext) SetContextWithBaseRequest ¶
func (*ModeContext) SetupContext ¶
func (mc *ModeContext) SetupContext(c configurationtypes.AbstractConfigurationInterface)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.