config

package
v0.0.0-...-7355567 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(filename string)

Types

type AnniversaryChannelReminder

type AnniversaryChannelReminder struct {
	Enabled         bool   `mapstructure:"enabled"`
	ChannelName     string `mapstructure:"channel_name" validate:"required"`
	MessageTemplate string `mapstructure:"message_template" validate:"required"`
}

type BirthdaysChannelReminder

type BirthdaysChannelReminder struct {
	Enabled         bool   `mapstructure:"enabled"`
	ChannelName     string `mapstructure:"channel_name" validate:"required"`
	MessageTemplate string `mapstructure:"message_template" validate:"required"`
}

type BirthdaysDirectMessageReminder

type BirthdaysDirectMessageReminder struct {
	Enabled                    bool     `mapstructure:"enabled"`
	MessageTemplate            string   `mapstructure:"message_template" validate:"required"`
	PreReminderDaysBefore      int64    `mapstructure:"pre_reminder_days_before" validate:"required"`
	PreRemidnerMessageTemplate string   `mapstructure:"pre_remidner_message_template" validate:"required"`
	AlwaysNotifySlackIds       []string `mapstructure:"always_notify_slack_ids" validate:"required"`
}

type BirthdaysPersonalReminder

type BirthdaysPersonalReminder struct {
	Enabled         bool   `mapstructure:"enabled"`
	Time            string `mapstructure:"time" validate:"required"`
	MessageTemplate string `mapstructure:"message_template" validate:"required"`
}

type Config

type Config struct {
	Slack  Slack    `mapstructure:"slack" validate:"required"`
	People []Person `mapstructure:"people" validate:"required"`
}

func GetConfig

func GetConfig() *Config

type DownloadingUsers

type DownloadingUsers struct {
	BirthdayCustomFieldName string `mapstructure:"birthday_custom_field_name" validate:"required"`
	JoinDateCustomFieldName string `mapstructure:"join_date_custom_field_name" validate:"required"`
}

type MonthlyReport

type MonthlyReport struct {
	Enabled         bool   `mapstructure:"enabled"`
	ChannelName     string `mapstructure:"channel_name" validate:"required"`
	MessageTemplate string `mapstructure:"message_template" validate:"required"`
}

type Person

type Person struct {
	SlackMemberID     string    `mapstructure:"slack_member_id" validate:"required"`
	BirthDate         time.Time `mapstructure:"birth_date" validate:"required"`
	JoinDate          time.Time `mapstructure:"join_date" validate:"required"`
	LeadSlackMemberID *string   `mapstructure:"lead_slack_member_id" validate:"required"`
}

type Slack

type Slack struct {
	BotToken                       string
	UserToken                      string
	AnniversaryChannelReminder     AnniversaryChannelReminder     `mapstructure:"anniversary_channel_reminder" validate:"required"`
	BirthdaysChannelReminder       BirthdaysChannelReminder       `mapstructure:"birthdays_channel_reminder" validate:"required"`
	BirthdaysPersonalReminder      BirthdaysPersonalReminder      `mapstructure:"birthdays_personal_reminder" validate:"required"`
	BirthdaysDirectMessageReminder BirthdaysDirectMessageReminder `mapstructure:"birthdays_direct_message_reminder" validate:"required"`
	MonthlyReport                  MonthlyReport                  `mapstructure:"monthly_report" validate:"required"`
	DownloadingUsers               DownloadingUsers               `mapstructure:"downloading_users" validate:"required"`
}

Jump to

Keyboard shortcuts

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