Documentation ¶
Overview ¶
Package schedule provides requests and response structures to achieve Schedule API actions.
Index ¶
- type CreateScheduleRequest
- type CreateScheduleResponse
- type DeleteScheduleRequest
- type DeleteScheduleResponse
- type FromUsers
- type GetScheduleRequest
- type GetScheduleResponse
- type GetTimelineScheduleRequest
- type GetTimelineScheduleResponse
- type ListSchedulesRequest
- type ListSchedulesResponse
- type Participant
- type Periods
- type Recipients
- type Restriction
- type Rotation
- type RotationInfo
- type TimelineFinalScheduleResponse
- type TimelineRotation
- type TimelineScheduleResponse
- type TimelineTimelineResponse
- type UpdateScheduleRequest
- type UpdateScheduleResponse
- type WhoIsOnCallParticipant
- type WhoIsOnCallRequest
- type WhoIsOnCallResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateScheduleRequest ¶
type CreateScheduleRequest struct { APIKey string `json:"apiKey,omitempty"` Name string `json:"name,omitempty"` Timezone string `json:"timezone,omitempty"` Enabled *bool `json:"enabled,omitempty"` Rotations []Rotation `json:"rotations,omitempty"` }
CreateScheduleRequest provides necessary parameter structure for creating Schedule
type CreateScheduleResponse ¶
type CreateScheduleResponse struct { Id string `json:"id"` Status string `json:"status"` Code int `json:"code"` }
Create schedule response structure
type DeleteScheduleRequest ¶
type DeleteScheduleRequest struct { APIKey string `url:"apiKey,omitempty"` Id string `url:"id,omitempty"` Name string `url:"name,omitempty"` }
DeleteScheduleRequest provides necessary parameter structure for deleting an Schedule
type DeleteScheduleResponse ¶
Delete schedule response structure
type GetScheduleRequest ¶
type GetScheduleRequest struct { APIKey string `url:"apiKey,omitempty"` Id string `url:"id,omitempty"` Name string `url:"name,omitempty"` }
GetScheduleRequest provides necessary parameter structure for requesting Schedule information
type GetScheduleResponse ¶
type GetScheduleResponse struct { Id string `json:"id,omitempty"` Name string `json:"name,omitempty"` Team string `json:"team,omitempty"` Rules []RotationInfo `json:"rules,omitempty"` }
Get schedule structure
type GetTimelineScheduleRequest ¶
type GetTimelineScheduleRequest struct { APIKey string `url:"apiKey,omitempty"` Id string `url:"id,omitempty"` Name string `url:"name,omitempty"` Interval int `url:"interval,omitempty"` IntervalUnit string `url:"intervalUnit,omitempty"` Date string `url:"date,omitempty"` }
GetScheduleTimelineRequest provides necessary parameter structure for requesting Schedule Timeline information
type GetTimelineScheduleResponse ¶
type GetTimelineScheduleResponse struct { Schedule TimelineScheduleResponse `json:"schedule,omitempty"` Took int `json:"took,omitempty"` Timeline TimelineTimelineResponse `json:"timeline,omitempty"` }
Get Timeline schedule structure
type ListSchedulesRequest ¶
type ListSchedulesRequest struct {
APIKey string `url:"apiKey,omitempty"`
}
ListScheduleRequest provides necessary parameter structure for listing Schedules
type ListSchedulesResponse ¶
type ListSchedulesResponse struct {
Schedules []GetScheduleResponse `json:"schedules,omitempty"`
}
List schedule response structure
type Participant ¶
type Participant struct { Participant string `json:"participant,omitempty"` Type string `json:"type,omitempty"` }
Participant
type Periods ¶
type Periods struct { StartTime uint64 `json:"startTime,omitempty"` EndTime uint64 `json:"endTime,omitempty"` Type string `json:"type,omitempty"` FromUsers []FromUsers `json:"fromUsers,omitempty"` Recipients []Recipients `json:"recipients,omitempty"` }
type Recipients ¶
type Restriction ¶
type Restriction struct { StartDay string `json:"startDay,omitempty"` StartTime string `json:"startTime,omitempty"` EndDay string `json:"endDay,omitempty"` EndTime string `json:"endTime,omitempty"` }
Restrictions defines the structure for each rotation restrictions
type Rotation ¶
type Rotation struct { StartDate string `json:"startDate,omitempty"` EndDate string `json:"endDate,omitempty"` RotationType string `json:"rotationType,omitempty"` Participants []string `json:"participants,omitempty"` Name string `json:"name,omitempty"` RotationLength int `json:"rotationLength,omitempty"` Restrictions []Restriction `json:"restrictions,omitempty"` }
Rotation defines the structure for each rotation definition
type RotationInfo ¶
type RotationInfo struct { Id string `json:"id,omitempty"` StartDate string `json:"startDate,omitempty"` EndDate string `json:"endDate,omitempty"` RotationType string `json:"rotationType,omitempty"` Participants []Participant `json:"participants,omitempty"` Name string `json:"name,omitempty"` RotationLength int `json:"rotationLength,omitempty"` Restrictions []Restriction `json:"restrictions,omitempty"` }
RotationInfo defines the structure for each rotation definition
type TimelineFinalScheduleResponse ¶
type TimelineFinalScheduleResponse struct {
Rotations []TimelineRotation `json:"rotations,omitempty"`
}
type TimelineRotation ¶
type TimelineRotation struct { Name string `json:"name,omitempty"` Id string `json:"id,omitempty"` Order float64 `json:"order,omitempty"` Periods []Periods `json:"periods,omitempty"` }
Rotation defines the structure for each rotation definition
type TimelineTimelineResponse ¶
type TimelineTimelineResponse struct { StartTime uint64 `json:"startTime,omitempty"` EndTime uint64 `json:"endTime,omitempty"` FinalSchedule TimelineFinalScheduleResponse `json:"finalSchedule,omitempty"` }
type UpdateScheduleRequest ¶
type UpdateScheduleRequest struct { Id string `json:"id,omitempty"` APIKey string `json:"apiKey,omitempty"` Name string `json:"name,omitempty"` Timezone string `json:"timezone,omitempty"` Enabled *bool `json:"enabled,omitempty"` Rotations []Rotation `json:"rotations,omitempty"` }
UpdateScheduleRequest provides necessary parameter structure for updating an Schedule
type UpdateScheduleResponse ¶
Update schedule response structure
type WhoIsOnCallParticipant ¶
type WhoIsOnCallParticipant struct { Name string `json:"name"` Type string `json:"type"` Forwarded bool `json:"forwarded,omitempty"` Participants []*WhoIsOnCallParticipant `json:"participants,omitempty"` NotifyType string `json:"notifyType,omitempty"` }
WhoIsOnCallParticipant
type WhoIsOnCallRequest ¶
type WhoIsOnCallRequest struct { APIKey string `url:"apiKey,omitempty"` Id string `url:"id,omitempty"` Name string `url:"name,omitempty"` Timezone string `url:"timezone,omitempty"` Time string `url:"time,omitempty"` Flat string `url:"flat,omitempty"` }
WhoIsOnCallRequest provides necessary parameter structure for requesting who is on call for a specific schedule
type WhoIsOnCallResponse ¶
type WhoIsOnCallResponse struct { Id string `json:"id"` Name string `json:"name"` Type string `json:"type"` Participants []WhoIsOnCallParticipant `json:"participants,omitempty"` Recipients []string `json:"recipients,omitempty"` IsEnabled bool `json:"isEnabled,omitempty"` }
WhoIsOnCall response structure