Documentation ¶
Index ¶
- type Client
- func (c *Client) Create(context context.Context, request *CreateRequest) (*CreateResult, error)
- func (c *Client) CreateIncidentRule(context context.Context, request *CreateIncidentRuleRequest) (*CreateIncidentRuleResult, error)
- func (c *Client) CreateIncidentTemplate(context context.Context, request *CreateIncidentTemplateRequest) (*CreateIncidentTemplateResult, error)
- func (c *Client) Delete(context context.Context, request *DeleteRequest) (*DeleteResult, error)
- func (c *Client) DeleteIncidentRule(context context.Context, request *DeleteIncidentRuleRequest) (*DeleteIncidentRuleResult, error)
- func (c *Client) DeleteIncidentTemplate(context context.Context, request *DeleteIncidentTemplateRequest) (*DeleteIncidentTemplateResult, error)
- func (c *Client) Get(context context.Context, request *GetRequest) (*GetResult, error)
- func (c *Client) GetAudienceTemplate(context context.Context, request *GetAudienceTemplateRequest) (*GetAudienceTemplateResult, error)
- func (c *Client) GetIncidentRules(context context.Context, request *GetIncidentRulesRequest) (*GetIncidentRulesResult, error)
- func (c *Client) GetIncidentTemplates(context context.Context, request *GetIncidentTemplatesRequest) (*GetIncidentTemplatesResult, error)
- func (c *Client) List(context context.Context, request *ListRequest) (*ListResult, error)
- func (c *Client) Update(context context.Context, request *UpdateRequest) (*UpdateResult, error)
- func (c *Client) UpdateAudienceTemplate(context context.Context, request *UpdateAudienceTemplateRequest) (*UpdateAudienceTemplateResult, error)
- func (c *Client) UpdateIncidentRule(context context.Context, request *UpdateIncidentRuleRequest) (*UpdateIncidentRuleResult, error)
- func (c *Client) UpdateIncidentTemplate(context context.Context, request *UpdateIncidentTemplateRequest) (*UpdateIncidentTemplateResult, error)
- type ConditionOfStakeholder
- type CreateIncidentRuleRequest
- type CreateIncidentRuleResult
- type CreateIncidentTemplateRequest
- type CreateIncidentTemplateResult
- type CreateRequest
- type CreateResult
- type DeleteIncidentRuleRequest
- type DeleteIncidentRuleResult
- type DeleteIncidentTemplateRequest
- type DeleteIncidentTemplateResult
- type DeleteRequest
- type DeleteResult
- type GetAudienceTemplateRequest
- type GetAudienceTemplateResult
- type GetIncidentRulesRequest
- type GetIncidentRulesResult
- type GetIncidentTemplatesRequest
- type GetIncidentTemplatesResult
- type GetRequest
- type GetResult
- type IncidentProperties
- type IncidentRuleResult
- type IncidentTemplate
- type IncidentTemplateRequest
- type ListRequest
- type ListResult
- type MatchField
- type Paging
- type ResponderOfAudience
- type Service
- type StakeholderOfAudience
- type StakeholderProperties
- type UpdateAudienceTemplateRequest
- type UpdateAudienceTemplateResult
- type UpdateIncidentRuleRequest
- type UpdateIncidentRuleResult
- type UpdateIncidentTemplateRequest
- type UpdateIncidentTemplateResult
- type UpdateRequest
- type UpdateResult
- type Visibility
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Create ¶
func (c *Client) Create(context context.Context, request *CreateRequest) (*CreateResult, error)
func (*Client) CreateIncidentRule ¶
func (c *Client) CreateIncidentRule(context context.Context, request *CreateIncidentRuleRequest) (*CreateIncidentRuleResult, error)
func (*Client) CreateIncidentTemplate ¶
func (c *Client) CreateIncidentTemplate(context context.Context, request *CreateIncidentTemplateRequest) (*CreateIncidentTemplateResult, error)
func (*Client) Delete ¶
func (c *Client) Delete(context context.Context, request *DeleteRequest) (*DeleteResult, error)
func (*Client) DeleteIncidentRule ¶
func (c *Client) DeleteIncidentRule(context context.Context, request *DeleteIncidentRuleRequest) (*DeleteIncidentRuleResult, error)
func (*Client) DeleteIncidentTemplate ¶
func (c *Client) DeleteIncidentTemplate(context context.Context, request *DeleteIncidentTemplateRequest) (*DeleteIncidentTemplateResult, error)
func (*Client) GetAudienceTemplate ¶
func (c *Client) GetAudienceTemplate(context context.Context, request *GetAudienceTemplateRequest) (*GetAudienceTemplateResult, error)
func (*Client) GetIncidentRules ¶
func (c *Client) GetIncidentRules(context context.Context, request *GetIncidentRulesRequest) (*GetIncidentRulesResult, error)
func (*Client) GetIncidentTemplates ¶
func (c *Client) GetIncidentTemplates(context context.Context, request *GetIncidentTemplatesRequest) (*GetIncidentTemplatesResult, error)
func (*Client) List ¶
func (c *Client) List(context context.Context, request *ListRequest) (*ListResult, error)
func (*Client) Update ¶
func (c *Client) Update(context context.Context, request *UpdateRequest) (*UpdateResult, error)
func (*Client) UpdateAudienceTemplate ¶
func (c *Client) UpdateAudienceTemplate(context context.Context, request *UpdateAudienceTemplateRequest) (*UpdateAudienceTemplateResult, error)
func (*Client) UpdateIncidentRule ¶
func (c *Client) UpdateIncidentRule(context context.Context, request *UpdateIncidentRuleRequest) (*UpdateIncidentRuleResult, error)
func (*Client) UpdateIncidentTemplate ¶
func (c *Client) UpdateIncidentTemplate(context context.Context, request *UpdateIncidentTemplateRequest) (*UpdateIncidentTemplateResult, error)
type ConditionOfStakeholder ¶
type ConditionOfStakeholder struct { MatchField MatchField `json:"matchField,omitempty"` Key string `json:"key,omitempty"` Value string `json:"value,omitempty"` }
type CreateIncidentRuleRequest ¶
type CreateIncidentRuleRequest struct { client.BaseRequest ServiceId string Conditions []og.Condition `json:"conditions,omitempty"` ConditionMatchType og.ConditionMatchType `json:"conditionMatchType,omitempty"` IncidentProperties IncidentProperties `json:"incidentProperties"` }
func (*CreateIncidentRuleRequest) Method ¶
func (r *CreateIncidentRuleRequest) Method() string
func (*CreateIncidentRuleRequest) ResourcePath ¶
func (r *CreateIncidentRuleRequest) ResourcePath() string
func (*CreateIncidentRuleRequest) Validate ¶
func (r *CreateIncidentRuleRequest) Validate() error
type CreateIncidentRuleResult ¶
type CreateIncidentRuleResult struct { client.ResultMetadata Id string `json:"id"` }
type CreateIncidentTemplateRequest ¶
type CreateIncidentTemplateRequest struct { client.BaseRequest ServiceId string IncidentTemplate IncidentTemplateRequest `json:"incidentTemplate"` }
func (*CreateIncidentTemplateRequest) Method ¶
func (r *CreateIncidentTemplateRequest) Method() string
func (*CreateIncidentTemplateRequest) ResourcePath ¶
func (r *CreateIncidentTemplateRequest) ResourcePath() string
func (*CreateIncidentTemplateRequest) Validate ¶
func (r *CreateIncidentTemplateRequest) Validate() error
type CreateIncidentTemplateResult ¶
type CreateIncidentTemplateResult struct { client.ResultMetadata Id string `json:"id"` }
type CreateRequest ¶
type CreateRequest struct { client.BaseRequest Name string `json:"name"` TeamId string `json:"teamId"` Description string `json:"description,omitempty"` Visibility Visibility `json:"visibility,omitempty"` Tags []string `json:"tags,omitempty"` }
func (*CreateRequest) Method ¶
func (r *CreateRequest) Method() string
func (*CreateRequest) ResourcePath ¶
func (r *CreateRequest) ResourcePath() string
func (*CreateRequest) Validate ¶
func (r *CreateRequest) Validate() error
type CreateResult ¶
type CreateResult struct { client.ResultMetadata Id string `json:"id"` Name string `json:"name"` }
type DeleteIncidentRuleRequest ¶
type DeleteIncidentRuleRequest struct { client.BaseRequest ServiceId string IncidentRuleId string }
func (*DeleteIncidentRuleRequest) Method ¶
func (r *DeleteIncidentRuleRequest) Method() string
func (*DeleteIncidentRuleRequest) ResourcePath ¶
func (r *DeleteIncidentRuleRequest) ResourcePath() string
func (*DeleteIncidentRuleRequest) Validate ¶
func (r *DeleteIncidentRuleRequest) Validate() error
type DeleteIncidentRuleResult ¶
type DeleteIncidentRuleResult struct { client.ResultMetadata Result string `json:"result"` }
type DeleteIncidentTemplateRequest ¶
type DeleteIncidentTemplateRequest struct { client.BaseRequest ServiceId string IncidentTemplateId string }
func (*DeleteIncidentTemplateRequest) Method ¶
func (r *DeleteIncidentTemplateRequest) Method() string
func (*DeleteIncidentTemplateRequest) ResourcePath ¶
func (r *DeleteIncidentTemplateRequest) ResourcePath() string
func (*DeleteIncidentTemplateRequest) Validate ¶
func (r *DeleteIncidentTemplateRequest) Validate() error
type DeleteIncidentTemplateResult ¶
type DeleteIncidentTemplateResult struct { client.ResultMetadata Result string `json:"result"` }
type DeleteRequest ¶
type DeleteRequest struct { client.BaseRequest Id string }
func (*DeleteRequest) Method ¶
func (r *DeleteRequest) Method() string
func (*DeleteRequest) ResourcePath ¶
func (r *DeleteRequest) ResourcePath() string
func (*DeleteRequest) Validate ¶
func (r *DeleteRequest) Validate() error
type DeleteResult ¶
type DeleteResult struct { client.ResultMetadata Result string `json:"result"` }
type GetAudienceTemplateRequest ¶
type GetAudienceTemplateRequest struct { client.BaseRequest ServiceId string }
func (*GetAudienceTemplateRequest) Method ¶
func (r *GetAudienceTemplateRequest) Method() string
func (*GetAudienceTemplateRequest) ResourcePath ¶
func (r *GetAudienceTemplateRequest) ResourcePath() string
func (*GetAudienceTemplateRequest) Validate ¶
func (r *GetAudienceTemplateRequest) Validate() error
type GetAudienceTemplateResult ¶
type GetAudienceTemplateResult struct { client.ResultMetadata Responder ResponderOfAudience `json:"responder"` Stakeholder StakeholderOfAudience `json:"stakeholder"` }
type GetIncidentRulesRequest ¶
type GetIncidentRulesRequest struct { client.BaseRequest ServiceId string }
func (*GetIncidentRulesRequest) Method ¶
func (r *GetIncidentRulesRequest) Method() string
func (*GetIncidentRulesRequest) ResourcePath ¶
func (r *GetIncidentRulesRequest) ResourcePath() string
func (*GetIncidentRulesRequest) Validate ¶
func (r *GetIncidentRulesRequest) Validate() error
type GetIncidentRulesResult ¶
type GetIncidentRulesResult struct { client.ResultMetadata IncidentRule []IncidentRuleResult `json:"data,omitempty"` }
type GetIncidentTemplatesRequest ¶
type GetIncidentTemplatesRequest struct { client.BaseRequest ServiceId string }
func (*GetIncidentTemplatesRequest) Method ¶
func (r *GetIncidentTemplatesRequest) Method() string
func (*GetIncidentTemplatesRequest) ResourcePath ¶
func (r *GetIncidentTemplatesRequest) ResourcePath() string
func (*GetIncidentTemplatesRequest) Validate ¶
func (r *GetIncidentTemplatesRequest) Validate() error
type GetIncidentTemplatesResult ¶
type GetIncidentTemplatesResult struct { client.ResultMetadata IncidentTemplates []IncidentTemplate `json:"data"` }
type GetRequest ¶
type GetRequest struct { client.BaseRequest Id string }
func (*GetRequest) Method ¶
func (r *GetRequest) Method() string
func (*GetRequest) ResourcePath ¶
func (r *GetRequest) ResourcePath() string
func (*GetRequest) Validate ¶
func (r *GetRequest) Validate() error
type GetResult ¶
type GetResult struct { client.ResultMetadata Service Service `json:"data"` }
type IncidentProperties ¶
type IncidentProperties struct { Message string `json:"message"` Tags []string `json:"tags,omitempty"` Details map[string]string `json:"details,omitempty"` Description string `json:"description,omitempty"` Priority alert.Priority `json:"priority"` StakeholderProperties StakeholderProperties `json:"stakeholderProperties"` }
type IncidentRuleResult ¶
type IncidentRuleResult struct { Id string `json:"id"` Order int `json:"order,omitempty"` ConditionMatchType og.ConditionMatchType `json:"conditionMatchType,omitempty"` Conditions []og.Condition `json:"conditions,omitempty"` IncidentProperties IncidentProperties `json:"incidentProperties,omitempty"` }
type IncidentTemplate ¶
type IncidentTemplate struct { Id string `json:"id"` Name string `json:"name"` IncidentProperties IncidentProperties `json:"incidentProperties"` }
type IncidentTemplateRequest ¶
type IncidentTemplateRequest struct { Name string `json:"name"` IncidentProperties IncidentProperties `json:"incidentProperties"` }
type ListRequest ¶
type ListRequest struct { client.BaseRequest Limit int Offset int }
func (*ListRequest) Method ¶
func (r *ListRequest) Method() string
func (*ListRequest) RequestParams ¶
func (r *ListRequest) RequestParams() map[string]string
func (*ListRequest) ResourcePath ¶
func (r *ListRequest) ResourcePath() string
func (*ListRequest) Validate ¶
func (r *ListRequest) Validate() error
type ListResult ¶
type ListResult struct { client.ResultMetadata Services []Service `json:"data"` Paging Paging `json:"paging"` }
type MatchField ¶
type MatchField string
const ( Country MatchField = "country" State MatchField = "state" City MatchField = "city" ZipCode MatchField = "zipCode" Line MatchField = "line" Tag MatchField = "tag" CustomProperty MatchField = "customProperty" )
type ResponderOfAudience ¶
type StakeholderOfAudience ¶
type StakeholderOfAudience struct { Individuals []string `json:"individuals,omitempty"` ConditionMatchType og.ConditionMatchType `json:"conditionMatchType,omitempty"` Conditions []ConditionOfStakeholder `json:"conditions,omitempty"` }
type StakeholderProperties ¶
type UpdateAudienceTemplateRequest ¶
type UpdateAudienceTemplateRequest struct { client.BaseRequest ServiceId string Responder ResponderOfAudience `json:"responder,omitempty"` Stakeholder StakeholderOfAudience `json:"stakeholder,omitempty"` }
func (*UpdateAudienceTemplateRequest) Method ¶
func (r *UpdateAudienceTemplateRequest) Method() string
func (*UpdateAudienceTemplateRequest) ResourcePath ¶
func (r *UpdateAudienceTemplateRequest) ResourcePath() string
func (*UpdateAudienceTemplateRequest) Validate ¶
func (r *UpdateAudienceTemplateRequest) Validate() error
type UpdateAudienceTemplateResult ¶
type UpdateAudienceTemplateResult struct { client.ResultMetadata Result string `json:"result"` }
type UpdateIncidentRuleRequest ¶
type UpdateIncidentRuleRequest struct { client.BaseRequest ServiceId string IncidentRuleId string Conditions []og.Condition `json:"conditions,omitempty"` ConditionMatchType og.ConditionMatchType `json:"conditionMatchType,omitempty"` IncidentProperties IncidentProperties `json:"incidentProperties"` }
func (*UpdateIncidentRuleRequest) Method ¶
func (r *UpdateIncidentRuleRequest) Method() string
func (*UpdateIncidentRuleRequest) ResourcePath ¶
func (r *UpdateIncidentRuleRequest) ResourcePath() string
func (*UpdateIncidentRuleRequest) Validate ¶
func (r *UpdateIncidentRuleRequest) Validate() error
type UpdateIncidentRuleResult ¶
type UpdateIncidentRuleResult struct { client.ResultMetadata Id string `json:"id"` }
type UpdateIncidentTemplateRequest ¶
type UpdateIncidentTemplateRequest struct { client.BaseRequest ServiceId string IncidentTemplateId string Name string `json:"name"` IncidentProperties IncidentProperties `json:"incidentProperties"` }
func (*UpdateIncidentTemplateRequest) Method ¶
func (r *UpdateIncidentTemplateRequest) Method() string
func (*UpdateIncidentTemplateRequest) ResourcePath ¶
func (r *UpdateIncidentTemplateRequest) ResourcePath() string
func (*UpdateIncidentTemplateRequest) Validate ¶
func (r *UpdateIncidentTemplateRequest) Validate() error
type UpdateIncidentTemplateResult ¶
type UpdateIncidentTemplateResult struct { client.ResultMetadata Id string `json:"id"` }
type UpdateRequest ¶
type UpdateRequest struct { client.BaseRequest Id string Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Visibility Visibility `json:"visibility,omitempty"` }
func (*UpdateRequest) Method ¶
func (r *UpdateRequest) Method() string
func (*UpdateRequest) ResourcePath ¶
func (r *UpdateRequest) ResourcePath() string
func (*UpdateRequest) Validate ¶
func (r *UpdateRequest) Validate() error
type UpdateResult ¶
type UpdateResult struct { client.ResultMetadata Id string `json:"id"` Name string `json:"name"` }
type Visibility ¶
type Visibility string
const ( TeamMembers Visibility = "TEAM_MEMBERS" OpsgenieUsers Visibility = "OPSGENIE_USERS" )
Source Files ¶
- service.go
- service_audience_template.go
- service_audience_template_request.go
- service_audience_template_result.go
- service_incident_rule.go
- service_incident_rule_request.go
- service_incident_rule_result.go
- service_incident_template.go
- service_incident_template_request.go
- service_incident_template_result.go
- service_request.go
- service_result.go
Click to show internal directories.
Click to hide internal directories.