Documentation
¶
Index ¶
- type AddRequest
- type AddResult
- type Client
- func (c *Client) Add(context context.Context, request *AddRequest) (*AddResult, error)
- func (c *Client) Delete(context context.Context, heartbeatName string) (*DeleteResult, error)
- func (c *Client) Disable(context context.Context, heartbeatName string) (*HeartbeatInfo, error)
- func (c *Client) Enable(context context.Context, heartbeatName string) (*HeartbeatInfo, error)
- func (c *Client) Get(context context.Context, heartbeatName string) (*GetResult, error)
- func (c *Client) List(context context.Context) (*ListResult, error)
- func (c *Client) Ping(context context.Context, heartbeatName string) (*PingResult, error)
- func (c *Client) Update(context context.Context, request *UpdateRequest) (*HeartbeatInfo, error)
- type DeleteResult
- type GetResult
- type Heartbeat
- type HeartbeatInfo
- type ListResult
- type PingResult
- type Unit
- type UpdateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddRequest ¶
type AddRequest struct { client.BaseRequest Name string `json:"name"` Description string `json:"description,omitempty"` Interval int `json:"interval"` IntervalUnit Unit `json:"intervalUnit"` Enabled *bool `json:"enabled"` OwnerTeam og.OwnerTeam `json:"ownerTeam,omitempty"` AlertMessage string `json:"alertMessage,omitempty"` AlertTag []string `json:"alertTags,omitempty"` AlertPriority string `json:"alertPriority,omitempty"` }
func (AddRequest) Method ¶
func (r AddRequest) Method() string
func (AddRequest) ResourcePath ¶
func (r AddRequest) ResourcePath() string
func (AddRequest) Validate ¶
func (r AddRequest) Validate() error
type AddResult ¶
type AddResult struct { client.ResultMetadata Heartbeat }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Update ¶
func (c *Client) Update(context context.Context, request *UpdateRequest) (*HeartbeatInfo, error)
type DeleteResult ¶
type DeleteResult struct { client.ResultMetadata Message string `json:"result"` }
type GetResult ¶
type GetResult struct { client.ResultMetadata Heartbeat }
type Heartbeat ¶
type Heartbeat struct { Name string `json:"name"` Description string `json:"description"` Interval int `json:"interval"` Enabled bool `json:"enabled"` IntervalUnit string `json:"intervalUnit"` Expired bool `json:"expired"` OwnerTeam og.OwnerTeam `json:"ownerTeam"` AlertTags []string `json:"alertTags"` AlertPriority string `json:"alertPriority"` AlertMessage string `json:"alertMessage"` }
type HeartbeatInfo ¶
type HeartbeatInfo struct { client.ResultMetadata Name string `json:"name"` Enabled bool `json:"enabled"` Expired bool `json:"expired"` }
type ListResult ¶
type ListResult struct { client.ResultMetadata Heartbeats []Heartbeat `json:"heartbeats"` }
type PingResult ¶
type PingResult struct { client.ResultMetadata Message string `json:"result"` }
type UpdateRequest ¶
type UpdateRequest struct { client.BaseRequest Name string `json:"name"` Description string `json:"description,omitempty"` Interval int `json:"interval"` IntervalUnit Unit `json:"intervalUnit"` Enabled *bool `json:"enabled,omitempty"` OwnerTeam og.OwnerTeam `json:"ownerTeam,omitempty"` AlertMessage string `json:"alertMessage,omitempty"` AlertTag []string `json:"alertTags,omitempty"` AlertPriority string `json:"alertPriority,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
Click to show internal directories.
Click to hide internal directories.