Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint struct {
Service *Service
Name string
MethodName string
Description string
Meta expr.MetaExpr
MethodMeta expr.MetaExpr
MethodDocs *expr.DocsExpr
Generate bool
MethodGenerate bool
IsJSONRPC bool
Request *Request
Response *Response
Routes []*Route
Stream *Stream
Redirect *Redirect
Security *Security
}
func BuildEndpoint ¶
func BuildEndpoint(endpoint *expr.HTTPEndpointExpr) *Endpoint
type Error ¶
type Error struct {
Name string
Attribute *expr.AttributeExpr
Type expr.DataType
Remedy *ErrorRemedy
}
type ErrorRemedy ¶
type Request ¶
type Request struct {
Payload *expr.AttributeExpr
Body *expr.AttributeExpr
RawBody *expr.AttributeExpr
StreamingBody *expr.AttributeExpr
BodyOrigin string
PathParams []*Parameter
QueryParams []*Parameter
Headers []*Parameter
Cookies []*Parameter
MapQueryParams *string
Multipart bool
FormEncoded bool
OptionalBody bool
MustHaveBody bool
SkipBodyEncode bool
IDAttribute string
IDAttributeRequired bool
}
type Response ¶
type Response struct {
Result *expr.AttributeExpr
StreamingResult *expr.AttributeExpr
Responses []*ResponseStatus
ErrorResponses []*ResponseStatus
HasMixedResults bool
SkipBodyEncode bool
IDAttribute string
IDAttributeRequired bool
}
type ResponseLink ¶
type ResponseStatus ¶
type ResponseStatus struct {
Error *Error
StatusCode int
Description string
ContentType string
ContentTypes []string
Headers []*Header
Cookies []*Cookie
Body *expr.AttributeExpr
DocumentBody *expr.AttributeExpr
BodyOrigin string
TagName string
TagValue string
IsError bool
EmitExamples bool
IsWebSocket bool
BinaryBody bool
Meta expr.MetaExpr
Links []*ResponseLink
}
type Security ¶
type Security struct {
Requirements []*expr.SecurityExpr
Parameters []*SecurityParameter
Disabled bool
}
type SecurityParameter ¶
type Service ¶
type Service struct {
Name string
Meta expr.MetaExpr
ServiceMeta expr.MetaExpr
Generate bool
ServiceGenerate bool
Endpoints []*Endpoint
}
func BuildService ¶
func BuildService(service *expr.HTTPServiceExpr) *Service
type Stream ¶
type Stream struct {
Kind expr.StreamKind
Direction string
IsStreaming bool
Transport string
IsSSE bool
IsWebSocket bool
HasMixedResults bool
RequestHasBody bool
RequestPayload *expr.AttributeExpr
RequestMessage *expr.AttributeExpr
ResponseMessage *expr.AttributeExpr
HandshakeMethod string
HandshakeStatus int
HandshakeContent string
SSE *SSE
}
Click to show internal directories.
Click to hide internal directories.