Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DocAPIResp ¶
type DocAPIResp struct { StatusCode int `json:"status_code"` Result struct { Structure *DocStruct `json:"structure,omitempty"` Namespaces DocNamespace `json:"namespaces,omitempty"` } `json:"result"` }
DocAPIResp is the API response for a namespace documentation request.
type DocNamespace ¶
type DocNamespace map[string][]struct { Name string `json:"name,omitempty"` Docs string `json:"docs,omitempty"` Structure *DocStruct `json:"-"` }
DocNamespace is the API response structure for namespaces
type DocStruct ¶
type DocStruct struct { Type string `json:"type,omitempty"` Package string `json:"type_name,omitempty"` Doc string `json:"doc,omitempty"` Key string `json:"key,omitempty"` Value *DocStruct `json:"value,omitempty"` Elems *DocStruct `json:"elems,omitempty"` MapKeys struct { Type string `json:"type,omitempty"` } `json:"map_keys,omitempty"` Namespace string `json:"module_namespace,omitempty"` InlineKey string `json:"module_inline_key,omitempty"` StructFields []*DocStruct `json:"struct_fields,omitempty"` }
DocStruct is the API response structure for a type.
type Interface ¶
type Interface struct { // keep track of the current module Module string // properties Name string Fields []Interface Type string Nullable bool // array/map type Array bool Map bool // map key is always string Nest *Interface // Module loaders Loader []string // list of modules LoaderKey string // inline_key LoaderType reflect.Type }
Interface is a Go type representing a Caddy module structure or property.
type Modules ¶
Modules is list of Module. Map is used for quicker access and ease of fetching module name.
type Schema ¶
type Schema struct { Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` MarkdownDescription string `json:"markdownDescription,omitempty"` Type string `json:"type,omitempty"` Ref string `json:"$ref,omitempty"` ArrayItems *Schema `json:"items,omitempty"` Definitions map[string]*Schema `json:"definitions,omitempty"` Properties map[string]*Schema `json:"properties,omitempty"` AdditionalProperties *Schema `json:"additionalProperties,omitempty"` Required []string `json:"required,omitempty"` Enum []string `json:"enum,omitempty"` AdditionalItems bool `json:"additionalItems,omitempty"` AllOf []*Schema `json:"allOf,omitempty"` AnyOf []*Schema `json:"anyOf,omitempty"` OneOf []*Schema `json:"oneOf,omitempty"` If *Schema `json:"if,omitempty"` Then *Schema `json:"then,omitempty"` Else *Schema `json:"else,omitempty"` Const string `json:"const,omitempty"` // contains filtered or unexported fields }
Schema is a structure for JSON schema. JSON encoding of a Schema gives a valid JSON schema. http://json-schema.org
func NewSchema ¶
func NewSchema() *Schema
NewSchema creates a new Schema. It's primarily for the convenience of initiating struct maps.
func (Schema) MarshalJSON ¶
MarshalJSON allows to marshal Schema.Type as string or list
Click to show internal directories.
Click to hide internal directories.