Documentation ¶
Index ¶
Constants ¶
View Source
const ( AuthTypeNone = "none" AuthTypeBasic = "basic" AuthTypeBearer = "bearer" AuthTypeCustom = "custom" )
consts
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthBasicConfig ¶
type AuthBearerConfig ¶
type AuthBearerConfig struct {
Token string `json:"token" yaml:"token"`
}
type AuthConfig ¶
type AuthConfig struct { AuthBasicConfig AuthBearerConfig AuthCustomConfig Type string `json:"type" yaml:"type"` }
func (AuthConfig) Validate ¶
func (cfg AuthConfig) Validate() error
Validate checks the authorization configuration.
type AuthCustomConfig ¶
type PayloadConfig ¶
type PayloadConfig struct { QueryParams map[string]string `json:"queryParams" yaml:"queryParams"` Body string `json:"body" yaml:"body"` }
func (PayloadConfig) Validate ¶
func (cfg PayloadConfig) Validate(method string) error
Validate checks the payload configuration.
type Settings ¶
type Settings struct { URL string `json:"url" yaml:"url"` Method string `json:"method" yaml:"method"` Auth AuthConfig `json:"auth" yaml:"auth"` Payload PayloadConfig `json:"payload" yaml:"payload"` Timeout int `json:"timeout" yaml:"timeout"` Headers map[string]string `json:"headers" yaml:"headers"` }
Click to show internal directories.
Click to hide internal directories.