Documentation ¶
Index ¶
- type ErrHttpError
- type Http
- func (h *Http) Changelog() string
- func (h *Http) Condition(source string, scm scm.ScmHandler) (pass bool, message string, err error)
- func (h *Http) Source(workingDir string, resultSource *result.Source) error
- func (h *Http) Target(source string, scm scm.ScmHandler, dryRun bool, resultTarget *result.Target) error
- type Request
- type ResponseAsserts
- type Spec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrHttpError ¶
type ErrHttpError struct {
// contains filtered or unexported fields
}
func (*ErrHttpError) Error ¶
func (e *ErrHttpError) Error() string
type Http ¶
type Http struct {
// contains filtered or unexported fields
}
Http defines a resource of type "http"
func New ¶
* New returns a reference to a newly initialized Http resource or an error if the provided Spec triggers a validation error. *
func (*Http) Changelog ¶
Changelog returns the changelog for this resource, or an empty string if not supported
func (*Http) Condition ¶
Condition tests if the response of the specified HTTP request meets assertion. If no assertion is specified, it only checks for successful HTTP response code (HTTP/1xx, HTTP/2xx or HTTP/3xx).
type Request ¶
type Request struct { /* [S][C] Specifies a custom HTTP request verb. Defaults to "GET". */ Verb string `yaml:",omitempty"` /* [S][C] Specifies a custom HTTP request body. Defaults to "" (empty string). */ Body string `yaml:",omitempty"` /* [S][C] Specifies custom HTTP request headers. Defaults to an empty map. */ Headers map[string]string `yaml:",inline,omitempty"` /* [S][C] Specifies whether or not to follow redirects. Default to false (e.g. follow HTTP redirections) unless spec.returnresponseheader is set to true (source only). */ NoFollowRedirects bool `yaml:",omitempty"` }
type ResponseAsserts ¶
type Spec ¶
type Spec struct { /* [S][C] Specifies the URL of the HTTP request for this resource. */ Url string `yaml:",omitempty"` /* [S] Specifies the header to return as source value (instead of the body). */ ReturnResponseHeader string /* [S][C] Customizes the HTTP request to emit. */ Request Request /* [C] Specifies a set of custom assertions on the HTTP response for the condition. */ ResponseAsserts ResponseAsserts }
Spec defines a specification for a "http" resource parsed from an updatecli manifest file.
Click to show internal directories.
Click to hide internal directories.