MCPcopy Create free account
hub / github.com/goadesign/goa / APIKeyField

Function APIKeyField

dsl/security.go:519–522  ·  view source on GitHub ↗

APIKeyField is syntactic sugar to define an API key attribute with the "rpc:tag" meta set with the value of the first argument. APIKeyField takes the same arguments as APIKey with the addition of the tag value as the first argument.

(tag any, scheme, name string, args ...any)

Source from the content-addressed store, hash-verified

517// APIKeyField takes the same arguments as APIKey with the addition of the
518// tag value as the first argument.
519func APIKeyField(tag any, scheme, name string, args ...any) {
520 args = useDSL(args, func() { Meta("security:apikey:"+scheme, scheme) })
521 Field(tag, name, args...)
522}
523
524// AccessToken defines the attribute used to provide the access token to an
525// endpoint secured with OAuth2. The parameters and usage of AccessToken are the

Callers 1

TestTooManyArgErrorFunction · 0.85

Calls 3

useDSLFunction · 0.85
MetaFunction · 0.85
FieldFunction · 0.85

Tested by 1

TestTooManyArgErrorFunction · 0.68