model

package
v0.0.0-...-b4f78c5 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: MIT Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(nt NotificationThread) error

Validate ...

Types

type Group

type Group struct {
	ID               int64
	ChatID           int64  `db:"chat_id" json:"chat_id,omitempty"`
	Title            string `db:"title" json:"title"`
	Username         string `db:"username" json:"username"`
	Description      string `db:"description" json:"description,omitempty"`
	TZ               string `db:"tz" json:"tz"`
	Language         string `db:"language" json:"language"`
	StandupDeadline  string `db:"standup_deadline" json:"standup_deadline,omitempty"`
	OnbordingMessage string `db:"onbording_message" json:"onbording_message,omitempty"`
	SubmissionDays   string `db:"submission_days" json:"submission_days,omitempty"`
}

Group represents separate chat that bot was added to to handle standups

type NotificationThread

type NotificationThread struct {
	ID               int64     `db:"id" json:"id"`
	ChatID           int64     `db:"chat_id" json:"chat_id"`
	Username         string    `db:"username" json:"username"`
	NotificationTime time.Time `db:"notification_time" json:"notification_time"`
	ReminderCounter  int       `db:"reminder_counter" json:"reminder_counter"`
}

NotificationThread ...

type Standup

type Standup struct {
	ID        int64     `db:"id" json:"id"`
	MessageID int       `db:"message_id" json:"message_id"`
	Created   time.Time `db:"created" json:"created"`
	Modified  time.Time `db:"modified" json:"modified"`
	Username  string    `db:"username" json:"userName"`
	Text      string    `db:"text" json:"text"`
	ChatID    int64     `db:"chat_id" json:"chat_id"`
}

Standup model used for serialization/deserialization stored standups

type Standuper

type Standuper struct {
	ID           int64     `db:"id" json:"id"`
	Created      time.Time `db:"created" json:"created"`
	Status       string    `db:"status" json:"status"`
	UserID       int       `db:"user_id" json:"user_id"`
	Username     string    `db:"username" json:"username"`
	ChatID       int64     `db:"chat_id" json:"chat_id"`
	Warnings     int       `db:"warnings" json:"warnings,omitempty"`
	LanguageCode string    `db:"language_code" json:"language_code"`
	TZ           string    `db:"tz" json:"tz"`
}

Standuper rerpesents standuper

type Team

type Team struct {
	Group    *Group
	QuitChan chan struct{}
}

Team is a helper struct to watch after different channels deadlines

func (*Team) Stop

func (t *Team) Stop()

Stop finish tracking group

Jump to

Keyboard shortcuts

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