Documentation ¶
Index ¶
- func IsSchemaType(value string) bool
- type BodyProperty
- type Encoding
- type Endpoint
- type Enum
- type EnumOption
- type Field
- type HeaderProperty
- type ParamProperty
- type QueryProperty
- type Response
- type ResponseOption
- type Schema
- func NewArraySchema(id string, name string, items *Schema, display bool) Schema
- func NewBooleanSchema(id string, name string, display bool) Schema
- func NewEnumSchema(id string, name string, display bool, options *Enum) Schema
- func NewFloatSchema(id string, name string, display bool) Schema
- func NewIntegerSchema(id string, name string, display bool) Schema
- func NewObjectSchema(id string, name string, fields []Field, display bool) Schema
- func NewStringSchema(id string, name string, display bool) Schema
- type SchemaType
- type Security
- type SecurityType
- type TemplateData
- type Verb
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSchemaType ¶
Types ¶
type BodyProperty ¶
type Encoding ¶
type Encoding string
const ENCODING_JSON Encoding = "json"
const ENCODING_TEXT Encoding = "json"
const ENCODING_URL Encoding = "form"
const ENCODING_XML Encoding = "xml"
type Endpoint ¶
type Endpoint struct { Name string Path string Verb Verb Params []ParamProperty Query map[string]QueryProperty Header map[string]HeaderProperty Body BodyProperty Response Response Security []Security }
type Enum ¶ added in v0.0.1
type Enum struct {
Options []EnumOption
}
type EnumOption ¶ added in v0.0.1
type HeaderProperty ¶
type ParamProperty ¶
type QueryProperty ¶
type Response ¶
type Response struct { Options []ResponseOption Default bool DefaultCode int }
type ResponseOption ¶
type Schema ¶
type Schema struct { Id string Name string Type SchemaType Fields []Field Items *Schema Display bool *Enum }
func NewArraySchema ¶
func NewEnumSchema ¶ added in v0.0.1
func NewObjectSchema ¶
type SchemaType ¶
type SchemaType string
const TYPE_ARRAY SchemaType = "array"
const TYPE_BOOLEAN SchemaType = "bool"
const TYPE_INTEGER SchemaType = "int"
const TYPE_NUMBER SchemaType = "float32"
const TYPE_OBJECT SchemaType = "object"
const TYPE_STRING SchemaType = "string"
func NewSchemaType ¶
func NewSchemaType(value string) SchemaType
func (SchemaType) String ¶
func (s SchemaType) String() string
type Security ¶ added in v0.0.2
type Security struct {
Type SecurityType
}
type SecurityType ¶ added in v0.0.2
type SecurityType string
const SECURITY_TYPE_BASIC SecurityType = "basic"
const SECURITY_TYPE_BEARER SecurityType = "bearer"
const SECURITY_TYPE_COOKIE SecurityType = "cookie"
type TemplateData ¶
type Verb ¶
type Verb string
const VERB_CONNECT Verb = "CONNECT"
const VERB_DELETE Verb = "DELETE"
const VERB_GET Verb = "GET"
const VERB_HEAD Verb = "HEAD"
const VERB_OPTIONS Verb = "OPTIONS"
const VERB_PATCH Verb = "PATCH"
const VERB_POST Verb = "POST"
const VERB_PUT Verb = "PUT"
const VERB_TRACE Verb = "TRACE"
Click to show internal directories.
Click to hide internal directories.