Documentation
¶
Index ¶
- func GetAppID(ctx context.Context) (string, bool)
- func NamedOrInlineStruct(meta map[uint32]*schema.Decl, t *schema.Type) (*schema.Struct, []*schema.Type)
- func StructBits(s *schema.Struct, method string, asResponse bool, asGoStruct bool, ...) (query, headers, cookies, jsonBody string)
- func WithAppID(ctx context.Context, appID string) context.Context
- type DescribedField
- type FieldLocation
- type Manager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NamedOrInlineStruct ¶
func NamedOrInlineStruct(meta map[uint32]*schema.Decl, t *schema.Type) (*schema.Struct, []*schema.Type)
NamedOrInlineStruct returns the struct type and type arguments for a named or inline struct. Returns nil if the type is neither a named struct nor an inline struct.
func StructBits ¶
func StructBits(s *schema.Struct, method string, asResponse bool, asGoStruct bool, queryParamsAsObject bool) (query, headers, cookies, jsonBody string)
StructBits generates JSON representations of a struct's fields separated by location It returns query, headers, cookies, and JSON body as strings
Types ¶
type DescribedField ¶
type DescribedField struct { *schema.Field SrcName string Name string Location FieldLocation }
DescribedField is a field with additional metadata
type FieldLocation ¶
type FieldLocation int
FieldLocation represents where a field is located in the API request/response
const ( FieldLocationBody FieldLocation = 0 FieldLocationQuery FieldLocation = 1 FieldLocationHeader FieldLocation = 2 FieldLocationCookie FieldLocation = 3 FieldLocationUnused FieldLocation = 4 )
type Manager ¶
type Manager struct { BaseURL string // contains filtered or unexported fields }
func NewManager ¶
Click to show internal directories.
Click to hide internal directories.