Documentation ¶
Index ¶
- type CreateScheduleOverrideRequest
- type CreateScheduleOverrideResponse
- type CreateScheduleRequest
- type CreateScheduleResponse
- type CreateScheduleRotationRequest
- type CreateScheduleRotationResponse
- type Day
- type DeleteScheduleOverrideRequest
- type DeleteScheduleOverrideResponse
- type DeleteScheduleRequest
- type DeleteScheduleResponse
- type DeleteScheduleRotationRequest
- type DeleteScheduleRotationResponse
- type GetScheduleOverrideRequest
- type GetScheduleOverrideResponse
- type GetScheduleRequest
- type GetScheduleResponse
- type GetScheduleRotationRequest
- type GetScheduleRotationResponse
- type Identifier
- type ListScheduleOverrideRequest
- type ListScheduleOverrideResponse
- type ListScheduleRequest
- type ListScheduleResponse
- type ListScheduleRotationRequest
- type ListScheduleRotationResponse
- type OwnerTeam
- type Parent
- type Participant
- type ParticipantType
- type ResponseMeta
- type Restriction
- type RestrictionType
- type Rotation
- type Schedule
- type ScheduleIdentifier
- type ScheduleOverride
- type TimeRestriction
- type Type
- type UpdateScheduleOverrideRequest
- type UpdateScheduleOverrideResponse
- type UpdateScheduleRequest
- type UpdateScheduleResponse
- type UpdateScheduleRotationRequest
- type UpdateScheduleRotationResponse
- type User
- type UserType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateScheduleOverrideRequest ¶
type CreateScheduleOverrideRequest struct { *ScheduleIdentifier ApiKey string Alias string `json:"alias"` User User `json:"user"` StartDate string `json:"startDate"` EndDate string `json:"endDate"` Rotations []Rotation `json:"rotations"` }
CreateScheduleOverrideRequest is a struct of request to crate new schedule.
func (*CreateScheduleOverrideRequest) GenerateUrl ¶
func (r *CreateScheduleOverrideRequest) GenerateUrl() (string, url.Values, error)
GenerateUrl generates url to API endpoint.
func (*CreateScheduleOverrideRequest) GetApiKey ¶
func (r *CreateScheduleOverrideRequest) GetApiKey() string
GetApiKey returns api key.
type CreateScheduleOverrideResponse ¶
type CreateScheduleOverrideResponse struct { ResponseMeta ScheduleOverride ScheduleOverride `json:"data"` }
CreateScheduleOverrideResponse is a response of creating alert action.
type CreateScheduleRequest ¶
type CreateScheduleRequest struct { ApiKey string Name string `json:"name"` Description string `json:"description"` Timezone string `json:"timezone"` Enabled bool `json:"enabled"` OwnerTeam OwnerTeam `json:"ownerTeam"` Rotations []Rotation `json:"rotations"` }
CreateScheduleRequest is a struct of request to crate new schedule.
func (*CreateScheduleRequest) GenerateUrl ¶
func (r *CreateScheduleRequest) GenerateUrl() (string, url.Values, error)
GenerateUrl generates url to API endpoint.
func (*CreateScheduleRequest) GetApiKey ¶
func (r *CreateScheduleRequest) GetApiKey() string
GetApiKey returns api key.
type CreateScheduleResponse ¶
type CreateScheduleResponse struct { ResponseMeta Schedule Schedule `json:"data"` }
CreateScheduleResponse is a response of creating alert action.
type CreateScheduleRotationRequest ¶
type CreateScheduleRotationRequest struct { *ScheduleIdentifier ApiKey string Name string `json:"name"` StartDate string `json:"startDate"` EndDate string `json:"endDate"` Type Type `json:"type"` Length int `json:"length"` Participants []Participant `json:"participants"` TimeRestriction TimeRestriction `json:"timeRestriction"` }
CreateScheduleRotationRequest is a struct of request to crate new schedule.
func (*CreateScheduleRotationRequest) GenerateUrl ¶
func (r *CreateScheduleRotationRequest) GenerateUrl() (string, url.Values, error)
GenerateUrl generates url to API endpoint.
func (*CreateScheduleRotationRequest) GetApiKey ¶
func (r *CreateScheduleRotationRequest) GetApiKey() string
GetApiKey returns api key.
type CreateScheduleRotationResponse ¶
type CreateScheduleRotationResponse struct { ResponseMeta Schedule Schedule `json:"data"` }
CreateScheduleRotationResponse is a response of creating alert action.
type DeleteScheduleOverrideRequest ¶
type DeleteScheduleOverrideRequest struct { *ScheduleIdentifier Alias string ApiKey string }
DeleteScheduleOverrideRequest is a struct of request to delete schedule.
func (*DeleteScheduleOverrideRequest) GenerateUrl ¶
func (r *DeleteScheduleOverrideRequest) GenerateUrl() (string, url.Values, error)
GenerateUrl generates url to API endpoint.
func (*DeleteScheduleOverrideRequest) GetApiKey ¶
func (r *DeleteScheduleOverrideRequest) GetApiKey() string
GetApiKey returns api key.
type DeleteScheduleOverrideResponse ¶
type DeleteScheduleOverrideResponse struct {
ResponseMeta
}
DeleteScheduleOverrideResponse is a response of get alert action.
type DeleteScheduleRequest ¶
type DeleteScheduleRequest struct { *Identifier ApiKey string }
DeleteScheduleRequest is a struct of request to delete schedule.
func (*DeleteScheduleRequest) GenerateUrl ¶
func (r *DeleteScheduleRequest) GenerateUrl() (string, url.Values, error)
GenerateUrl generates url to API endpoint.
func (*DeleteScheduleRequest) GetApiKey ¶
func (r *DeleteScheduleRequest) GetApiKey() string
GetApiKey returns api key.
type DeleteScheduleResponse ¶
type DeleteScheduleResponse struct {
ResponseMeta
}
DeleteScheduleResponse is a response of get alert action.
type DeleteScheduleRotationRequest ¶
type DeleteScheduleRotationRequest struct { *ScheduleIdentifier ID string ApiKey string }
DeleteScheduleRotationRequest is a struct of request to delete schedule.
func (*DeleteScheduleRotationRequest) GenerateUrl ¶
func (r *DeleteScheduleRotationRequest) GenerateUrl() (string, url.Values, error)
GenerateUrl generates url to API endpoint.
func (*DeleteScheduleRotationRequest) GetApiKey ¶
func (r *DeleteScheduleRotationRequest) GetApiKey() string
GetApiKey returns api key.
type DeleteScheduleRotationResponse ¶
type DeleteScheduleRotationResponse struct {
ResponseMeta
}
DeleteScheduleRotationResponse is a response of get alert action.
type GetScheduleOverrideRequest ¶
type GetScheduleOverrideRequest struct { *ScheduleIdentifier ApiKey string Alias string }
GetScheduleOverrideRequest is a struct of request to crate new schedule.
func (*GetScheduleOverrideRequest) GenerateUrl ¶
func (r *GetScheduleOverrideRequest) GenerateUrl() (string, url.Values, error)
GenerateUrl generates url to API endpoint.
func (*GetScheduleOverrideRequest) GetApiKey ¶
func (r *GetScheduleOverrideRequest) GetApiKey() string
GetApiKey returns api key.
type GetScheduleOverrideResponse ¶
type GetScheduleOverrideResponse struct { ResponseMeta ScheduleOverride ScheduleOverride `json:"data"` }
GetScheduleOverrideResponse is a response of get alert action.
type GetScheduleRequest ¶
type GetScheduleRequest struct { *Identifier ApiKey string }
GetScheduleRequest is a struct of request to crate new schedule.
func (*GetScheduleRequest) GenerateUrl ¶
func (r *GetScheduleRequest) GenerateUrl() (string, url.Values, error)
GenerateUrl generates url to API endpoint.
func (*GetScheduleRequest) GetApiKey ¶
func (r *GetScheduleRequest) GetApiKey() string
GetApiKey returns api key.
type GetScheduleResponse ¶
type GetScheduleResponse struct { ResponseMeta Schedule Schedule `json:"data"` }
GetScheduleResponse is a response of get alert action.
type GetScheduleRotationRequest ¶
type GetScheduleRotationRequest struct { *ScheduleIdentifier ApiKey string ID string }
GetScheduleRotationRequest is a struct of request to crate new schedule.
func (*GetScheduleRotationRequest) GenerateUrl ¶
func (r *GetScheduleRotationRequest) GenerateUrl() (string, url.Values, error)
GenerateUrl generates url to API endpoint.
func (*GetScheduleRotationRequest) GetApiKey ¶
func (r *GetScheduleRotationRequest) GetApiKey() string
GetApiKey returns api key.
type GetScheduleRotationResponse ¶
type GetScheduleRotationResponse struct { ResponseMeta Schedule Schedule `json:"data"` }
GetScheduleRotationResponse is a response of get alert action.
type Identifier ¶
func (*Identifier) GenerateUrl ¶
func (request *Identifier) GenerateUrl() (string, url.Values, error)
type ListScheduleOverrideRequest ¶
type ListScheduleOverrideRequest struct { *ScheduleIdentifier ApiKey string }
ListScheduleOverrideRequest is a struct of request to crate new schedule.
func (*ListScheduleOverrideRequest) GenerateUrl ¶
func (r *ListScheduleOverrideRequest) GenerateUrl() (string, url.Values, error)
GenerateUrl generates url to API endpoint.
func (*ListScheduleOverrideRequest) GetApiKey ¶
func (r *ListScheduleOverrideRequest) GetApiKey() string
GetApiKey returns api key.
type ListScheduleOverrideResponse ¶
type ListScheduleOverrideResponse struct { ResponseMeta ScheduleOverrides []ScheduleOverride `json:"data"` }
ListScheduleOverrideResponse is a response of get alert action.
type ListScheduleRequest ¶
ListScheduleRequest is a struct of request to crate new schedule.
func (*ListScheduleRequest) GenerateUrl ¶
func (r *ListScheduleRequest) GenerateUrl() (string, url.Values, error)
GenerateUrl generates url to API endpoint.
func (*ListScheduleRequest) GetApiKey ¶
func (r *ListScheduleRequest) GetApiKey() string
GetApiKey returns api key.
type ListScheduleResponse ¶
type ListScheduleResponse struct { ResponseMeta Schedule []Schedule `json:"data"` }
ListScheduleResponse is a response of get alert action.
type ListScheduleRotationRequest ¶
type ListScheduleRotationRequest struct { *ScheduleIdentifier ApiKey string }
ListScheduleRotationRequest is a struct of request to crate new schedule.
func (*ListScheduleRotationRequest) GenerateUrl ¶
func (r *ListScheduleRotationRequest) GenerateUrl() (string, url.Values, error)
GenerateUrl generates url to API endpoint.
func (*ListScheduleRotationRequest) GetApiKey ¶
func (r *ListScheduleRotationRequest) GetApiKey() string
GetApiKey returns api key.
type ListScheduleRotationResponse ¶
type ListScheduleRotationResponse struct { ResponseMeta Schedule []Schedule `json:"data"` }
ListScheduleRotationResponse is a response of get alert action.
type Participant ¶
type Participant interface{}
func NewParticipant ¶
func NewParticipant(participantType ParticipantType, ID string, name string, username string) (Participant, error)
** If participants' type is escalation or team, you can use name or id fields for referring. ** Otherwise (type is user), we use username or id for referencing
type ParticipantType ¶
type ParticipantType string
const ( UserParticipant ParticipantType = "user" TeamParticipant ParticipantType = "team" EscalationParticipant ParticipantType = "escalation" NoneParticipant ParticipantType = "none" )
type ResponseMeta ¶
ResponseMeta contains meta data of response.
func (*ResponseMeta) SetRateLimitState ¶
func (rm *ResponseMeta) SetRateLimitState(state string)
SetRateLimitState sets state of rate limit.
func (*ResponseMeta) SetRequestID ¶
func (rm *ResponseMeta) SetRequestID(requestID string)
SetRequestID sets identifier of request.
func (*ResponseMeta) SetResponseTime ¶
func (rm *ResponseMeta) SetResponseTime(responseTime float32)
SetResponseTime sets request execution time.
type Restriction ¶
type RestrictionType ¶
type RestrictionType string
const ( DayRestrictionType RestrictionType = "time-of-day" WeekDayRestrictionType RestrictionType = "weekday-and-time-of-day" )
type Rotation ¶
type Rotation struct { Name string `json:"name,omitempty"` StartDate string `json:"startDate,omitempty"` EndDate string `json:"endDate,omitempty"` Type Type `json:"type,omitempty"` Length int `json:"length,omitempty"` Participants []Participant `json:"participants,omitempty"` TimeRestriction TimeRestriction `json:"timeRestriction,omitempty"` }
type Schedule ¶
type Schedule struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description,omitempty"` Timezone string `json:"timezone,omitempty"` Enabled bool `json:"enabled,omitempty"` OwnerTeam OwnerTeam `json:"ownerTeam,omitempty"` Rotations []Rotation `json:"rotations,omitempty"` }
type ScheduleIdentifier ¶
func (*ScheduleIdentifier) GenerateUrl ¶
func (request *ScheduleIdentifier) GenerateUrl() (string, url.Values, error)
type ScheduleOverride ¶
type TimeRestriction ¶
type TimeRestriction struct { Type RestrictionType `json:"type"` Restriction Restriction `json:"restriction"` Restrictions []Restriction `json:"restrictions"` }
type UpdateScheduleOverrideRequest ¶
type UpdateScheduleOverrideRequest struct { *ScheduleIdentifier ApiKey string Alias string User User `json:"user"` StartDate string `json:"startDate"` EndDate string `json:"endDate"` Rotations []Rotation `json:"rotations"` }
UpdateScheduleOverrideRequest is a struct of request to update existing schedule.
func (*UpdateScheduleOverrideRequest) GenerateUrl ¶
func (r *UpdateScheduleOverrideRequest) GenerateUrl() (string, url.Values, error)
GenerateUrl generates url to API endpoint.
func (*UpdateScheduleOverrideRequest) GetApiKey ¶
func (r *UpdateScheduleOverrideRequest) GetApiKey() string
GetApiKey returns api key.
type UpdateScheduleOverrideResponse ¶
type UpdateScheduleOverrideResponse struct { ResponseMeta ScheduleOverride ScheduleOverride `json:"data"` }
UpdateScheduleOverrideResponse is a response of get alert action.
type UpdateScheduleRequest ¶
type UpdateScheduleRequest struct { *Identifier ApiKey string Name string `json:"name"` Description string `json:"description"` Timezone string `json:"timezone"` Enabled bool `json:"enabled"` OwnerTeam OwnerTeam `json:"ownerTeam"` Rotations []Rotation `json:"rotations"` }
UpdateScheduleRequest is a struct of request to update existing schedule.
func (*UpdateScheduleRequest) GenerateUrl ¶
func (r *UpdateScheduleRequest) GenerateUrl() (string, url.Values, error)
GenerateUrl generates url to API endpoint.
func (*UpdateScheduleRequest) GetApiKey ¶
func (r *UpdateScheduleRequest) GetApiKey() string
GetApiKey returns api key.
type UpdateScheduleResponse ¶
type UpdateScheduleResponse struct { ResponseMeta Schedule Schedule `json:"data"` }
UpdateScheduleResponse is a response of get alert action.
type UpdateScheduleRotationRequest ¶
type UpdateScheduleRotationRequest struct { *ScheduleIdentifier ApiKey string ID string Name string `json:"name"` StartDate string `json:"startDate"` EndDate string `json:"endDate"` Type Type `json:"type"` Length int `json:"length"` Participants []Participant `json:"participants"` TimeRestriction TimeRestriction `json:"timeRestriction"` }
UpdateScheduleRotationRequest is a struct of request to update existing schedule.
func (*UpdateScheduleRotationRequest) GenerateUrl ¶
func (r *UpdateScheduleRotationRequest) GenerateUrl() (string, url.Values, error)
GenerateUrl generates url to API endpoint.
func (*UpdateScheduleRotationRequest) GetApiKey ¶
func (r *UpdateScheduleRotationRequest) GetApiKey() string
GetApiKey returns api key.
type UpdateScheduleRotationResponse ¶
type UpdateScheduleRotationResponse struct { ResponseMeta Schedule Schedule `json:"data"` }
UpdateScheduleRotationResponse is a response of get alert action.
Source Files ¶
- create_schedule_override_request.go
- create_schedule_override_response.go
- create_schedule_request.go
- create_schedule_response.go
- create_schedule_rotation_request.go
- create_schedule_rotation_response.go
- day.go
- delete_schedule_override_request.go
- delete_schedule_override_response.go
- delete_schedule_request.go
- delete_schedule_response.go
- delete_schedule_rotation_request.go
- delete_schedule_rotation_response.go
- get_schedule_override_request.go
- get_schedule_override_response.go
- get_schedule_request.go
- get_schedule_response.go
- get_schedule_rotation_request.go
- get_schedule_rotation_response.go
- identifier.go
- list_schedule_override_request.go
- list_schedule_override_response.go
- list_schedule_request.go
- list_schedule_response.go
- list_schedule_rotation_request.go
- list_schedule_rotation_response.go
- owner_team.go
- participant.go
- response_meta.go
- rotation.go
- schedule.go
- schedule_identifier.go
- schedule_override.go
- time_restriction.go
- update_schedule_override_request.go
- update_schedule_override_response.go
- update_schedule_request.go
- update_schedule_response.go
- update_schedule_rotation_request.go
- update_schedule_rotation_response.go
- user.go