Documentation ¶
Index ¶
- Variables
- func ResolveEndpointUsage(data usage.ResolveData, ep *Endpoint) usage.Usage
- type AccessType
- type CallUsage
- type Endpoint
- func (ep *Endpoint) End() token.Pos
- func (ep *Endpoint) GoString() string
- func (ep *Endpoint) Kind() resource.Kind
- func (ep *Endpoint) Package() *pkginfo.Package
- func (ep *Endpoint) Pos() token.Pos
- func (ep *Endpoint) RequestEncoding() []*apienc.RequestEncoding
- func (ep *Endpoint) ResponseEncoding() *apienc.ResponseEncoding
- func (ep *Endpoint) SortKey() string
- type ParseData
- type ReferenceUsage
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidEndpointUsage = errRange.New( "Invalid API Usage", "APIs can not be referenced without being called, unless they are used as a cron job endpoint, or a PubSub subscription handler.", errors.WithDetails(baseHint), ) ErrAPICalledOutsideService = errRange.New( "Invalid API call", "APIs can only be called from within a service, the current call site is outside any services within the application.", errors.WithDetails(baseHint), ) ErrRawEndpointsCannotBeCalled = errRange.New( "Invalid API call", "Raw APIs cannot be called from within an Encore application.", ) )
Functions ¶
func ResolveEndpointUsage ¶
func ResolveEndpointUsage(data usage.ResolveData, ep *Endpoint) usage.Usage
Types ¶
type AccessType ¶
type AccessType string
const ( Public AccessType = "public" Private AccessType = "private" // Auth is like public but requires authentication. Auth AccessType = "auth" )
type Endpoint ¶
type Endpoint struct { Name string Doc string File *pkginfo.File Decl *schema.FuncDecl Access AccessType AccessField option.Option[directive.Field] Raw bool Path *resourcepaths.Path HTTPMethods []string HTTPMethodsField option.Option[directive.Field] Request schema.Type // request data; nil for Raw Endpoints Response schema.Type // response data; nil for Raw Endpoints Tags selector.Set Recv option.Option[*schema.Receiver] // None if not a method // contains filtered or unexported fields }
func (*Endpoint) RequestEncoding ¶
func (ep *Endpoint) RequestEncoding() []*apienc.RequestEncoding
func (*Endpoint) ResponseEncoding ¶
func (ep *Endpoint) ResponseEncoding() *apienc.ResponseEncoding
Click to show internal directories.
Click to hide internal directories.