Documentation ¶
Index ¶
- Constants
- func NewFn[P any, R any](name string, handler FnHandler[P, R], options ...FnOption) services.Fn
- type Fn
- type FnHandler
- type FnOption
- func Authorization() FnOption
- func Barrier() FnOption
- func Cache(mod string, param string) FnOption
- func CacheControl(maxAge int, public bool, mustRevalidate bool, proxyRevalidate bool) FnOption
- func Deprecated() FnOption
- func Internal() FnOption
- func Metric() FnOption
- func Permission() FnOption
- func Readonly() FnOption
- func Validation(title string) FnOption
- type FnOptions
Constants ¶
View Source
const ( GetCacheMod = "get" GetSetCacheMod = "get-set" SetCacheMod = "set" RemoveCacheMod = "remove" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Fn ¶
Fn builtin fn handler wrapper supported annotations @fn {name} @readonly @authorization @permission @validation @cache {get} {set} {get-set} {remove} {ttl} @cache-control {max-age=sec} {public=true} {must-revalidate} {proxy-revalidate} @barrier @metric @title {title} @description >>> {description} <<< @errors >>> {error_name} zh: {zh_message} en: {en_message} <<<
type FnOption ¶ added in v1.2.60
func Authorization ¶ added in v1.2.60
func Authorization() FnOption
func CacheControl ¶ added in v1.2.60
func Deprecated ¶ added in v1.2.60
func Deprecated() FnOption
func Permission ¶ added in v1.2.60
func Permission() FnOption
func Validation ¶ added in v1.2.60
Click to show internal directories.
Click to hide internal directories.