Documentation ¶
Overview ¶
Package storage contains the logic to persist data in the DB
Index ¶
- func CloseDB() error
- func DeleteMember(channelID, memberID string) error
- func DeletePredefinedRepliesByChannel(channelID string) error
- func GetDailyMeetingsByBot(botID string, teamDailyMeetings *[]api.DailyMeeting) error
- func GetMemberByName(channelID, memberName string) (member *api.Member, err error)
- func GetMembersByChannel(channelID string, teamMembers *[]api.Member) error
- func GetPredefinedReplies(channelID string, replies *[]api.PredefinedDailyReply) error
- func InitDB(path string) error
- func StoreChannel(channelToBeCreated api.Channel) error
- func StoreDailyMeeting(daily api.DailyMeeting) error
- func StoreMember(member api.Member) error
- func StorePredefinedReply(reply api.PredefinedDailyReply) error
- type NotMemberFoundError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteMember ¶
DeleteMember deletes a member from a bucket which identifies the channel
func DeletePredefinedRepliesByChannel ¶
DeletePredefinedRepliesByChannel deletes all replies associated to answers in a Daily Meeting channel
func GetDailyMeetingsByBot ¶
func GetDailyMeetingsByBot(botID string, teamDailyMeetings *[]api.DailyMeeting) error
GetDailyMeetingsByBot returns all the daily meeting configuration associated to a bot
func GetMemberByName ¶
GetMemberByName returns member which is identified by a string, the name
func GetMembersByChannel ¶
GetMembersByChannel returns all members stored in a bucket
func GetPredefinedReplies ¶
func GetPredefinedReplies(channelID string, replies *[]api.PredefinedDailyReply) error
GetPredefinedReplies returns all replies associated to answers in a Daily Meeting
func StoreChannel ¶
StoreChannel create a bucket by channel where data can be stored
func StoreDailyMeeting ¶
func StoreDailyMeeting(daily api.DailyMeeting) error
StoreDailyMeeting persists the members and configuration of a Daily Meeting
func StoreMember ¶
StoreMember persists a member inside a bucket identifying the channel
func StorePredefinedReply ¶
func StorePredefinedReply(reply api.PredefinedDailyReply) error
StorePredefinedReply saves a predefined reply used to reply to Daily Meeting answers
Types ¶
type NotMemberFoundError ¶
type NotMemberFoundError string
NotMemberFoundError is returned when member isn't stored in the database
func (NotMemberFoundError) Error ¶
func (f NotMemberFoundError) Error() string