Documentation
¶
Index ¶
- Variables
- type Auth
- type BasicAuth
- type Client
- type Config
- type DigOutput
- type Endpoint
- type File
- type Form
- type GRPCClient
- type HTTPClient
- type Header
- type JMESPathOutput
- type JSONOutput
- type Link
- type Output
- type Resource
- type Server
- type Service
- type TemplateOutput
- type XMLOutput
- type XPathOutput
- type YAMLOutput
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnsupportedFileFormat = errors.New("unsupported file format")
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v0.4.0
type Client struct {
HTTP *HTTPClient `json:"http,omitempty"`
GRPC *GRPCClient `json:"grpc,omitempty"`
}
type Endpoint ¶
type Endpoint struct {
Schema string `json:"$schema,omitempty"`
Name string `json:"name,omitempty"`
Comment string `json:"comment,omitempty"`
Title string `json:"title,omitempty"`
Source string `json:"source,omitempty"`
Description string `json:"description,omitempty"`
Tags []string `json:"tags,omitempty"`
Headers Header `json:"headers,omitempty"`
Form Form `json:"form,omitempty"`
Links []Link `json:"links,omitempty"`
Body any `json:"body,omitempty"`
RawBody any `json:"rawBody,omitempty"`
Vars map[string]any `json:"vars,omitempty"`
Auth *Auth `json:"auth,omitempty"`
Output []Output `json:"output,omitempty"`
}
type File ¶ added in v0.4.0
type File struct {
Schema string `json:"$schema,omitempty"`
*Service
Services []Service `json:"services,omitempty"`
// contains filtered or unexported fields
}
type Form ¶ added in v0.4.0
Form represents the key-value pairs in an encoded form.
func (Form) MarshalJSON ¶ added in v0.4.0
func (*Form) UnmarshalJSON ¶ added in v0.4.0
type GRPCClient ¶ added in v0.4.0
type HTTPClient ¶ added in v0.4.0
type HTTPClient struct {
}
type Header ¶
Header represents the key-value pairs in an HTTP header.
func (Header) MarshalJSON ¶ added in v0.4.0
func (*Header) UnmarshalJSON ¶
type JMESPathOutput ¶ added in v0.4.0
type JMESPathOutput struct {
Query string `json:"query,omitempty"`
}
type JSONOutput ¶ added in v0.4.0
type JSONOutput struct {
Pretty bool `json:"pretty,omitempty"`
}
type Output ¶ added in v0.4.0
type Output struct {
Name string `json:"name,omitempty"`
Comment string `json:"comment,omitempty"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Links []Link `json:"links,omitempty"`
IncludeMetadata bool `json:"includeMetadata,omitzero"`
Template *TemplateOutput `json:"template,omitempty"`
JMESPath *JMESPathOutput `json:"jmespath,omitempty"`
XPath *XPathOutput `json:"xpath,omitempty"`
Dig *DigOutput `json:"dig,omitempty"`
JSON *JSONOutput `json:"json,omitempty"`
XML *XMLOutput `json:"xml,omitempty"`
YAML *YAMLOutput `json:"yaml,omitempty"`
}
type Resource ¶
type Resource struct {
Schema string `json:"$schema,omitempty"`
Name string `json:"name,omitempty"`
Comment string `json:"comment,omitempty"`
Source string `json:"source,omitempty"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Tags []string `json:"tags,omitempty"`
Resources []Resource `json:"resources,omitempty"`
URI string `json:"uri,omitempty"`
Headers Header `json:"headers,omitempty"`
Form Form `json:"form,omitempty"`
Links []Link `json:"links,omitempty"`
Get *Endpoint `json:"get,omitempty"`
Put *Endpoint `json:"put,omitempty"`
Post *Endpoint `json:"post,omitempty"`
Delete *Endpoint `json:"delete,omitempty"`
Options *Endpoint `json:"options,omitempty"`
Head *Endpoint `json:"head,omitempty"`
Trace *Endpoint `json:"trace,omitempty"`
Patch *Endpoint `json:"patch,omitempty"`
Query *Endpoint `json:"query,omitempty"`
Body any `json:"body,omitempty"`
RawBody any `json:"rawBody,omitempty"`
Vars map[string]any `json:"vars,omitempty"`
Auth *Auth `json:"auth,omitempty"`
Output []Output `json:"output,omitempty"`
}
type Server ¶
type Server struct {
Schema string `json:"$schema,omitempty"`
Name string `json:"name"`
Comment string `json:"comment,omitempty"`
Source string `json:"source,omitempty"`
Description string `json:"description,omitempty"`
Tags []string `json:"tags,omitempty"`
Title string `json:"title,omitempty"`
BaseURL string `json:"baseUrl"`
Headers Header `json:"headers,omitempty"`
Links []Link `json:"links,omitempty"`
Vars map[string]any `json:"vars,omitempty"`
Auth *Auth `json:"auth,omitempty"`
Output []Output `json:"output,omitempty"`
}
type Service ¶
type Service struct {
Schema string `json:"$schema,omitempty"`
Name string `json:"name"`
Comment string `json:"comment,omitempty"`
Source string `json:"source,omitempty"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Tags []string `json:"tags,omitempty"`
Servers []Server `json:"servers,omitempty"`
Resources []Resource `json:"resources,omitempty"`
Links []Link `json:"links,omitempty"`
Vars map[string]any `json:"vars,omitempty"`
Client *Client `json:"client,omitempty"`
Auth *Auth `json:"auth,omitempty"`
Output []Output `json:"output,omitempty"`
}
func ExampleHTTPBinorg ¶
func ExampleHTTPBinorg() Service
type TemplateOutput ¶ added in v0.4.0
type XPathOutput ¶ added in v0.4.0
type XPathOutput struct {
Query string `json:"query,omitempty"`
}
type YAMLOutput ¶ added in v0.4.0
type YAMLOutput struct {
}
Click to show internal directories.
Click to hide internal directories.