Documentation ¶
Index ¶
- Constants
- Variables
- type APIClient
- func (c *APIClient) Environments() EnvironmentsClient
- func (c *APIClient) EscalationPolicies() EscalationPolicies
- func (c *APIClient) Functionalities() FunctionalitiesClient
- func (c *APIClient) GetSchedules(ctx context.Context, params GetScheduleParams) (*ScheduleResponse, error)
- func (c *APIClient) GetUsers(ctx context.Context, params GetUserParams) (*UserResponse, error)
- func (c *APIClient) IncidentRoles() IncidentRolesClient
- func (c *APIClient) OnCallSchedules() OnCallSchedules
- func (c *APIClient) Ping(ctx context.Context) (*PingResponse, error)
- func (c *APIClient) Priorities() PrioritiesClient
- func (c *APIClient) RunbookActions() RunbookActionsClient
- func (c *APIClient) Runbooks() RunbooksClient
- func (c *APIClient) ServiceDependencies() ServiceDependenciesClient
- func (c *APIClient) Services() ServicesClient
- func (c *APIClient) Severities() SeveritiesClient
- func (c *APIClient) SignalsRules() SignalsRules
- func (c *APIClient) SlackChannels() SlackChannelsClient
- func (c *APIClient) TaskLists() TaskListsClient
- func (c *APIClient) Teams() TeamsClient
- type APIError
- type Actor
- type Client
- type CreateEnvironmentRequest
- type CreateEscalationPolicyHandoffStep
- type CreateEscalationPolicyRequest
- type CreateFunctionalityRequest
- type CreateIncidentRoleRequest
- type CreateOnCallScheduleRequest
- type CreatePriorityRequest
- type CreateRunbookRequest
- type CreateServiceDependencyRequest
- type CreateServiceRequest
- type CreateSeverityRequest
- type CreateSignalsRuleRequest
- type CreateTaskListRequest
- type CreateTeamRequest
- type EnvironmentResponse
- type EnvironmentsClient
- type EscalationPolicies
- type EscalationPolicyHandoffStep
- type EscalationPolicyResponse
- type EscalationPolicyStep
- type EscalationPolicyStepTarget
- type EscalationPolicyStepWithTarget
- type EscalationPolicyTarget
- type ExternalResource
- type FunctionalitiesClient
- type FunctionalityResponse
- type FunctionalityService
- type GetScheduleParams
- type GetUserParams
- type IncidentRoleResponse
- type IncidentRolesClient
- type Integration
- type LabelsSelector
- type Membership
- type MembershipResponse
- type OnCallScheduleMember
- type OnCallScheduleResponse
- type OnCallScheduleRestriction
- type OnCallScheduleStrategy
- type OnCallSchedules
- type OptFunc
- type Pagination
- type PingResponse
- type PrioritiesClient
- type PriorityResponse
- type RESTEnvironmentsClient
- func (c *RESTEnvironmentsClient) Create(ctx context.Context, req CreateEnvironmentRequest) (*EnvironmentResponse, error)
- func (c *RESTEnvironmentsClient) Delete(ctx context.Context, id string) error
- func (c *RESTEnvironmentsClient) Get(ctx context.Context, id string) (*EnvironmentResponse, error)
- func (c *RESTEnvironmentsClient) Update(ctx context.Context, id string, req UpdateEnvironmentRequest) (*EnvironmentResponse, error)
- type RESTEscalationPoliciesClient
- func (c *RESTEscalationPoliciesClient) Create(ctx context.Context, teamID string, createReq CreateEscalationPolicyRequest) (*EscalationPolicyResponse, error)
- func (c *RESTEscalationPoliciesClient) Delete(ctx context.Context, teamID, id string) error
- func (c *RESTEscalationPoliciesClient) Get(ctx context.Context, teamID, id string) (*EscalationPolicyResponse, error)
- func (c *RESTEscalationPoliciesClient) Update(ctx context.Context, teamID, id string, ...) (*EscalationPolicyResponse, error)
- type RESTFunctionalitiesClient
- func (c *RESTFunctionalitiesClient) Create(ctx context.Context, req CreateFunctionalityRequest) (*FunctionalityResponse, error)
- func (c *RESTFunctionalitiesClient) Delete(ctx context.Context, id string) error
- func (c *RESTFunctionalitiesClient) Get(ctx context.Context, id string) (*FunctionalityResponse, error)
- func (c *RESTFunctionalitiesClient) Update(ctx context.Context, id string, req UpdateFunctionalityRequest) (*FunctionalityResponse, error)
- type RESTIncidentRolesClient
- func (c *RESTIncidentRolesClient) Create(ctx context.Context, createReq CreateIncidentRoleRequest) (*IncidentRoleResponse, error)
- func (c *RESTIncidentRolesClient) Delete(ctx context.Context, id string) error
- func (c *RESTIncidentRolesClient) Get(ctx context.Context, id string) (*IncidentRoleResponse, error)
- func (c *RESTIncidentRolesClient) Update(ctx context.Context, id string, updateReq UpdateIncidentRoleRequest) (*IncidentRoleResponse, error)
- type RESTOnCallSchedulesClient
- func (c *RESTOnCallSchedulesClient) Create(ctx context.Context, teamID string, createReq CreateOnCallScheduleRequest) (*OnCallScheduleResponse, error)
- func (c *RESTOnCallSchedulesClient) Delete(ctx context.Context, teamID, id string) error
- func (c *RESTOnCallSchedulesClient) Get(ctx context.Context, teamID, id string) (*OnCallScheduleResponse, error)
- func (c *RESTOnCallSchedulesClient) Update(ctx context.Context, teamID, id string, updateReq UpdateOnCallScheduleRequest) (*OnCallScheduleResponse, error)
- type RESTPrioritiesClient
- func (c *RESTPrioritiesClient) Create(ctx context.Context, createReq CreatePriorityRequest) (*PriorityResponse, error)
- func (c *RESTPrioritiesClient) Delete(ctx context.Context, slug string) error
- func (c *RESTPrioritiesClient) Get(ctx context.Context, slug string) (*PriorityResponse, error)
- func (c *RESTPrioritiesClient) Update(ctx context.Context, slug string, updateReq UpdatePriorityRequest) (*PriorityResponse, error)
- type RESTRunbookActionsClient
- type RESTRunbooksClient
- func (c *RESTRunbooksClient) Create(ctx context.Context, createReq CreateRunbookRequest) (*RunbookResponse, error)
- func (c *RESTRunbooksClient) Delete(ctx context.Context, id string) error
- func (c *RESTRunbooksClient) Get(ctx context.Context, id string) (*RunbookResponse, error)
- func (c *RESTRunbooksClient) Update(ctx context.Context, id string, updateReq UpdateRunbookRequest) (*RunbookResponse, error)
- type RESTServiceDependenciesClient
- func (c *RESTServiceDependenciesClient) Create(ctx context.Context, createReq CreateServiceDependencyRequest) (*ServiceDependencyResponse, error)
- func (c *RESTServiceDependenciesClient) Delete(ctx context.Context, id string) error
- func (c *RESTServiceDependenciesClient) Get(ctx context.Context, id string) (*ServiceDependencyResponse, error)
- func (c *RESTServiceDependenciesClient) Update(ctx context.Context, id string, updateReq UpdateServiceDependencyRequest) (*ServiceDependencyResponse, error)
- type RESTServicesClient
- func (c *RESTServicesClient) Create(ctx context.Context, createReq CreateServiceRequest) (*ServiceResponse, error)
- func (c *RESTServicesClient) Delete(ctx context.Context, serviceID string) error
- func (c *RESTServicesClient) Get(ctx context.Context, id string) (*ServiceResponse, error)
- func (c *RESTServicesClient) List(ctx context.Context, req *ServiceQuery) (*ServicesResponse, error)
- func (c *RESTServicesClient) Update(ctx context.Context, serviceID string, updateReq UpdateServiceRequest) (*ServiceResponse, error)
- type RESTSeveritiesClient
- func (c *RESTSeveritiesClient) Create(ctx context.Context, createReq CreateSeverityRequest) (*SeverityResponse, error)
- func (c *RESTSeveritiesClient) Delete(ctx context.Context, slug string) error
- func (c *RESTSeveritiesClient) Get(ctx context.Context, slug string) (*SeverityResponse, error)
- func (c *RESTSeveritiesClient) Update(ctx context.Context, slug string, updateReq UpdateSeverityRequest) (*SeverityResponse, error)
- type RESTSignalsRulesClient
- func (c *RESTSignalsRulesClient) Create(ctx context.Context, teamID string, createReq CreateSignalsRuleRequest) (*SignalsRuleResponse, error)
- func (c *RESTSignalsRulesClient) Delete(ctx context.Context, teamID, id string) error
- func (c *RESTSignalsRulesClient) Get(ctx context.Context, teamID, id string) (*SignalsRuleResponse, error)
- func (c *RESTSignalsRulesClient) Update(ctx context.Context, teamID, id string, updateReq UpdateSignalsRuleRequest) (*SignalsRuleResponse, error)
- type RESTSlackChannelsClient
- type RESTTaskListsClient
- func (c *RESTTaskListsClient) Create(ctx context.Context, createReq CreateTaskListRequest) (*TaskListResponse, error)
- func (c *RESTTaskListsClient) Delete(ctx context.Context, id string) error
- func (c *RESTTaskListsClient) Get(ctx context.Context, id string) (*TaskListResponse, error)
- func (c *RESTTaskListsClient) Update(ctx context.Context, id string, updateReq UpdateTaskListRequest) (*TaskListResponse, error)
- type RESTTeamsClient
- func (c *RESTTeamsClient) Archive(ctx context.Context, slug string) error
- func (c *RESTTeamsClient) Create(ctx context.Context, createReq CreateTeamRequest) (*TeamResponse, error)
- func (c *RESTTeamsClient) Get(ctx context.Context, id string) (*TeamResponse, error)
- func (c *RESTTeamsClient) List(ctx context.Context, req *TeamQuery) (*TeamsResponse, error)
- func (c *RESTTeamsClient) Update(ctx context.Context, slug string, updateReq UpdateTeamRequest) (*TeamResponse, error)
- type RunbookAction
- type RunbookActionsClient
- type RunbookActionsQuery
- type RunbookActionsResponse
- type RunbookRelation
- type RunbookResponse
- type RunbookStep
- type RunbookTeam
- type RunbookType
- type RunbooksClient
- type Schedule
- type ScheduleResponse
- type ServiceDependenciesClient
- type ServiceDependencyResponse
- type ServiceDependencyService
- type ServiceLink
- type ServiceQuery
- type ServiceResponse
- type ServiceTeam
- type ServicesClient
- type ServicesResponse
- type SeveritiesClient
- type SeverityResponse
- type SeverityType
- type SignalRuleTarget
- type SignalsRuleResponse
- type SignalsRules
- type SlackChannelParams
- type SlackChannelResponse
- type SlackChannelsClient
- type SlackChannelsResponse
- type TaskListItem
- type TaskListResponse
- type TaskListsClient
- type TeamQuery
- type TeamResponse
- type TeamService
- type TeamsClient
- type TeamsResponse
- type UpdateEnvironmentRequest
- type UpdateEscalationPolicyRequest
- type UpdateFunctionalityRequest
- type UpdateIncidentRoleRequest
- type UpdateOnCallScheduleRequest
- type UpdatePriorityRequest
- type UpdateRunbookRequest
- type UpdateServiceDependencyRequest
- type UpdateServiceRequest
- type UpdateSeverityRequest
- type UpdateSignalsRuleRequest
- type UpdateTaskListRequest
- type UpdateTeamRequest
- type User
- type UserResponse
Constants ¶
const ( // Version is the semver of this provider Version = "0.3.6" // UserAgentPrefix is the prefix of the User-Agent header that all terraform REST calls perform UserAgentPrefix = "firehydrant-terraform-provider" )
const (
// DefaultBaseURL is the URL that is used to make requests to the FireHydrant API
DefaultBaseURL = "https://api.firehydrant.io/v1/"
)
const RunbookAttachmentRuleDefaultJSON = `
{
"logic": {
"manually": [
{
"var": "when_invoked"
}
]
},
"user_data": {}
}`
Variables ¶
var ( ErrorNotFound = errors.New("resource not found") )
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient struct {
// contains filtered or unexported fields
}
APIClient is the client that accesses all of the api.firehydrant.io resources
func NewRestClient ¶
NewRestClient initializes a new API client for FireHydrant
func (*APIClient) Environments ¶ added in v0.3.0
func (c *APIClient) Environments() EnvironmentsClient
Environments returns a EnvironmentsClient interface for interacting with environments in FireHydrant
func (*APIClient) EscalationPolicies ¶ added in v0.4.0
func (c *APIClient) EscalationPolicies() EscalationPolicies
func (*APIClient) Functionalities ¶ added in v0.3.0
func (c *APIClient) Functionalities() FunctionalitiesClient
Functionalities returns a FunctionalitiesClient interface for interacting with functionalities in FireHydrant
func (*APIClient) GetSchedules ¶ added in v0.3.2
func (c *APIClient) GetSchedules(ctx context.Context, params GetScheduleParams) (*ScheduleResponse, error)
GetSchedules gets matching schedules in FireHydrant
func (*APIClient) GetUsers ¶ added in v0.3.2
func (c *APIClient) GetUsers(ctx context.Context, params GetUserParams) (*UserResponse, error)
GetUsers gets matching users in FireHydrant
func (*APIClient) IncidentRoles ¶ added in v0.3.0
func (c *APIClient) IncidentRoles() IncidentRolesClient
IncidentRoles returns a IncidentRolesClient interface for interacting with incident roles in FireHydrant
func (*APIClient) OnCallSchedules ¶ added in v0.4.0
func (c *APIClient) OnCallSchedules() OnCallSchedules
func (*APIClient) Ping ¶
func (c *APIClient) Ping(ctx context.Context) (*PingResponse, error)
Ping hits and verifies the HTTP of FireHydrant
func (*APIClient) Priorities ¶ added in v0.3.0
func (c *APIClient) Priorities() PrioritiesClient
Priorities returns a PrioritiesClient interface for interacting with priorities in FireHydrant
func (*APIClient) RunbookActions ¶
func (c *APIClient) RunbookActions() RunbookActionsClient
RunbookActions returns a RunbookActionsClient interface for interacting with runbook actions in FireHydrant
func (*APIClient) Runbooks ¶
func (c *APIClient) Runbooks() RunbooksClient
Runbooks returns a RunbooksClient interface for interacting with runbooks in FireHydrant
func (*APIClient) ServiceDependencies ¶ added in v0.3.0
func (c *APIClient) ServiceDependencies() ServiceDependenciesClient
ServiceDependencies returns a ServiceDependenciesClient interface for interacting with service dependencies in FireHydrant
func (*APIClient) Services ¶
func (c *APIClient) Services() ServicesClient
Services returns a ServicesClient interface for interacting with services in FireHydrant
func (*APIClient) Severities ¶ added in v0.3.0
func (c *APIClient) Severities() SeveritiesClient
Severities returns a SeveritiesClient interface for interacting with severities in FireHydrant
func (*APIClient) SignalsRules ¶ added in v0.4.0
func (c *APIClient) SignalsRules() SignalsRules
SignalsRules returns a SignalsRules interface for interacting with signals rules in FireHydrant
func (*APIClient) SlackChannels ¶ added in v0.6.0
func (c *APIClient) SlackChannels() SlackChannelsClient
SlackChannels returns a SlackChannelsClient interface for interacting with slack channels in FireHydrant
func (*APIClient) TaskLists ¶ added in v0.3.0
func (c *APIClient) TaskLists() TaskListsClient
TaskLists returns a TaskListsClient interface for interacting with task lists in FireHydrant
func (*APIClient) Teams ¶ added in v0.3.4
func (c *APIClient) Teams() TeamsClient
Teams returns a TeamsClient interface for interacting with teams in FireHydrant
type APIError ¶ added in v0.3.0
type Actor ¶
type Actor struct { ID string `json:"id"` Name string `json:"name"` Email string `json:"email"` Type string `json:"type"` }
Actor represents an actor doing things in the FireHydrant API
type Client ¶
type Client interface { Ping(ctx context.Context) (*PingResponse, error) Environments() EnvironmentsClient Functionalities() FunctionalitiesClient IncidentRoles() IncidentRolesClient Priorities() PrioritiesClient Runbooks() RunbooksClient RunbookActions() RunbookActionsClient ServiceDependencies() ServiceDependenciesClient Services() ServicesClient Severities() SeveritiesClient TaskLists() TaskListsClient Teams() TeamsClient SlackChannels() SlackChannelsClient // Users GetUsers(ctx context.Context, params GetUserParams) (*UserResponse, error) // Schedules GetSchedules(ctx context.Context, params GetScheduleParams) (*ScheduleResponse, error) // Signals SignalsRules() SignalsRules OnCallSchedules() OnCallSchedules EscalationPolicies() EscalationPolicies }
Client is the client that makes requests to FireHydrant
type CreateEnvironmentRequest ¶
type CreateEnvironmentRequest struct { Name string `json:"name"` Description string `json:"description"` }
CreateEnvironmentRequest is the payload for creating a service URL: POST https://api.firehydrant.io/v1/services
type CreateEscalationPolicyHandoffStep ¶ added in v0.4.1
type CreateEscalationPolicyRequest ¶ added in v0.4.0
type CreateEscalationPolicyRequest struct { Name string `json:"name"` Description string `json:"description"` Default bool `json:"default"` Repetitions int `json:"repetitions"` Steps []EscalationPolicyStep `json:"steps"` HandoffStep *CreateEscalationPolicyHandoffStep `json:"handoff_step,omitempty"` }
type CreateFunctionalityRequest ¶
type CreateFunctionalityRequest struct { Name string `json:"name"` Description string `json:"description"` Services []FunctionalityService `json:"services,omitempty"` Labels map[string]string `json:"labels"` }
CreateFunctionalityRequest is the payload for creating a service URL: POST https://api.firehydrant.io/v1/services
type CreateIncidentRoleRequest ¶ added in v0.3.0
type CreateIncidentRoleRequest struct { Name string `json:"name"` Description string `json:"description"` Summary string `json:"summary"` }
CreateIncidentRoleRequest is the payload for creating an incident role URL: POST https://api.firehydrant.io/v1/incident_roles
type CreateOnCallScheduleRequest ¶ added in v0.4.0
type CreateOnCallScheduleRequest struct { Name string `json:"name"` Description string `json:"description"` TimeZone string `json:"time_zone"` Strategy OnCallScheduleStrategy `json:"strategy"` Restrictions []OnCallScheduleRestriction `json:"restrictions"` MemberIDs []string `json:"member_ids"` // StartTime is only required for `custom` strategy. // ISO8601 / Go RFC3339 format. StartTime string `json:"start_time,omitempty"` }
type CreatePriorityRequest ¶ added in v0.3.0
type CreatePriorityRequest struct { Slug string `json:"slug"` Description string `json:"description"` Default bool `json:"default"` }
CreatePriorityRequest is the payload for creating a priority URL: POST https://api.firehydrant.io/v1/priorities
type CreateRunbookRequest ¶
type CreateRunbookRequest struct { Name string `json:"name"` Type string `json:"type"` Restricted bool `json:"auto_attach_to_restricted_incidents,omitempty"` Description string `json:"description"` Owner *RunbookTeam `json:"owner,omitempty"` AttachmentRule map[string]interface{} `json:"attachment_rule,omitempty"` Severities []RunbookRelation `json:"severities"` Steps []RunbookStep `json:"steps,omitempty"` }
CreateRunbookRequest is the payload for creating a service URL: POST https://api.firehydrant.io/v1/runbooks
type CreateServiceDependencyRequest ¶ added in v0.3.0
type CreateServiceDependencyRequest struct { ConnectedServiceID string `json:"connected_service_id"` ServiceID string `json:"service_id"` Notes string `json:"notes,omitempty"` }
CreateServiceDependencyRequest is the payload for creating a service dependency URL: POST https://api.firehydrant.io/v1/service_dependencies
type CreateServiceRequest ¶
type CreateServiceRequest struct { AlertOnAdd bool `json:"alert_on_add,omitempty"` AutoAddRespondingTeam bool `json:"auto_add_responding_team,omitempty"` Description string `json:"description"` Labels map[string]string `json:"labels,omitempty"` Links []ServiceLink `json:"links,omitempty"` Name string `json:"name"` Owner *ServiceTeam `json:"owner,omitempty"` ServiceTier int `json:"service_tier,int,omitempty"` Teams []ServiceTeam `json:"teams,omitempty"` ExternalResources []ExternalResource `json:"external_resources,omitempty"` }
CreateServiceRequest is the payload for creating a service URL: POST https://api.firehydrant.io/v1/services
type CreateSeverityRequest ¶
type CreateSeverityRequest struct { Slug string `json:"slug"` Description string `json:"description"` Type string `json:"type"` }
CreateSeverityRequest is the payload for creating a severity URL: POST https://api.firehydrant.io/v1/severities
type CreateSignalsRuleRequest ¶ added in v0.4.0
type CreateTaskListRequest ¶ added in v0.3.0
type CreateTaskListRequest struct { Name string `json:"name"` Description string `json:"description"` TaskListItems []TaskListItem `json:"task_list_items"` }
CreateTaskListRequest is the payload for creating a task list URL: POST https://api.firehydrant.io/v1/task_lists
type CreateTeamRequest ¶
type CreateTeamRequest struct { Name string `json:"name"` Description string `json:"description"` Slug string `json:"slug,omitempty"` Memberships []Membership `json:"memberships,omitempty"` }
CreateTeamRequest is the payload for creating a service URL: POST https://api.firehydrant.io/v1/services
type EnvironmentResponse ¶
type EnvironmentResponse struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Slug string `json:"slug"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
EnvironmentResponse is the payload for a single environment URL: GET https://api.firehydrant.io/v1/environments/{id}
type EnvironmentsClient ¶ added in v0.3.0
type EnvironmentsClient interface { Get(ctx context.Context, id string) (*EnvironmentResponse, error) Create(ctx context.Context, createReq CreateEnvironmentRequest) (*EnvironmentResponse, error) Update(ctx context.Context, id string, updateReq UpdateEnvironmentRequest) (*EnvironmentResponse, error) Delete(ctx context.Context, id string) error }
EnvironmentsClient is an interface for interacting with environments on FireHydrant
type EscalationPolicies ¶ added in v0.4.0
type EscalationPolicies interface { Get(ctx context.Context, teamID, id string) (*EscalationPolicyResponse, error) Create(ctx context.Context, teamID string, createReq CreateEscalationPolicyRequest) (*EscalationPolicyResponse, error) Update(ctx context.Context, teamID, id string, updateReq UpdateEscalationPolicyRequest) (*EscalationPolicyResponse, error) Delete(ctx context.Context, teamID, id string) error }
type EscalationPolicyHandoffStep ¶ added in v0.4.0
type EscalationPolicyHandoffStep struct {
Target EscalationPolicyTarget `json:"target"`
}
type EscalationPolicyResponse ¶ added in v0.4.0
type EscalationPolicyResponse struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Default bool `json:"default"` Repetitions int `json:"repetitions"` Steps []EscalationPolicyStepWithTarget `json:"steps"` HandoffStep *EscalationPolicyHandoffStep `json:"handoff_step"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type EscalationPolicyStep ¶ added in v0.4.0
type EscalationPolicyStep struct { ID string `json:"id"` Position int `json:"position"` Timeout string `json:"timeout"` Targets []EscalationPolicyTarget `json:"targets"` }
type EscalationPolicyStepTarget ¶ added in v0.4.0
type EscalationPolicyStepWithTarget ¶ added in v0.4.0
type EscalationPolicyStepWithTarget struct { ID string `json:"id"` Position int `json:"position"` Timeout string `json:"timeout"` Targets []EscalationPolicyTarget `json:"targets"` }
type EscalationPolicyTarget ¶ added in v0.4.0
type ExternalResource ¶ added in v0.3.3
type ExternalResource struct { RemoteID string `json:"remote_id"` ConnectionType string `json:"connection_type,omitempty"` }
ExternalResource is a nested object to link services to things like PagerDuty services
type FunctionalitiesClient ¶ added in v0.3.0
type FunctionalitiesClient interface { Get(ctx context.Context, id string) (*FunctionalityResponse, error) Create(ctx context.Context, createReq CreateFunctionalityRequest) (*FunctionalityResponse, error) Update(ctx context.Context, id string, updateReq UpdateFunctionalityRequest) (*FunctionalityResponse, error) Delete(ctx context.Context, id string) error }
FunctionalitiesClient is an interface for interacting with task lists on FireHydrant
type FunctionalityResponse ¶
type FunctionalityResponse struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Slug string `json:"slug"` Services []FunctionalityService `json:"services"` Labels map[string]string `json:"labels"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
FunctionalityResponse is the payload for a single environment URL: GET https://api.firehydrant.io/v1/functionalities/{id}
type FunctionalityService ¶
type FunctionalityService struct {
ID string `json:"id"`
}
FunctionalityService represents a service when creating a functionality
type GetScheduleParams ¶ added in v0.3.2
type GetScheduleParams struct {
Query string `url:"query,omitempty"`
}
ScheduleResponse is the payload for a schedule URL: GET https://api.firehydrant.io/v1/schedules
type GetUserParams ¶ added in v0.3.2
UserResponse is the payload for a user URL: GET https://api.firehydrant.io/v1/users
type IncidentRoleResponse ¶ added in v0.3.0
type IncidentRoleResponse struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Summary string `json:"summary"` CreatedAt time.Time `json:"created_at"` DiscardedAt time.Time `json:"discarded_at"` UpdatedAt time.Time `json:"updated_at"` }
IncidentRoleResponse is the payload for retrieving an incident role URL: GET https://api.firehydrant.io/v1/incident_roles/{id}
type IncidentRolesClient ¶ added in v0.3.0
type IncidentRolesClient interface { Get(ctx context.Context, id string) (*IncidentRoleResponse, error) Create(ctx context.Context, createReq CreateIncidentRoleRequest) (*IncidentRoleResponse, error) Update(ctx context.Context, id string, updateReq UpdateIncidentRoleRequest) (*IncidentRoleResponse, error) Delete(ctx context.Context, id string) error }
IncidentRolesClient is an interface for interacting with incident roles on FireHydrant
type Integration ¶ added in v0.2.0
type LabelsSelector ¶
func (LabelsSelector) EncodeValues ¶
func (sq LabelsSelector) EncodeValues(key string, v *url.Values) error
EncodeValues implements Encoder https://github.com/google/go-querystring/blob/v1.0.0/query/encode.go#L39
type Membership ¶ added in v0.3.2
type Membership struct { IncidentRoleId string `json:"incident_role_id,omitempty"` ScheduleId string `json:"schedule_id,omitempty"` UserId string `json:"user_id,omitempty"` }
Membership represents a user_id or schedule_id along with a incident_role_id for a team membership resource
type MembershipResponse ¶ added in v0.3.2
type MembershipResponse struct { DefaultIncidentRole IncidentRoleResponse `json:"default_incident_role,omitempty"` Schedule Schedule `json:"schedule,omitempty"` User User `json:"user,omitempty"` }
MembershipResponse represents the response coming back from teams for membership
type OnCallScheduleMember ¶ added in v0.4.0
type OnCallScheduleResponse ¶ added in v0.4.0
type OnCallScheduleResponse struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` TimeZone string `json:"time_zone"` Strategy OnCallScheduleStrategy `json:"strategy"` Members []OnCallScheduleMember `json:"members"` Restrictions []OnCallScheduleRestriction `json:"restrictions"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type OnCallScheduleRestriction ¶ added in v0.4.0
type OnCallScheduleStrategy ¶ added in v0.4.0
type OnCallSchedules ¶ added in v0.4.0
type OnCallSchedules interface { Get(ctx context.Context, teamID, id string) (*OnCallScheduleResponse, error) Create(ctx context.Context, teamID string, createReq CreateOnCallScheduleRequest) (*OnCallScheduleResponse, error) Update(ctx context.Context, teamID, id string, updateReq UpdateOnCallScheduleRequest) (*OnCallScheduleResponse, error) Delete(ctx context.Context, teamID, id string) error }
type OptFunc ¶
OptFunc is a function that sets a setting on a client
func WithBaseURL ¶
WithBaseURL modifies the base URL for all requests
func WithUserAgentSuffix ¶ added in v0.2.0
type Pagination ¶ added in v0.3.4
type PingResponse ¶
type PingResponse struct {
Actor Actor `json:"actor"`
}
PingResponse is the response the ping endpoint gives from FireHydrant URL: GET https://api.firehydrant.io/v1/ping
type PrioritiesClient ¶ added in v0.3.0
type PrioritiesClient interface { Get(ctx context.Context, slug string) (*PriorityResponse, error) Create(ctx context.Context, createReq CreatePriorityRequest) (*PriorityResponse, error) Update(ctx context.Context, slug string, updateReq UpdatePriorityRequest) (*PriorityResponse, error) Delete(ctx context.Context, slug string) error }
PrioritiesClient is an interface for interacting with priorities on FireHydrant
type PriorityResponse ¶ added in v0.3.0
type PriorityResponse struct { Slug string `json:"slug"` Description string `json:"description"` Default bool `json:"default"` }
PriorityResponse is the payload for a single priority URL: GET https://api.firehydrant.io/v1/priorities/{id}
type RESTEnvironmentsClient ¶ added in v0.3.0
type RESTEnvironmentsClient struct {
// contains filtered or unexported fields
}
RESTEnvironmentsClient implements the EnvironmentsClient interface
func (*RESTEnvironmentsClient) Create ¶ added in v0.3.0
func (c *RESTEnvironmentsClient) Create(ctx context.Context, req CreateEnvironmentRequest) (*EnvironmentResponse, error)
Create creates an environment in FireHydrant
func (*RESTEnvironmentsClient) Delete ¶ added in v0.3.0
func (c *RESTEnvironmentsClient) Delete(ctx context.Context, id string) error
Delete deletes a environment from FireHydrant
func (*RESTEnvironmentsClient) Get ¶ added in v0.3.0
func (c *RESTEnvironmentsClient) Get(ctx context.Context, id string) (*EnvironmentResponse, error)
Get retrieves an environment from FireHydrant
func (*RESTEnvironmentsClient) Update ¶ added in v0.3.0
func (c *RESTEnvironmentsClient) Update(ctx context.Context, id string, req UpdateEnvironmentRequest) (*EnvironmentResponse, error)
Update updates a environment in FireHydrant
type RESTEscalationPoliciesClient ¶ added in v0.4.0
type RESTEscalationPoliciesClient struct {
// contains filtered or unexported fields
}
func (*RESTEscalationPoliciesClient) Create ¶ added in v0.4.0
func (c *RESTEscalationPoliciesClient) Create(ctx context.Context, teamID string, createReq CreateEscalationPolicyRequest) (*EscalationPolicyResponse, error)
func (*RESTEscalationPoliciesClient) Delete ¶ added in v0.4.0
func (c *RESTEscalationPoliciesClient) Delete(ctx context.Context, teamID, id string) error
func (*RESTEscalationPoliciesClient) Get ¶ added in v0.4.0
func (c *RESTEscalationPoliciesClient) Get(ctx context.Context, teamID, id string) (*EscalationPolicyResponse, error)
func (*RESTEscalationPoliciesClient) Update ¶ added in v0.4.0
func (c *RESTEscalationPoliciesClient) Update(ctx context.Context, teamID, id string, updateReq UpdateEscalationPolicyRequest) (*EscalationPolicyResponse, error)
type RESTFunctionalitiesClient ¶ added in v0.3.0
type RESTFunctionalitiesClient struct {
// contains filtered or unexported fields
}
RESTFunctionalitiesClient implements the FunctionalitiesClient interface
func (*RESTFunctionalitiesClient) Create ¶ added in v0.3.0
func (c *RESTFunctionalitiesClient) Create(ctx context.Context, req CreateFunctionalityRequest) (*FunctionalityResponse, error)
Create creates a functionality in FireHydrant
func (*RESTFunctionalitiesClient) Delete ¶ added in v0.3.0
func (c *RESTFunctionalitiesClient) Delete(ctx context.Context, id string) error
Delete deletes a functionality from FireHydrant
func (*RESTFunctionalitiesClient) Get ¶ added in v0.3.0
func (c *RESTFunctionalitiesClient) Get(ctx context.Context, id string) (*FunctionalityResponse, error)
Get retrieves a functionality from FireHydrant
func (*RESTFunctionalitiesClient) Update ¶ added in v0.3.0
func (c *RESTFunctionalitiesClient) Update(ctx context.Context, id string, req UpdateFunctionalityRequest) (*FunctionalityResponse, error)
Update updates a functionality in FireHydrant
type RESTIncidentRolesClient ¶ added in v0.3.0
type RESTIncidentRolesClient struct {
// contains filtered or unexported fields
}
RESTIncidentRolesClient implements the IncidentRolesClient interface
func (*RESTIncidentRolesClient) Create ¶ added in v0.3.0
func (c *RESTIncidentRolesClient) Create(ctx context.Context, createReq CreateIncidentRoleRequest) (*IncidentRoleResponse, error)
Create creates a brand spankin new incident role in FireHydrant
func (*RESTIncidentRolesClient) Delete ¶ added in v0.3.0
func (c *RESTIncidentRolesClient) Delete(ctx context.Context, id string) error
func (*RESTIncidentRolesClient) Get ¶ added in v0.3.0
func (c *RESTIncidentRolesClient) Get(ctx context.Context, id string) (*IncidentRoleResponse, error)
Get returns an incident role from the FireHydrant API
func (*RESTIncidentRolesClient) Update ¶ added in v0.3.0
func (c *RESTIncidentRolesClient) Update(ctx context.Context, id string, updateReq UpdateIncidentRoleRequest) (*IncidentRoleResponse, error)
Update updates an incident role in FireHydrant
type RESTOnCallSchedulesClient ¶ added in v0.4.0
type RESTOnCallSchedulesClient struct {
// contains filtered or unexported fields
}
func (*RESTOnCallSchedulesClient) Create ¶ added in v0.4.0
func (c *RESTOnCallSchedulesClient) Create(ctx context.Context, teamID string, createReq CreateOnCallScheduleRequest) (*OnCallScheduleResponse, error)
func (*RESTOnCallSchedulesClient) Delete ¶ added in v0.4.0
func (c *RESTOnCallSchedulesClient) Delete(ctx context.Context, teamID, id string) error
func (*RESTOnCallSchedulesClient) Get ¶ added in v0.4.0
func (c *RESTOnCallSchedulesClient) Get(ctx context.Context, teamID, id string) (*OnCallScheduleResponse, error)
func (*RESTOnCallSchedulesClient) Update ¶ added in v0.4.0
func (c *RESTOnCallSchedulesClient) Update(ctx context.Context, teamID, id string, updateReq UpdateOnCallScheduleRequest) (*OnCallScheduleResponse, error)
type RESTPrioritiesClient ¶ added in v0.3.0
type RESTPrioritiesClient struct {
// contains filtered or unexported fields
}
RESTPrioritiesClient implements the PrioritiesClient interface
func (*RESTPrioritiesClient) Create ¶ added in v0.3.0
func (c *RESTPrioritiesClient) Create(ctx context.Context, createReq CreatePriorityRequest) (*PriorityResponse, error)
Create creates a priority
func (*RESTPrioritiesClient) Delete ¶ added in v0.3.0
func (c *RESTPrioritiesClient) Delete(ctx context.Context, slug string) error
Delete deletes a priority from FireHydrant
func (*RESTPrioritiesClient) Get ¶ added in v0.3.0
func (c *RESTPrioritiesClient) Get(ctx context.Context, slug string) (*PriorityResponse, error)
Get retrieves a priority from FireHydrant
func (*RESTPrioritiesClient) Update ¶ added in v0.3.0
func (c *RESTPrioritiesClient) Update(ctx context.Context, slug string, updateReq UpdatePriorityRequest) (*PriorityResponse, error)
Update updates a priority in FireHydrant
type RESTRunbookActionsClient ¶
type RESTRunbookActionsClient struct {
// contains filtered or unexported fields
}
RESTRunbooksClient implements the RunbooksClient interface
func (*RESTRunbookActionsClient) Get ¶
func (c *RESTRunbookActionsClient) Get(ctx context.Context, runbookType string, integrationSlug string, actionSlug string) (*RunbookAction, error)
Get returns a runbook action from the FireHydrant API
type RESTRunbooksClient ¶
type RESTRunbooksClient struct {
// contains filtered or unexported fields
}
RESTRunbooksClient implements the RunbooksClient interface
func (*RESTRunbooksClient) Create ¶
func (c *RESTRunbooksClient) Create(ctx context.Context, createReq CreateRunbookRequest) (*RunbookResponse, error)
Create creates a brand spankin new runbook in FireHydrant
func (*RESTRunbooksClient) Delete ¶
func (c *RESTRunbooksClient) Delete(ctx context.Context, id string) error
func (*RESTRunbooksClient) Get ¶
func (c *RESTRunbooksClient) Get(ctx context.Context, id string) (*RunbookResponse, error)
Get returns a runbook from the FireHydrant API
func (*RESTRunbooksClient) Update ¶
func (c *RESTRunbooksClient) Update(ctx context.Context, id string, updateReq UpdateRunbookRequest) (*RunbookResponse, error)
Update updates a runbook in FireHydrant
type RESTServiceDependenciesClient ¶ added in v0.3.0
type RESTServiceDependenciesClient struct {
// contains filtered or unexported fields
}
RESTServiceDependenciesClient implements the ServiceDependenciesClient interface
func (*RESTServiceDependenciesClient) Create ¶ added in v0.3.0
func (c *RESTServiceDependenciesClient) Create(ctx context.Context, createReq CreateServiceDependencyRequest) (*ServiceDependencyResponse, error)
Create creates a brand spankin new service dependency in FireHydrant
func (*RESTServiceDependenciesClient) Delete ¶ added in v0.3.0
func (c *RESTServiceDependenciesClient) Delete(ctx context.Context, id string) error
func (*RESTServiceDependenciesClient) Get ¶ added in v0.3.0
func (c *RESTServiceDependenciesClient) Get(ctx context.Context, id string) (*ServiceDependencyResponse, error)
Get returns a service dependency from the FireHydrant API
func (*RESTServiceDependenciesClient) Update ¶ added in v0.3.0
func (c *RESTServiceDependenciesClient) Update(ctx context.Context, id string, updateReq UpdateServiceDependencyRequest) (*ServiceDependencyResponse, error)
Update updates a service dependency in FireHydrant
type RESTServicesClient ¶
type RESTServicesClient struct {
// contains filtered or unexported fields
}
RESTServicesClient implements the ServicesClient interface
func (*RESTServicesClient) Create ¶
func (c *RESTServicesClient) Create(ctx context.Context, createReq CreateServiceRequest) (*ServiceResponse, error)
Create creates a brand spankin new service in FireHydrant
func (*RESTServicesClient) Delete ¶
func (c *RESTServicesClient) Delete(ctx context.Context, serviceID string) error
DeleteService updates a old spankin service in FireHydrant
func (*RESTServicesClient) Get ¶
func (c *RESTServicesClient) Get(ctx context.Context, id string) (*ServiceResponse, error)
Get retrieves a service from the FireHydrant API
func (*RESTServicesClient) List ¶
func (c *RESTServicesClient) List(ctx context.Context, req *ServiceQuery) (*ServicesResponse, error)
List retrieves a list of services based on a service query
func (*RESTServicesClient) Update ¶
func (c *RESTServicesClient) Update(ctx context.Context, serviceID string, updateReq UpdateServiceRequest) (*ServiceResponse, error)
UpdateService updates a old spankin service in FireHydrant
type RESTSeveritiesClient ¶ added in v0.3.0
type RESTSeveritiesClient struct {
// contains filtered or unexported fields
}
RESTSeveritiesClient implements the SeveritiesClient interface
func (*RESTSeveritiesClient) Create ¶ added in v0.3.0
func (c *RESTSeveritiesClient) Create(ctx context.Context, createReq CreateSeverityRequest) (*SeverityResponse, error)
Create creates a severity
func (*RESTSeveritiesClient) Delete ¶ added in v0.3.0
func (c *RESTSeveritiesClient) Delete(ctx context.Context, slug string) error
Delete deletes a severity from FireHydrant
func (*RESTSeveritiesClient) Get ¶ added in v0.3.0
func (c *RESTSeveritiesClient) Get(ctx context.Context, slug string) (*SeverityResponse, error)
Get retrieves a severity from FireHydrant
func (*RESTSeveritiesClient) Update ¶ added in v0.3.0
func (c *RESTSeveritiesClient) Update(ctx context.Context, slug string, updateReq UpdateSeverityRequest) (*SeverityResponse, error)
Update updates a severity in FireHydrant
type RESTSignalsRulesClient ¶ added in v0.4.0
type RESTSignalsRulesClient struct {
// contains filtered or unexported fields
}
func (*RESTSignalsRulesClient) Create ¶ added in v0.4.0
func (c *RESTSignalsRulesClient) Create(ctx context.Context, teamID string, createReq CreateSignalsRuleRequest) (*SignalsRuleResponse, error)
func (*RESTSignalsRulesClient) Delete ¶ added in v0.4.0
func (c *RESTSignalsRulesClient) Delete(ctx context.Context, teamID, id string) error
func (*RESTSignalsRulesClient) Get ¶ added in v0.4.0
func (c *RESTSignalsRulesClient) Get(ctx context.Context, teamID, id string) (*SignalsRuleResponse, error)
func (*RESTSignalsRulesClient) Update ¶ added in v0.4.0
func (c *RESTSignalsRulesClient) Update(ctx context.Context, teamID, id string, updateReq UpdateSignalsRuleRequest) (*SignalsRuleResponse, error)
type RESTSlackChannelsClient ¶ added in v0.6.0
type RESTSlackChannelsClient struct {
// contains filtered or unexported fields
}
RESTSlackChannelsClient implements the SlackChannelClient interface
func (*RESTSlackChannelsClient) Get ¶ added in v0.6.0
func (c *RESTSlackChannelsClient) Get(ctx context.Context, params SlackChannelParams) (*SlackChannelResponse, error)
Get retrieves a Slack channel from FireHydrant using Slack ID. This is useful for looking up a Slack channel's internal ID.
type RESTTaskListsClient ¶ added in v0.3.0
type RESTTaskListsClient struct {
// contains filtered or unexported fields
}
RESTTaskListsClient implements the TaskListsClient interface
func (*RESTTaskListsClient) Create ¶ added in v0.3.0
func (c *RESTTaskListsClient) Create(ctx context.Context, createReq CreateTaskListRequest) (*TaskListResponse, error)
Create creates a brand spankin new task list in FireHydrant
func (*RESTTaskListsClient) Delete ¶ added in v0.3.0
func (c *RESTTaskListsClient) Delete(ctx context.Context, id string) error
func (*RESTTaskListsClient) Get ¶ added in v0.3.0
func (c *RESTTaskListsClient) Get(ctx context.Context, id string) (*TaskListResponse, error)
Get returns a task list from the FireHydrant API
func (*RESTTaskListsClient) Update ¶ added in v0.3.0
func (c *RESTTaskListsClient) Update(ctx context.Context, id string, updateReq UpdateTaskListRequest) (*TaskListResponse, error)
Update updates a task list in FireHydrant
type RESTTeamsClient ¶ added in v0.3.4
type RESTTeamsClient struct {
// contains filtered or unexported fields
}
RESTTeamsClient implements the TeamsClient interface
func (*RESTTeamsClient) Archive ¶ added in v0.3.4
func (c *RESTTeamsClient) Archive(ctx context.Context, slug string) error
Archive archives a team in FireHydrant
func (*RESTTeamsClient) Create ¶ added in v0.3.4
func (c *RESTTeamsClient) Create(ctx context.Context, createReq CreateTeamRequest) (*TeamResponse, error)
Create creates a team
func (*RESTTeamsClient) Get ¶ added in v0.3.4
func (c *RESTTeamsClient) Get(ctx context.Context, id string) (*TeamResponse, error)
Get retrieves a team from FireHydrant
func (*RESTTeamsClient) List ¶ added in v0.3.4
func (c *RESTTeamsClient) List(ctx context.Context, req *TeamQuery) (*TeamsResponse, error)
List retrieves a list of teams based on a team query
func (*RESTTeamsClient) Update ¶ added in v0.3.4
func (c *RESTTeamsClient) Update(ctx context.Context, slug string, updateReq UpdateTeamRequest) (*TeamResponse, error)
Update updates a team in FireHydrant
type RunbookAction ¶
type RunbookActionsClient ¶
type RunbookActionsClient interface {
Get(ctx context.Context, runbookType string, integrationSlug string, actionSlug string) (*RunbookAction, error)
}
RunbooksClient is an interface for interacting with runbooks on FireHydrant
type RunbookActionsQuery ¶
type RunbookActionsResponse ¶
type RunbookActionsResponse struct {
Actions []RunbookAction `json:"data"`
}
RunbookActionsResponse is the payload for retrieving runbook actions URL: GET https://api.firehydrant.io/v1/runbooks/actions
type RunbookRelation ¶
type RunbookRelation struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Owner *RunbookTeam `json:"owner,omitempty"` Steps []RunbookStep `json:"steps"` Type string `json:"type"` }
RunbookRelation associates a runbook to a type in FireHydrant (such as a severity)
type RunbookResponse ¶
type RunbookResponse struct { ID string `json:"id"` Name string `json:"name"` Restricted bool `json:"auto_attach_to_restricted_incidents"` Description string `json:"description"` Owner *RunbookTeam `json:"owner"` Steps []RunbookStep `json:"steps"` AttachmentRule map[string]interface{} `json:"attachment_rule"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
RunbookResponse is the payload for retrieving a service URL: GET https://api.firehydrant.io/v1/runbooks/{id}
type RunbookStep ¶
type RunbookStep struct { Name string `json:"name"` ActionID string `json:"action_id"` StepID string `json:"step_id,omitempty"` Config map[string]interface{} `json:"config,omitempty"` Automatic bool `json:"automatic,omitempty"` Repeats bool `json:"repeats,omitempty"` RepeatsDuration string `json:"repeats_duration,omitempty"` Rule map[string]interface{} `json:"rule,omitempty"` }
RunbookStep is a step inside of a runbook that can automate something (like creating a incident slack channel)
type RunbookTeam ¶ added in v0.3.0
type RunbookTeam struct { ID string `json:"id"` Description string `json:"description"` Name string `json:"name"` Slug string `json:"slug"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
RunbookTeam represents a team when creating a runbook
type RunbookType ¶ added in v0.3.0
type RunbookType string
RunbookType represents the type of the runbook.
const (
RunbookTypeDefault RunbookType = "incident"
)
List of valid runbook types
type RunbooksClient ¶
type RunbooksClient interface { Get(ctx context.Context, id string) (*RunbookResponse, error) Create(ctx context.Context, createReq CreateRunbookRequest) (*RunbookResponse, error) Update(ctx context.Context, id string, updateReq UpdateRunbookRequest) (*RunbookResponse, error) Delete(ctx context.Context, id string) error }
RunbooksClient is an interface for interacting with runbooks on FireHydrant
type ScheduleResponse ¶ added in v0.3.2
type ScheduleResponse struct {
Schedules []Schedule `json:"data"`
}
type ServiceDependenciesClient ¶ added in v0.3.0
type ServiceDependenciesClient interface { Get(ctx context.Context, id string) (*ServiceDependencyResponse, error) Create(ctx context.Context, createReq CreateServiceDependencyRequest) (*ServiceDependencyResponse, error) Update(ctx context.Context, id string, updateReq UpdateServiceDependencyRequest) (*ServiceDependencyResponse, error) Delete(ctx context.Context, id string) error }
ServiceDependenciesClient is an interface for interacting with service dependencies on FireHydrant
type ServiceDependencyResponse ¶ added in v0.3.0
type ServiceDependencyResponse struct { ID string `json:"id"` Notes string `json:"notes"` ConnectedService *ServiceDependencyService `json:"connected_service"` Service *ServiceDependencyService `json:"service"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
ServiceDependencyResponse is the payload for retrieving a service dependency URL: GET https://api.firehydrant.io/v1/service_dependencies/{id}
type ServiceDependencyService ¶ added in v0.3.0
type ServiceDependencyService struct {
ID string `json:"id"`
}
ServiceDependencyService is a service in a service dependency
type ServiceLink ¶ added in v0.2.0
type ServiceLink struct { ID string `json:"id,omitempty"` Name string `json:"name"` HrefURL string `json:"href_url"` }
ServiceLink represents a link when creating/updating a service
type ServiceQuery ¶
type ServiceQuery struct { Query string `url:"query,omitempty"` ServiceTier int `url:"int,service_tier,omitempty"` LabelsSelector LabelsSelector `url:"labels,omitempty"` }
ServiceQuery is the query used to search for services
type ServiceResponse ¶
type ServiceResponse struct { ID string `json:"id"` AlertOnAdd bool `json:"alert_on_add"` AutoAddRespondingTeam bool `json:"auto_add_responding_team"` Description string `json:"description"` Labels map[string]string `json:"labels"` Links []ServiceLink `json:"links"` Name string `json:"name"` Owner *ServiceTeam `json:"owner"` ServiceTier int `json:"service_tier"` Slug string `json:"slug"` Teams []ServiceTeam `json:"teams"` ExternalResources []ExternalResource `json:"external_resources"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
ServiceResponse is the payload for retrieving a service URL: GET https://api.firehydrant.io/v1/services/{id}
type ServiceTeam ¶ added in v0.2.0
type ServiceTeam struct { ID string `json:"id"` Description string `json:"description"` Name string `json:"name"` Slug string `json:"slug"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
ServiceTeam represents a team when creating a service
type ServicesClient ¶
type ServicesClient interface { Get(ctx context.Context, id string) (*ServiceResponse, error) List(ctx context.Context, req *ServiceQuery) (*ServicesResponse, error) Create(ctx context.Context, req CreateServiceRequest) (*ServiceResponse, error) Update(ctx context.Context, serviceID string, req UpdateServiceRequest) (*ServiceResponse, error) Delete(ctx context.Context, serviceID string) error }
ServicesClient is an interface for interacting with services in FireHydrant
type ServicesResponse ¶
type ServicesResponse struct {
Services []ServiceResponse `json:"data"`
}
ServicesResponse is the payload for retrieving a list of services
type SeveritiesClient ¶ added in v0.3.0
type SeveritiesClient interface { Get(ctx context.Context, slug string) (*SeverityResponse, error) Create(ctx context.Context, createReq CreateSeverityRequest) (*SeverityResponse, error) Update(ctx context.Context, slug string, updateReq UpdateSeverityRequest) (*SeverityResponse, error) Delete(ctx context.Context, slug string) error }
SeveritiesClient is an interface for interacting with severities on FireHydrant
type SeverityResponse ¶
type SeverityResponse struct { Slug string `json:"slug"` Description string `json:"description"` Type string `json:"type"` }
SeverityResponse is the payload for a single environment URL: GET https://api.firehydrant.io/v1/severities/{id}
type SeverityType ¶ added in v0.3.0
type SeverityType string
SeverityType represents the type of the severity.
const ( SeverityTypeGameday SeverityType = "gameday" SeverityTypeMaintenance SeverityType = "maintenance" SeverityTypeUnexpectedDowntime SeverityType = "unexpected_downtime" )
List of valid severity types
type SignalRuleTarget ¶ added in v0.4.0
type SignalsRuleResponse ¶ added in v0.4.0
type SignalsRules ¶ added in v0.4.0
type SignalsRules interface { Get(ctx context.Context, teamID, id string) (*SignalsRuleResponse, error) Create(ctx context.Context, teamID string, createReq CreateSignalsRuleRequest) (*SignalsRuleResponse, error) Update(ctx context.Context, teamID, id string, updateReq UpdateSignalsRuleRequest) (*SignalsRuleResponse, error) Delete(ctx context.Context, teamID, id string) error }
type SlackChannelParams ¶ added in v0.7.0
type SlackChannelResponse ¶ added in v0.6.0
type SlackChannelResponse struct { ID string `json:"id"` SlackChannelID string `json:"slack_channel_id"` Name string `json:"name"` }
SlackChannelResponse is the response for retrieving Slack channel information, including FireHydrant ID. URL: GET https://api.firehydrant.io/v1/integrations/slack/channels?slack_channel_id={id}
type SlackChannelsClient ¶ added in v0.6.0
type SlackChannelsClient interface {
Get(ctx context.Context, params SlackChannelParams) (*SlackChannelResponse, error)
}
SlackChannelsClient is an interface for interacting with Slack channels
type SlackChannelsResponse ¶ added in v0.6.0
type SlackChannelsResponse struct { Channels []*SlackChannelResponse `json:"data"` Pagination *Pagination `json:"pagination,omitempty"` }
type TaskListItem ¶ added in v0.3.0
type TaskListItem struct { Description string `json:"description"` Summary string `json:"summary"` }
TaskListItem is an item in a task list
type TaskListResponse ¶ added in v0.3.0
type TaskListResponse struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` TaskListItems []TaskListItem `json:"task_list_items"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
TaskListResponse is the payload for retrieving a task list URL: GET https://api.firehydrant.io/v1/task_lists/{id}
type TaskListsClient ¶ added in v0.3.0
type TaskListsClient interface { Get(ctx context.Context, id string) (*TaskListResponse, error) Create(ctx context.Context, createReq CreateTaskListRequest) (*TaskListResponse, error) Update(ctx context.Context, id string, updateReq UpdateTaskListRequest) (*TaskListResponse, error) Delete(ctx context.Context, id string) error }
TaskListsClient is an interface for interacting with task lists on FireHydrant
type TeamResponse ¶
type TeamResponse struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Slug string `json:"slug"` OwnedServices []ServiceResponse `json:"owned_services"` Services []ServiceResponse `json:"services"` Memberships []MembershipResponse `json:"memberships"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
TeamResponse is the payload for a single environment URL: GET https://api.firehydrant.io/v1/teams/{id}
type TeamService ¶
type TeamService struct {
ID string `json:"id"`
}
TeamService represents a service when creating a functionality
type TeamsClient ¶ added in v0.3.4
type TeamsClient interface { Get(ctx context.Context, slug string) (*TeamResponse, error) List(ctx context.Context, req *TeamQuery) (*TeamsResponse, error) Create(ctx context.Context, createReq CreateTeamRequest) (*TeamResponse, error) Update(ctx context.Context, slug string, updateReq UpdateTeamRequest) (*TeamResponse, error) Archive(ctx context.Context, slug string) error }
TeamsClient is an interface for interacting with teams on FireHydrant
type TeamsResponse ¶ added in v0.3.4
type TeamsResponse struct { Teams []TeamResponse `json:"data"` Pagination *Pagination `json:"pagination,omitempty"` }
TeamsResponse is the payload for retrieving a list of teams
type UpdateEnvironmentRequest ¶
type UpdateEnvironmentRequest struct { Name string `json:"name,omitempty"` Description string `json:"description"` }
UpdateEnvironmentRequest is the payload for updating a environment URL: PATCH https://api.firehydrant.io/v1/environments/{id}
type UpdateEscalationPolicyRequest ¶ added in v0.4.0
type UpdateEscalationPolicyRequest struct { Name string `json:"name"` Description string `json:"description"` Default bool `json:"default"` Repetitions int `json:"repetitions"` Steps []EscalationPolicyStep `json:"steps"` HandoffStep *CreateEscalationPolicyHandoffStep `json:"handoff_step"` }
type UpdateFunctionalityRequest ¶
type UpdateFunctionalityRequest struct { Name string `json:"name,omitempty"` Description string `json:"description"` RemoveRemainingServices bool `json:"remove_remaining_services"` Labels map[string]string `json:"labels"` Services []FunctionalityService `json:"services"` }
UpdateFunctionalityRequest is the payload for updating a environment URL: PATCH https://api.firehydrant.io/v1/environments/{id}
type UpdateIncidentRoleRequest ¶ added in v0.3.0
type UpdateIncidentRoleRequest struct { Name string `json:"name,omitempty"` Description string `json:"description"` Summary string `json:"summary"` }
UpdateIncidentRoleRequest is the payload for updating an incident role URL: PATCH https://api.firehydrant.io/v1/incident_roles/{id}
type UpdateOnCallScheduleRequest ¶ added in v0.4.0
type UpdatePriorityRequest ¶ added in v0.3.0
type UpdatePriorityRequest struct { Slug string `json:"slug,omitempty"` Description string `json:"description"` Default bool `json:"default"` }
UpdatePriorityRequest is the payload for updating a priority URL: PATCH https://api.firehydrant.io/v1/priorities/{id}
type UpdateRunbookRequest ¶
type UpdateRunbookRequest struct { Name string `json:"name,omitempty"` Restricted bool `json:"auto_attach_to_restricted_incidents"` Description string `json:"description"` Owner *RunbookTeam `json:"owner,omitempty"` Steps []RunbookStep `json:"steps,omitempty"` AttachmentRule map[string]interface{} `json:"attachment_rule,omitempty"` }
UpdateRunbookRequest is the payload for updating a service URL: PATCH https://api.firehydrant.io/v1/runbooks/{id}
type UpdateServiceDependencyRequest ¶ added in v0.3.0
type UpdateServiceDependencyRequest struct {
Notes string `json:"notes"`
}
UpdateServiceDependencyRequest is the payload for updating a service dependency URL: PATCH https://api.firehydrant.io/v1/service_dependencies/{id}
type UpdateServiceRequest ¶
type UpdateServiceRequest struct { AlertOnAdd bool `json:"alert_on_add"` AutoAddRespondingTeam bool `json:"auto_add_responding_team"` Description string `json:"description"` Labels map[string]string `json:"labels"` Links []ServiceLink `json:"links"` Name string `json:"name,omitempty"` Owner *ServiceTeam `json:"owner"` RemoveOwner bool `json:"remove_owner,omitempty"` RemoveRemainingTeams bool `json:"remove_remaining_teams,omitempty"` RemoveRemainingExternalResources bool `json:"remove_remaining_external_resources,omitempty"` ServiceTier int `json:"service_tier,int"` Teams []ServiceTeam `json:"teams"` ExternalResources []ExternalResource `json:"external_resources,omitempty"` }
UpdateServiceRequest is the payload for updating a service URL: PATCH https://api.firehydrant.io/v1/services/{id}
type UpdateSeverityRequest ¶
type UpdateSeverityRequest struct { Slug string `json:"slug,omitempty"` Description string `json:"description"` Type string `json:"type"` }
UpdateSeverityRequest is the payload for updating a severity URL: PATCH https://api.firehydrant.io/v1/severities/{id}
type UpdateSignalsRuleRequest ¶ added in v0.4.0
type UpdateTaskListRequest ¶ added in v0.3.0
type UpdateTaskListRequest struct { Name string `json:"name,omitempty"` Description string `json:"description"` TaskListItems []TaskListItem `json:"task_list_items"` }
UpdateTaskListRequest is the payload for updating a task list URL: PATCH https://api.firehydrant.io/v1/task_lists/{id}
type UpdateTeamRequest ¶
type UpdateTeamRequest struct { Name string `json:"name"` Description string `json:"description"` Slug string `json:"slug,omitempty"` Memberships []Membership `json:"memberships,omitempty"` }
UpdateTeamRequest is the payload for updating a environment URL: PATCH https://api.firehydrant.io/v1/environments/{id}
type UserResponse ¶ added in v0.3.2
type UserResponse struct { Users []User `json:"data"` Pagination *Pagination `json:"pagination,omitempty"` }