Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiCredentials ¶
type ApiEndpoint ¶
type ApiEndpoint struct {
// TODO: Should this use the inheritable settings as well?
Name string `yaml:"name"` // Required at all levels.
Vars map[string]string `yaml:"vars,omitempty"`
SkipEndpoint map[string][]string `yaml:"skip_endpoint,omitempty"` // Optional
Paging map[string]string `yaml:"paging,omitempty"` // Optional
Return string `yaml:"return,omitempty"` // Optional
UseForConnCheck bool `yaml:"use_for_connection_check,omitempty"` // Optional
SkipForScans bool `yaml:"skip_for_scans,omitempty"` // Optional
Endpoint string `yaml:"endpoint"` // Required
CurrentBaseKey []string `yaml:"current_base_key,omitempty"` // Managing APIs that return a dict => list
DesiredBaseKey []string `yaml:"desired_base_key,omitempty"` // Managing APIs that return a dict => list
CurrentErrorKey []string `yaml:"current_error_key,omitempty"` // Managing APIs that return a dict => list
DesiredErrorKey []string `yaml:"desired_error_key,omitempty"` // Managing APIs that return a dict => list
EndpointKeyNames map[string]string `yaml:"endpoint_key_names,omitempty"` // Needed for adding endpoint key to sub-endpoint JSON
EndpointKeyValues map[string]interface{}
Documentation string `yaml:"documentation,omitempty"` // Optional
Params ApiParams `yaml:"params,flow,omitempty"` // Optional
Endpoints map[string][]ApiEndpoint `yaml:"endpoints,omitempty"` // Iterating Key => Endpoint
}
func (ApiEndpoint) Copy ¶
func (a ApiEndpoint) Copy() ApiEndpoint
type ApiParams ¶
type ApiRequest ¶
type ApiRequest struct {
Settings ApiRequestInheritableSettings
Endpoint string
CurrentBaseKey []string // Managing APIs that return a dict => list
DesiredBaseKey []string // Managing APIs that return a dict => list
CurrentErrorKey []string
DesiredErrorKey []string
EndpointKeyValues map[string]interface{}
Params ApiParams
FullRequest *http.Request
Client *http.Client
AttemptTime time.Time
Time time.Time
}
func (ApiRequest) ToComparableApiRequest ¶
func (a ApiRequest) ToComparableApiRequest() ComparableApiRequest
type ApiRequestInheritableSettings ¶
type ApiRequestInheritableSettings struct {
Name string
Vars map[string]string `yaml:"vars",omitempty`
Paging map[string]string
Plugin string `yaml:"plugin"` // Required
AuthParams []string `yaml:"auth_params"`
PagingParams []string `yaml:"paging_params"`
GlobalVars map[string]string `yaml:"global_vars,omitempty"` // Needed for substitutions in all the endpoints
SkipContentType bool `yaml:"skip_content_type,omitempty"` // Skip setting content-type header to application/json
}
type ApiRoot ¶
type ApiRoot struct {
Name string `yaml:"name"` // Required
VarsData map[string][]string `yaml:"vars_data",omitempty`
Vars map[string]string `yaml:"vars",omitempty`
Paging map[string]string `yaml:"paging"` // Required
Plugin string `yaml:"plugin"` // Required
AuthParams []string `yaml:"auth_params"`
PagingParams []string `yaml:"paging_params"`
Endpoints []ApiEndpoint `yaml:"endpoints"`
GlobalVars map[string]string `yaml:"global_vars",omitempty` // Needed for substitutions in all the endpoints
SkipContentType bool `yaml:"skip_content_type,omitempty"` // Needed for skipping setting Content-Type header to application/json
}
Click to show internal directories.
Click to hide internal directories.