Documentation ¶
Index ¶
- Constants
- type Issue
- type IssueCreateData
- type IssueUpdateData
- type MySQL
- func (m *MySQL) Close() error
- func (m *MySQL) IssueCreate(issue IssueCreateData) (Issue, error)
- func (m *MySQL) IssueDel(id, tID int64) error
- func (m *MySQL) IssueGetByID(id, tID int64) (Issue, error)
- func (m *MySQL) IssueUpdate(issue IssueUpdateData) (Issue, error)
- func (m *MySQL) IssuesGetByDate(tID int64, date string) ([]Issue, error)
- func (m *MySQL) SettingsGet(tID int64) (Settings, error)
- func (m *MySQL) SettingsSet(s SettingsSetData) (Settings, error)
- func (m *MySQL) SprintIssueCreate(si SprintIssueCreateData) (SprintIssue, error)
- func (m *MySQL) SprintIssueDel(id, tID int64) error
- func (m *MySQL) SprintIssueGetByID(id, tID int64) (SprintIssue, error)
- func (m *MySQL) SprintIssueUpdate(si SprintIssueUpdateData) (SprintIssue, error)
- func (m *MySQL) SprintIssuesGetByDate(tID int64, date string) ([]SprintIssue, error)
- type Param
- type Settings
- type SettingsSetData
- type SprintIssue
- type SprintIssueCreateData
- type SprintIssueUpdateData
Constants ¶
const IssuesTable = "issues"
const SettingsTable = "settings"
const SprintIssuesTable = "sprint_issues"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Issue ¶
type Issue struct { ID int64 `json:"id" gorm:"primaryKey"` TlgrmChatID int64 `json:"tlgrm_chat_id"` CreatedAt string `json:"created_at"` Date string `json:"date"` Done bool `json:"done"` Text string `json:"text"` }
Issue contains issue data
type IssueCreateData ¶
type IssueCreateData struct { TlgrmChatID int64 `json:"tlgrm_chat_id"` CreatedAt string `json:"created_at"` Date string `json:"date"` Done bool `json:"done"` Text string `json:"text"` }
IssueCreateData contains data to create new issue
func (IssueCreateData) TableName ¶
func (IssueCreateData) TableName() string
type IssueUpdateData ¶
type IssueUpdateData struct { ID int64 `json:"id" gorm:"->"` TlgrmChatID int64 `json:"tlgrm_chat_id" gorm:"->"` CreatedAt *string `json:"created_at"` Date *string `json:"date"` Done *bool `json:"done"` Text *string `json:"text"` }
IssueUpdateData contains data to update issue
func (IssueUpdateData) TableName ¶
func (IssueUpdateData) TableName() string
type MySQL ¶
type MySQL struct {
// contains filtered or unexported fields
}
MySQL it is a MySQL module context structure
func (*MySQL) IssueCreate ¶
func (m *MySQL) IssueCreate(issue IssueCreateData) (Issue, error)
IssueCreate creates new issue
func (*MySQL) IssueGetByID ¶
IssueGetByID gets issue by specified ID and user
func (*MySQL) IssueUpdate ¶
func (m *MySQL) IssueUpdate(issue IssueUpdateData) (Issue, error)
IssueUpdate updates issue by specified ID and user
func (*MySQL) IssuesGetByDate ¶
IssuesGetByDate gets all issues for specified user and date
func (*MySQL) SettingsGet ¶
SettingsGet gets settings for specified user
func (*MySQL) SettingsSet ¶
func (m *MySQL) SettingsSet(s SettingsSetData) (Settings, error)
SettingsSet adds new settings record into DB or update if exist
func (*MySQL) SprintIssueCreate ¶
func (m *MySQL) SprintIssueCreate(si SprintIssueCreateData) (SprintIssue, error)
SprintIssueCreate creates new sprint issue
func (*MySQL) SprintIssueDel ¶
SprintIssueDel deletes specified sprint issue
func (*MySQL) SprintIssueGetByID ¶
func (m *MySQL) SprintIssueGetByID(id, tID int64) (SprintIssue, error)
SprintIssueGetByID gets sprint issue by specified ID and user
func (*MySQL) SprintIssueUpdate ¶
func (m *MySQL) SprintIssueUpdate(si SprintIssueUpdateData) (SprintIssue, error)
IssueUpdate updates issue by specified ID and user
func (*MySQL) SprintIssuesGetByDate ¶
func (m *MySQL) SprintIssuesGetByDate(tID int64, date string) ([]SprintIssue, error)
SprintIssuesGetByDate gets all sprint issues for specified user and date
type Settings ¶
type SettingsSetData ¶
type SettingsSetData struct { TlgrmChatID int64 `json:"tlgrm_chat_id" gorm:"primaryKey"` CurrentDate string `json:"current_date"` }
func (SettingsSetData) TableName ¶
func (SettingsSetData) TableName() string
type SprintIssue ¶
type SprintIssue struct { ID int64 `json:"id" gorm:"primaryKey"` TlgrmChatID int64 `json:"tlgrm_chat_id"` Date string `json:"date"` Goal bool `json:"goal"` Done bool `json:"done"` Text string `json:"text"` }
Issue contains sprint issue data
func (SprintIssue) TableName ¶
func (SprintIssue) TableName() string
type SprintIssueCreateData ¶
type SprintIssueCreateData struct { TlgrmChatID int64 `json:"tlgrm_chat_id"` Date string `json:"date"` Goal bool `json:"goal"` Done bool `json:"done"` Text string `json:"text"` }
IssueCreateData contains data to create new sprint issue
func (SprintIssueCreateData) TableName ¶
func (SprintIssueCreateData) TableName() string
type SprintIssueUpdateData ¶
type SprintIssueUpdateData struct { ID int64 `json:"id" gorm:"->"` TlgrmChatID int64 `json:"tlgrm_chat_id" gorm:"->"` Date *string `json:"date"` Goal *bool `json:"goal"` Done *bool `json:"done"` Text *string `json:"text"` }
SprintIssueUpdateData contains data to update sprint issue
func (SprintIssueUpdateData) TableName ¶
func (SprintIssueUpdateData) TableName() string