Documentation
¶
Index ¶
Constants ¶
View Source
const ( HTTPMethodGet string = "GET" HTTPMethodPost string = "POST" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIResponse ¶ added in v0.12.0
type APIResponse struct { Status int Raw json.RawMessage Response any }
type ApiDomain ¶
type ApiDomain struct { // Spec is the specification of the API requests Spec *ApiSpec `json:"spec,omitempty" yaml:"spec,omitempty"` }
ApiDomain is a domain that is defined by a list of API requests
func (ApiDomain) GetResources ¶
func (ApiDomain) IsExecutable ¶ added in v0.4.0
IsExecutable returns true if any of the requests are marked executable
type ApiSpec ¶
type ApiSpec struct { Requests []Request `mapstructure:"requests" json:"requests" yaml:"requests"` // Opts will be applied to all requests, except those which have their own // specified ApiOpts Options *ApiOpts `mapstructure:"options" json:"options,omitempty" yaml:"options,omitempty"` // contains filtered or unexported fields }
ApiSpec contains a list of API requests
type Request ¶
type Request struct { Name string `json:"name" yaml:"name"` URL string `json:"url" yaml:"url"` Params map[string]string `json:"parameters,omitempty" yaml:"parameters,omitempty"` Method string `json:"method,omitempty" yaml:"method,omitempty"` Body string `json:"body,omitempty" yaml:"body,omitempty"` Executable bool `json:"executable,omitempty" yaml:"executable,omitempty"` // ApiOpts specific to this request. If ApiOpts is present, values in the // ApiSpec-level Options are ignored for this request. Options *ApiOpts `json:"options,omitempty" yaml:"options,omitempty"` // contains filtered or unexported fields }
Request is a single API request
Click to show internal directories.
Click to hide internal directories.