Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckRequest ¶
type CheckRequest struct { Service string `validate:"required" json:"service"` Check string `validate:"required" json:"check"` Status string `validate:"required,oneof=passed failed" json:"status"` Message string `json:"message"` }
CheckRequest represents a structured request to the OpsLevel checks webhook endpoint
type Client ¶
Client represents a rest http client and is used to send requests to OpsLevel integrations
func (*Client) Check ¶
func (c *Client) Check(req CheckRequest, integrationID string) error
Check sends a CheckRequest to the OpsLevel check integration at integrationID
type ClientOption ¶ added in v0.0.4
type ClientOption func(c *Client)
ClientOption modifies fields on a Client
func WithBaseURL ¶ added in v0.0.4
func WithBaseURL(baseURL string) ClientOption
WithBaseURL modifies the Client baseURL.
func WithHTTPClient ¶ added in v0.0.4
func WithHTTPClient(hc *http.Client) ClientOption
WithHTTPClient modifies the Client http.Client.
type Commit ¶
type Commit struct { SHA string `json:"sha"` Message string `json:"message"` Branch string `json:"branch"` Date time.Time `json:"date"` CommitterName string `json:"committer_name"` CommitterEmail string `json:"committer_email"` AuthorName string `json:"author_name"` AuthorEmail string `json:"author_email"` AuthoringDate time.Time `json:"authoring_date"` }
Commit represents the commit being deployed
type DeployRequest ¶
type DeployRequest struct { Service string `validate:"required" json:"service"` Deployer Deployer `validate:"required" json:"deployer"` DeployedAt time.Time `validate:"required" json:"deployed_at"` Description string `validate:"required" json:"description"` Environment string `json:"environment"` DeployURL string `json:"deploy_url"` DeployNumber string `json:"deploy_number"` Commit Commit `json:"commit"` DedupID string `json:"dedup_id"` }
DeployRequest represents a structured request to the OpsLevel deploys webhook endpoint
type PayloadRequest ¶ added in v0.0.3
type PayloadRequest struct { Service string `validate:"required" json:"service"` Check string `validate:"required" json:"check"` Data interface{} `validate:"required" json:"data"` }
PayloadRequest represents a structured request to the OpsLevel payload webhook endpoint
Click to show internal directories.
Click to hide internal directories.