standup

package
v3.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddStandupChannel

func AddStandupChannel(channelID string) error

AddStandupChannel adds the specified channel to the list of standup channels. This is later user for iterating over all standup channels.

func GetStandupChannels

func GetStandupChannels() (map[string]string, error)

GetStandupChannels fetches all channels where standup is configured. Returns a map of channel ID to channel ID for maintaining uniqueness.

func SaveUserStandup

func SaveUserStandup(userStandup *UserStandup) error

SaveUserStandup saves a user's standup for a channel

Types

type StandupConfig

type StandupConfig struct {
	ChannelId                  string       `json:"channelId"`
	WindowOpenTime             otime.OTime  `json:"windowOpenTime"`
	WindowCloseTime            otime.OTime  `json:"windowCloseTime"`
	ReportFormat               string       `json:"reportFormat"`
	Members                    []string     `json:"members"`
	Sections                   []string     `json:"sections"`
	Enabled                    bool         `json:"enabled"`
	Timezone                   string       `json:"timezone"`
	WindowOpenReminderEnabled  bool         `json:"windowOpenReminderEnabled"`
	WindowCloseReminderEnabled bool         `json:"windowCloseReminderEnabled"`
	ScheduleEnabled            bool         `json:"scheduleEnabled"`
	RRule                      *rrule.RRule `json:"rrule"`
	RRuleString                string       `json:"rruleString"`
	StartDate                  time.Time    `json:"startDate"`
}

func GetStandupConfig

func GetStandupConfig(channelID string) (*StandupConfig, error)

GetStandupConfig fetches standup config for the specified channel

func SaveStandupConfig

func SaveStandupConfig(standupConfig *StandupConfig) (*StandupConfig, error)

TODO this should return the set config SaveStandupConfig saves standup config for the specified channel

func (*StandupConfig) GenerateScheduleString

func (sc *StandupConfig) GenerateScheduleString() string

GenerateScheduleString generates a user-friendly, string representation of standup schedule.

func (*StandupConfig) IsValid

func (sc *StandupConfig) IsValid() error

func (*StandupConfig) PreSave

func (sc *StandupConfig) PreSave() error

func (*StandupConfig) ToJson

func (sc *StandupConfig) ToJson() string

type UserStandup

type UserStandup struct {
	UserID    string               `json:"userId"`
	ChannelID string               `json:"channelId"`
	Standup   map[string]*[]string `json:"standup"`
}

func GetUserStandup

func GetUserStandup(userID, channelID string, date otime.OTime) (*UserStandup, error)

GetUserStandup fetches a user's standup for the specified channel and date.

func (*UserStandup) IsValid

func (us *UserStandup) IsValid() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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