Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTemplateParse = errors.New("failed to parse template")
Functions ¶
This section is empty.
Types ¶
type BasicAuth ¶ added in v0.4.0
type BasicAuth struct {
Username string `json:"username" yaml:"username"`
Password string `json:"password" yaml:"password"`
}
func NewBasicAuth ¶ added in v0.4.0
type BearerAuth ¶ added in v0.4.0
type BearerAuth struct {
Token string `json:"token"`
}
func NewBearerAuth ¶ added in v0.4.0
func NewBearerAuth(t *Template) (*BearerAuth, error)
func (*BearerAuth) Apply ¶ added in v0.4.0
func (a *BearerAuth) Apply(r *http.Request)
func (*BearerAuth) GetType ¶ added in v0.4.0
func (a *BearerAuth) GetType() AuthType
type ByteBody ¶ added in v0.3.2
type ByteBody []byte
func (*ByteBody) UnmarshalJSON ¶ added in v0.3.2
type Request ¶
type Request struct {
Method string
Path string
Body []byte
Headers map[string]StringOrStringList
}
func LoadRequest ¶
func NewRequest ¶ added in v0.2.6
func NewRequest(data RequestData) Request
type RequestData ¶ added in v0.2.6
type RequestData struct {
Method string `json:"method" yaml:"method"`
Path string `json:"path" yaml:"path"`
Body ByteBody `json:"body" yaml:"body"`
Headers map[string]StringOrStringList `json:"headers" yaml:"headers"`
}
type StringOrStringList ¶ added in v0.4.0
type StringOrStringList []string
func (*StringOrStringList) UnmarshalJSON ¶ added in v0.4.0
func (s *StringOrStringList) UnmarshalJSON(data []byte) error
func (*StringOrStringList) UnmarshalYAML ¶ added in v0.4.0
func (s *StringOrStringList) UnmarshalYAML(value *yaml.Node) error
type Template ¶ added in v0.4.0
type Template string
func NewTemplate ¶ added in v0.4.0
func (*Template) Interpolate ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.