storage

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MySQL

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

MySQL provides api for work with mysql database

func NewMySQL

func NewMySQL(c *config.BotConfig) (*MySQL, error)

NewMySQL creates a new instance of database API

func (*MySQL) CreateGroup

func (m *MySQL) CreateGroup(group *model.Group) (*model.Group, error)

CreateGroup creates Group

func (*MySQL) CreateNotificationThread

func (m *MySQL) CreateNotificationThread(s model.NotificationThread) (model.NotificationThread, error)

CreateNotificationThread create notifications

func (*MySQL) CreateStandup

func (m *MySQL) CreateStandup(s *model.Standup) (*model.Standup, error)

CreateStandup creates standup entry in database

func (*MySQL) CreateStanduper

func (m *MySQL) CreateStanduper(s *model.Standuper) (*model.Standuper, error)

CreateStanduper creates Standuper

func (*MySQL) DeleteGroup

func (m *MySQL) DeleteGroup(id int64) error

DeleteGroup deletes Group entry from database

func (*MySQL) DeleteGroupStandupers

func (m *MySQL) DeleteGroupStandupers(chatID int64) error

DeleteGroupStandupers deletes Standuper entry from database

func (*MySQL) DeleteNotificationThread

func (m *MySQL) DeleteNotificationThread(id int64) error

DeleteNotificationThread deletes notification entry from database

func (*MySQL) DeleteStandup

func (m *MySQL) DeleteStandup(id int64) error

DeleteStandup deletes standup entry from database

func (*MySQL) DeleteStanduper

func (m *MySQL) DeleteStanduper(id int64) error

DeleteStanduper deletes Standuper entry from database

func (*MySQL) FindGroup

func (m *MySQL) FindGroup(chatID int64) (*model.Group, error)

FindGroup selects Group entry from database

func (*MySQL) FindStanduper

func (m *MySQL) FindStanduper(userID int, chatID int64) (*model.Standuper, error)

FindStanduper selects Standuper entry from database

func (*MySQL) LastStandupFor

func (m *MySQL) LastStandupFor(username string, chatID int64) (*model.Standup, error)

LastStandupFor returns last standup for Standuper

func (*MySQL) ListChatStandupers

func (m *MySQL) ListChatStandupers(chatID int64) ([]model.Standuper, error)

ListChatStandupers returns array of Standuper entries from database filtered by chat

func (*MySQL) ListGroups

func (m *MySQL) ListGroups() ([]*model.Group, error)

ListGroups returns array of Group entries from database filtered by chat

func (*MySQL) ListNotificationsThread

func (m *MySQL) ListNotificationsThread(chatID int64) ([]model.NotificationThread, error)

ListNotificationsThread returns array of notifications entries from database

func (*MySQL) ListStandups

func (m *MySQL) ListStandups() ([]*model.Standup, error)

ListStandups returns array of standup entries from database

func (*MySQL) SelectGroup

func (m *MySQL) SelectGroup(id int64) (*model.Group, error)

SelectGroup selects Group entry from database

func (*MySQL) SelectStandup

func (m *MySQL) SelectStandup(id int64) (*model.Standup, error)

SelectStandup selects standup entry from database

func (*MySQL) SelectStandupByMessageID

func (m *MySQL) SelectStandupByMessageID(messageID int, chatID int64) (*model.Standup, error)

SelectStandupByMessageID selects standup entry from database

func (*MySQL) UpdateGroup

func (m *MySQL) UpdateGroup(group *model.Group) (*model.Group, error)

UpdateGroup updates Group entry in database

func (*MySQL) UpdateNotificationThread

func (m *MySQL) UpdateNotificationThread(id int64, chatID int64, t time.Time) error

UpdateNotificationThread update field reminder counter

func (*MySQL) UpdateStandup

func (m *MySQL) UpdateStandup(s *model.Standup) (*model.Standup, error)

UpdateStandup updates standup entry in database

func (*MySQL) UpdateStanduper

func (m *MySQL) UpdateStanduper(s *model.Standuper) (*model.Standuper, error)

UpdateStanduper updates Standuper entry in database

Jump to

Keyboard shortcuts

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