doc

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	Version  int              `yaml:"version" json:"version"`
	Domain   DocumentDomain   `yaml:"domain" json:"domain"`
	Sections DocumentSections `yaml:"sections" json:"sections"`
}

func New

func New(data string) (*Document, error)

type DocumentDomain

type DocumentDomain struct {
	Key   string `yaml:"key" json:"key"`
	Title string `yaml:"title" json:"title"`
}

type DocumentError

type DocumentError DocumentErrorFragment

func (*DocumentError) UnmarshalYAML

func (de *DocumentError) UnmarshalYAML(unmarshal func(interface{}) error) error

type DocumentErrorArgument

type DocumentErrorArgument DocumentErrorArgumentFragment

func (*DocumentErrorArgument) IsOptional

func (dea *DocumentErrorArgument) IsOptional() bool

func (*DocumentErrorArgument) UnmarshalYAML

func (dea *DocumentErrorArgument) UnmarshalYAML(unmarshal func(interface{}) error) error

type DocumentErrorArgumentFragment

type DocumentErrorArgumentFragment struct {
	Type        string      `yaml:"type" json:"type"`
	Description string      `yaml:"description" json:"description"`
	Validators  []string    `yaml:"validators" json:"validators"`
	Default     interface{} `yaml:"default" json:"default"`
}

type DocumentErrorArgumentItem

type DocumentErrorArgumentItem struct {
	Name     string
	Argument *DocumentErrorArgument
}

type DocumentErrorArguments

type DocumentErrorArguments map[string]*DocumentErrorArgument

type DocumentErrorDescription

type DocumentErrorDescription DocumentErrorDescriptionFragment

func (*DocumentErrorDescription) UnmarshalYAML

func (dd *DocumentErrorDescription) UnmarshalYAML(unmarshal func(interface{}) error) error

type DocumentErrorDescriptionFragment

type DocumentErrorDescriptionFragment struct {
	Friendly  string `yaml:"friendly" json:"friendly"`
	Technical string `yaml:"technical" json:"technical"`
}

type DocumentErrorFragment

type DocumentErrorFragment struct {
	Title            string                      `json:"title"`
	Traits           []string                    `json:"traits"`
	Sensitivity      string                      `json:"sensitivity,omitempty"`
	Description      *DocumentErrorDescription   `json:"description"`
	Arguments        DocumentErrorArguments      `json:"arguments"`
	OrderedArguments []DocumentErrorArgumentItem `json:"-"`
	Metadata         DocumentErrorMetadata       `json:"metadata"`
}

type DocumentErrorHTTPMetadata

type DocumentErrorHTTPMetadata DocumentErrorHTTPMetadataFragment

func (*DocumentErrorHTTPMetadata) UnmarshalYAML

func (dehm *DocumentErrorHTTPMetadata) UnmarshalYAML(unmarshal func(interface{}) error) error

type DocumentErrorHTTPMetadataFragment

type DocumentErrorHTTPMetadataFragment struct {
	Status         int                                   `json:"status"`
	Headers        DocumentErrorHTTPMetadataHeaders      `json:"headers,omitempty"`
	OrderedHeaders []DocumentErrorHTTPMetadataHeaderItem `json:"-"`
}

type DocumentErrorHTTPMetadataHeader

type DocumentErrorHTTPMetadataHeader []string

func (*DocumentErrorHTTPMetadataHeader) UnmarshalYAML

func (dehmh *DocumentErrorHTTPMetadataHeader) UnmarshalYAML(unmarshal func(interface{}) error) error

type DocumentErrorHTTPMetadataHeaderItem

type DocumentErrorHTTPMetadataHeaderItem struct {
	Name   string
	Values DocumentErrorHTTPMetadataHeader
}

type DocumentErrorHTTPMetadataHeaders

type DocumentErrorHTTPMetadataHeaders map[string]DocumentErrorHTTPMetadataHeader

type DocumentErrorMetadata

type DocumentErrorMetadata struct {
	HTTP *DocumentErrorHTTPMetadata `yaml:"http" json:"http"`
}

type DocumentErrors

type DocumentErrors map[string]DocumentError

type DocumentSection

type DocumentSection struct {
	Title  string         `yaml:"title" json:"title"`
	Errors DocumentErrors `yaml:"errors" json:"errors"`
}

type DocumentSections

type DocumentSections map[string]DocumentSection

type DocumentVersionFragment

type DocumentVersionFragment struct {
	Version string `yaml:"version" json:"version"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL