pager

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownProvider = errors.New("unknown pager provider")
	ErrNoResults       = errors.New("no results found")
)

Functions

This section is empty.

Types

type Opsgenie

type Opsgenie struct {
	// contains filtered or unexported fields
}

func NewOpsgenie

func NewOpsgenie(apiKey string) *Opsgenie

func NewOpsgenieWithConfig

func NewOpsgenieWithConfig(conf *client.Config) *Opsgenie

func NewOpsgenieWithURL

func NewOpsgenieWithURL(apiKey, url string) *Opsgenie

func (*Opsgenie) Kind

func (p *Opsgenie) Kind() string

func (*Opsgenie) LoadEscalationPolicies

func (o *Opsgenie) LoadEscalationPolicies(ctx context.Context) error

func (*Opsgenie) LoadSchedules

func (o *Opsgenie) LoadSchedules(ctx context.Context) error

func (*Opsgenie) LoadTeamMembers

func (o *Opsgenie) LoadTeamMembers(ctx context.Context) error

func (*Opsgenie) LoadTeams

func (o *Opsgenie) LoadTeams(ctx context.Context) error

func (*Opsgenie) LoadUsers

func (o *Opsgenie) LoadUsers(ctx context.Context) error

func (*Opsgenie) TeamInterfaces

func (o *Opsgenie) TeamInterfaces() []string

func (*Opsgenie) Teams

func (o *Opsgenie) Teams(ctx context.Context) ([]store.ExtTeam, error)

func (*Opsgenie) UseTeamInterface

func (o *Opsgenie) UseTeamInterface(string) error

type Pager

type Pager interface {
	Kind() string
	TeamInterfaces() []string
	UseTeamInterface(interfaceName string) error

	LoadUsers(ctx context.Context) error
	LoadTeams(ctx context.Context) error
	LoadTeamMembers(ctx context.Context) error
	LoadSchedules(ctx context.Context) error
	LoadEscalationPolicies(ctx context.Context) error

	Teams(context.Context) ([]store.ExtTeam, error)
}

func NewPager

func NewPager(_ context.Context, kind string, apiKey string, appId string) (Pager, error)

type PagerDuty

type PagerDuty struct {
	// contains filtered or unexported fields
}

func NewPagerDuty

func NewPagerDuty(apiKey string) *PagerDuty

func NewPagerDutyWithURL

func NewPagerDutyWithURL(apiKey, url string) *PagerDuty

func (*PagerDuty) Kind

func (p *PagerDuty) Kind() string

func (*PagerDuty) LoadEscalationPolicies

func (p *PagerDuty) LoadEscalationPolicies(ctx context.Context) error

func (*PagerDuty) LoadSchedules

func (p *PagerDuty) LoadSchedules(ctx context.Context) error

func (*PagerDuty) LoadTeamMembers

func (p *PagerDuty) LoadTeamMembers(ctx context.Context) error

func (*PagerDuty) LoadTeams

func (p *PagerDuty) LoadTeams(ctx context.Context) error

func (*PagerDuty) LoadUsers

func (p *PagerDuty) LoadUsers(ctx context.Context) error

func (*PagerDuty) TeamInterfaces

func (p *PagerDuty) TeamInterfaces() []string

TeamInterfaces defines the available abstraction of a team from PagerDuty. When "team" is selected, the team is fetched from PagerDuty and imported as-is. When "service" is selected, a "service team" will be created as a proxy team, linked to regular PagerDuty teams, via ext_team_groups table. When populating user members, the service team will query all the linked teams for all their user members.

func (*PagerDuty) Teams

func (p *PagerDuty) Teams(ctx context.Context) ([]store.ExtTeam, error)

func (*PagerDuty) UseTeamInterface

func (p *PagerDuty) UseTeamInterface(interfaceName string) error

type VictorOps

type VictorOps struct {
	// contains filtered or unexported fields
}

func NewVictorOps

func NewVictorOps(apiKey string, appId string) *VictorOps

func NewVictorOpsWithURL added in v0.2.0

func NewVictorOpsWithURL(apiKey string, appId string, url string) *VictorOps

func (*VictorOps) Kind

func (v *VictorOps) Kind() string

func (*VictorOps) LoadEscalationPolicies

func (v *VictorOps) LoadEscalationPolicies(ctx context.Context) error

func (*VictorOps) LoadSchedules

func (v *VictorOps) LoadSchedules(ctx context.Context) error

func (*VictorOps) LoadTeamMembers

func (v *VictorOps) LoadTeamMembers(ctx context.Context) error

func (*VictorOps) LoadTeams

func (v *VictorOps) LoadTeams(ctx context.Context) error

func (*VictorOps) LoadUsers

func (v *VictorOps) LoadUsers(ctx context.Context) error

func (*VictorOps) TeamInterfaces

func (v *VictorOps) TeamInterfaces() []string

func (*VictorOps) Teams

func (v *VictorOps) Teams(ctx context.Context) ([]store.ExtTeam, error)

func (*VictorOps) UseTeamInterface

func (v *VictorOps) UseTeamInterface(string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL