pd

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetScheduleWithContext(ctx context.Context, id string, o pagerduty.GetScheduleOptions) (*pagerduty.Schedule, error)
}

type ScheduleEntry

type ScheduleEntry struct {
	Start time.Time
	End   time.Time
	User  string
}

type ScheduleEntryIter

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

func NewScheduleEntryIter

func NewScheduleEntryIter(scheduleName string, tz *time.Location, rsEntries []pagerduty.RenderedScheduleEntry) (*ScheduleEntryIter, error)

func (*ScheduleEntryIter) Next

func (s *ScheduleEntryIter) Next() *ScheduleEntry

func (*ScheduleEntryIter) Peek

func (s *ScheduleEntryIter) Peek() *ScheduleEntry

type Shift

type Shift struct {
	Start   time.Time
	End     time.Time
	Details map[string][]ShiftDetail
	// contains filtered or unexported fields
}

func NewShift

func NewShift(start, end time.Time) *Shift

func (*Shift) AddDetails

func (s *Shift) AddDetails(iter *ScheduleEntryIter)

type ShiftDetail

type ShiftDetail struct {
	User       string
	Start      time.Time
	End        time.Time
	Proportion float64
}

type ShiftGenerator

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

func NewShiftGenerator

func NewShiftGenerator(tz *time.Location, since, until string, handoffTimes, include, nonWorkingDays []string) (*ShiftGenerator, error)

func (*ShiftGenerator) Shifts

func (s *ShiftGenerator) Shifts() iter.Seq[*Shift]

Jump to

Keyboard shortcuts

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