Documentation
¶
Index ¶
- func ToConfig(m *Model) *config.File
- func Validate(m *Model) error
- type Auth
- type BasicAuth
- type Client
- type DigOutput
- type Endpoint
- type Expander
- type FetchCall
- type FetchOptions
- type GRPCClient
- type HTTPClient
- type JMESPathOutput
- type JSONOutput
- type Link
- type Model
- type OutputConfig
- type OutputFilter
- type Request
- type RequestOption
- type ResolvedResource
- type Resource
- type Server
- type Service
- type ServiceSpec
- type TemplateOutput
- type XMLOutput
- type XPathOutput
- type YAMLOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FetchCall ¶ added in v0.4.0
type FetchCall struct {
URL string
Options FetchOptions
}
FetchCall represents the parsed fetch call
func ParseJSFetchCall ¶ added in v0.4.0
func (FetchCall) ToEndpoint ¶ added in v0.4.0
type FetchOptions ¶ added in v0.4.0
type FetchOptions struct {
Method string `json:"method,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
Body string `json:"body,omitempty"`
}
FetchOptions represents common fetch options
type GRPCClient ¶ added in v0.4.0
type HTTPClient ¶ added in v0.4.0
type HTTPClient struct {
}
type JMESPathOutput ¶ added in v0.4.0
type JMESPathOutput struct {
Query string
}
type JSONOutput ¶ added in v0.4.0
type JSONOutput struct {
Pretty bool
}
type Model ¶
type Model struct {
Services []*Service
// contains filtered or unexported fields
}
func (*Model) Resolve ¶
func (m *Model) Resolve(spec ServiceSpec, server string, method string) (ResolvedResource, error)
type OutputConfig ¶ added in v0.4.0
type OutputFilter ¶ added in v0.4.0
type OutputFilter interface {
// contains filtered or unexported methods
}
type Request ¶ added in v0.4.0
type Request struct {
URL *url.URL
Body io.ReadCloser
Headers http.Header
Vars map[string]any
Links []Link
Auth Auth
Expander e.Interface
}
func NewRequest ¶ added in v0.4.0
func NewRequest(r ResolvedResource, opts ...RequestOption) (*Request, error)
type RequestOption ¶ added in v0.4.0
type RequestOption interface {
// contains filtered or unexported methods
}
func WithBaseURL ¶ added in v0.4.0
func WithBaseURL(baseURL *url.URL) RequestOption
func WithVars ¶ added in v0.4.0
func WithVars(vars map[string]any) RequestOption
type ResolvedResource ¶
type ResolvedResource interface {
Service() *Service
Resource() *Resource
Lineage() []*Resource
Endpoint() *Endpoint
Server() *Server
Client() Client
Auth() Auth
Output() []*OutputConfig
Headers() http.Header
Vars() map[string]any
Links() []Link
EvalRequest(baseURL *url.URL, vars map[string]any) (*Request, error)
}
ResolvedResource represents the resource which was selected by its name
type Resource ¶
type Resource struct {
Name string
Comment string
Title string
Description string
Tags []string
Resources []*Resource
Endpoints []*Endpoint
URITemplate *uritemplates.URITemplate
Headers map[string][]string
Form map[string][]string
Links []Link
Command []string
Body any
RawBody any
Vars map[string]any
Auth Auth
Output []*OutputConfig
}
type Service ¶
type ServiceSpec ¶
type ServiceSpec []string
func (ServiceSpec) NewCounter ¶
func (s ServiceSpec) NewCounter() cli.ArgCounter
func (ServiceSpec) Path ¶
func (s ServiceSpec) Path() string
func (ServiceSpec) ServiceName ¶
func (s ServiceSpec) ServiceName() string
func (*ServiceSpec) Set ¶
func (s *ServiceSpec) Set(arg string) error
func (ServiceSpec) String ¶
func (s ServiceSpec) String() string
type TemplateOutput ¶ added in v0.4.0
type XPathOutput ¶ added in v0.4.0
type XPathOutput struct {
Query string
}
type YAMLOutput ¶ added in v0.4.0
type YAMLOutput struct {
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.