Documentation ¶
Index ¶
- func BuildFindPayload(incidentsFindID string) (*incidents.FindPayload, error)
- func BuildListAllPayload(incidentsListAllLimit string) (*incidents.LimitPayload, error)
- func DecodeFindResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func DecodeListAllResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func EncodeListAllRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
- func FindIncidentsPath(id uint64) string
- func ListAllIncidentsPath() string
- func NewFindIncidentOK(body *FindResponseBody) *incidents.Incident
- func NewListAllIncidentOK(body []*IncidentResponse) []*incidents.Incident
- func ValidateFindResponseBody(body *FindResponseBody) (err error)
- func ValidateIncidentResponse(body *IncidentResponse) (err error)
- type Client
- type FindResponseBody
- type IncidentResponse
- type ListAllResponseBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildFindPayload ¶
func BuildFindPayload(incidentsFindID string) (*incidents.FindPayload, error)
BuildFindPayload builds the payload for the incidents find endpoint from CLI flags.
func BuildListAllPayload ¶
func BuildListAllPayload(incidentsListAllLimit string) (*incidents.LimitPayload, error)
BuildListAllPayload builds the payload for the incidents list all endpoint from CLI flags.
func DecodeFindResponse ¶
func DecodeFindResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeFindResponse returns a decoder for responses returned by the incidents find endpoint. restoreBody controls whether the response body should be restored after having been read.
func DecodeListAllResponse ¶
func DecodeListAllResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeListAllResponse returns a decoder for responses returned by the incidents list all endpoint. restoreBody controls whether the response body should be restored after having been read.
func EncodeListAllRequest ¶
func EncodeListAllRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
EncodeListAllRequest returns an encoder for requests sent to the incidents list all server.
func FindIncidentsPath ¶
FindIncidentsPath returns the URL path to the incidents service find HTTP endpoint.
func ListAllIncidentsPath ¶
func ListAllIncidentsPath() string
ListAllIncidentsPath returns the URL path to the incidents service list all HTTP endpoint.
func NewFindIncidentOK ¶
func NewFindIncidentOK(body *FindResponseBody) *incidents.Incident
NewFindIncidentOK builds a "incidents" service "find" endpoint result from a HTTP "OK" response.
func NewListAllIncidentOK ¶
func NewListAllIncidentOK(body []*IncidentResponse) []*incidents.Incident
NewListAllIncidentOK builds a "incidents" service "list all" endpoint result from a HTTP "OK" response.
func ValidateFindResponseBody ¶
func ValidateFindResponseBody(body *FindResponseBody) (err error)
ValidateFindResponseBody runs the validations defined on FindResponseBody
func ValidateIncidentResponse ¶
func ValidateIncidentResponse(body *IncidentResponse) (err error)
ValidateIncidentResponse runs the validations defined on IncidentResponse
Types ¶
type Client ¶
type Client struct { // Find Doer is the HTTP client used to make requests to the find endpoint. FindDoer goahttp.Doer // ListAll Doer is the HTTP client used to make requests to the list all // endpoint. ListAllDoer goahttp.Doer // RestoreResponseBody controls whether the response bodies are reset after // decoding so they can be read again. RestoreResponseBody bool // contains filtered or unexported fields }
Client lists the incidents service endpoint HTTP clients.
func NewClient ¶
func NewClient( scheme string, host string, doer goahttp.Doer, enc func(*http.Request) goahttp.Encoder, dec func(*http.Response) goahttp.Decoder, restoreBody bool, ) *Client
NewClient instantiates HTTP clients for all the incidents service servers.
func (*Client) BuildFindRequest ¶
BuildFindRequest instantiates a HTTP request object with method and path set to call the "incidents" service "find" endpoint
func (*Client) BuildListAllRequest ¶
BuildListAllRequest instantiates a HTTP request object with method and path set to call the "incidents" service "list all" endpoint
type FindResponseBody ¶
type FindResponseBody struct { // Unique ID of the incident ID *uint64 `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // Date the incident occurred Date *string `form:"date,omitempty" json:"date,omitempty" xml:"date,omitempty"` // Date the incident occurred DateClosed *string `form:"date_closed,omitempty" json:"date_closed,omitempty" xml:"date_closed,omitempty"` // Permissions associated with incident Permissions *string `form:"Permissions,omitempty" json:"Permissions,omitempty" xml:"Permissions,omitempty"` // The severity of the incident Severity *int `form:"severity,omitempty" json:"severity,omitempty" xml:"severity,omitempty"` // The short title of the incident Title *string `form:"title,omitempty" json:"title,omitempty" xml:"title,omitempty"` // The detailed description of the incident Summary *string `form:"summary,omitempty" json:"summary,omitempty" xml:"summary,omitempty"` // The scope of impact of this incident Scope *string `form:"scope,omitempty" json:"scope,omitempty" xml:"scope,omitempty"` // What group or individual caused the initial incident ResponsibleParty *string `form:"responsible_party,omitempty" json:"responsible_party,omitempty" xml:"responsible_party,omitempty"` // A list of the affected customers AffectedCustomers []string `form:"affected_customers,omitempty" json:"affected_customers,omitempty" xml:"affected_customers,omitempty"` // The original cause of the incident RootCause *string `form:"root_cause,omitempty" json:"root_cause,omitempty" xml:"root_cause,omitempty"` // The slack channel for incident discussions SlackChannel *string `form:"slack_channel,omitempty" json:"slack_channel,omitempty" xml:"slack_channel,omitempty"` // When the incident was submitted CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"` // When the incident was last updated UpdatedAt *string `form:"updated_at,omitempty" json:"updated_at,omitempty" xml:"updated_at,omitempty"` }
FindResponseBody is the type of the "incidents" service "find" endpoint HTTP response body.
type IncidentResponse ¶
type IncidentResponse struct { // Unique ID of the incident ID *uint64 `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // Date the incident occurred Date *string `form:"date,omitempty" json:"date,omitempty" xml:"date,omitempty"` // Date the incident occurred DateClosed *string `form:"date_closed,omitempty" json:"date_closed,omitempty" xml:"date_closed,omitempty"` // Permissions associated with incident Permissions *string `form:"Permissions,omitempty" json:"Permissions,omitempty" xml:"Permissions,omitempty"` // The severity of the incident Severity *int `form:"severity,omitempty" json:"severity,omitempty" xml:"severity,omitempty"` // The short title of the incident Title *string `form:"title,omitempty" json:"title,omitempty" xml:"title,omitempty"` // The detailed description of the incident Summary *string `form:"summary,omitempty" json:"summary,omitempty" xml:"summary,omitempty"` // The scope of impact of this incident Scope *string `form:"scope,omitempty" json:"scope,omitempty" xml:"scope,omitempty"` // What group or individual caused the initial incident ResponsibleParty *string `form:"responsible_party,omitempty" json:"responsible_party,omitempty" xml:"responsible_party,omitempty"` // A list of the affected customers AffectedCustomers []string `form:"affected_customers,omitempty" json:"affected_customers,omitempty" xml:"affected_customers,omitempty"` // The original cause of the incident RootCause *string `form:"root_cause,omitempty" json:"root_cause,omitempty" xml:"root_cause,omitempty"` // The slack channel for incident discussions SlackChannel *string `form:"slack_channel,omitempty" json:"slack_channel,omitempty" xml:"slack_channel,omitempty"` // When the incident was submitted CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"` // When the incident was last updated UpdatedAt *string `form:"updated_at,omitempty" json:"updated_at,omitempty" xml:"updated_at,omitempty"` }
IncidentResponse is used to define fields on response body types.
type ListAllResponseBody ¶
type ListAllResponseBody []*IncidentResponse
ListAllResponseBody is the type of the "incidents" service "list all" endpoint HTTP response body.