database

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DbClient

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

DbClient : client for store

func NewDB

func NewDB(config app.StorageConfig, logger log.Logger) (*DbClient, error)

NewDB : Create new store client

func (*DbClient) AddChatTags

func (client *DbClient) AddChatTags(chat *telebot.Chat, tags []string) error

AddChatTags : Add telebot chat and subscribed tags to bolt store

func (*DbClient) ExistChat

func (client *DbClient) ExistChat(chat *telebot.Chat) (bool, error)

ExistChat : Check chat exist into bolt store

func (*DbClient) GetChatTags

func (client *DbClient) GetChatTags(chat *telebot.Chat) ([]string, error)

GetChatTags : Get subscribed tags for the chat from bolt store

func (*DbClient) List

func (client *DbClient) List() ([]StoreValue, error)

List : Get chat and tags list from bolt store

func (*DbClient) Remove

func (client *DbClient) Remove(chat *telebot.Chat) error

Remove : Remove chat from bolt store

type StoreValue

type StoreValue struct {
	Tags []string
	Chat *telebot.Chat
}

StoreValue : telebot chat and tags list

Jump to

Keyboard shortcuts

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