rota

package
v0.0.0-...-5ee79ad Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IndividualHistory

type IndividualHistory struct {
	Name            string
	DaysAccrued     uint16
	LatestPickedDay string
}

type Team

type Team struct {
	keys.Keys
	// contains filtered or unexported fields
}

name will be used as the key prefix

func NewTeam

func NewTeam(name string, dbHandle *localdb.LocalDB) *Team

func (Team) Add

func (t Team) Add(newMember string) error

func (Team) GetOutOfOffice

func (t Team) GetOutOfOffice(memberName string) []byte

func (Team) GetTeamOutOfOffice

func (t Team) GetTeamOutOfOffice() ([]byte, error)

func (Team) HistoryOfIndividual

func (t Team) HistoryOfIndividual(member string) IndividualHistory

func (Team) IsAvailable

func (t Team) IsAvailable(memberName string) bool

func (Team) List

func (t Team) List() ([]string, error)

func (Team) Next

func (t Team) Next() (string, error)

func (Team) OrderedRota

func (t Team) OrderedRota() []IndividualHistory

func (Team) OverridePersonPickedForToday

func (t Team) OverridePersonPickedForToday(memberName string) error

func (Team) PersonPickedOnTheDay

func (t Team) PersonPickedOnTheDay(date time.Time) string

func (Team) PickNextPerson

func (t Team) PickNextPerson(_ context.Context, slackMessager *slackhandler.Messager, ingressURL string)

func (Team) Remove

func (t Team) Remove(existingMember string) error

func (Team) RotaHistory

func (t Team) RotaHistory() (TeamRotaHistory, error)

func (Team) SetOutOfOffice

func (t Team) SetOutOfOffice(memberName string, from time.Time, to time.Time) error

func (Team) SetPersonPickedForToday

func (t Team) SetPersonPickedForToday(memberName string) error

type TeamRotaHistory

type TeamRotaHistory []IndividualHistory

func (TeamRotaHistory) Len

func (history TeamRotaHistory) Len() int

func (TeamRotaHistory) Less

func (history TeamRotaHistory) Less(i, j int) bool

func (TeamRotaHistory) Swap

func (history TeamRotaHistory) Swap(i, j int)

Jump to

Keyboard shortcuts

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