repository

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type ChatbotRepository

type ChatbotRepository interface {
	GetByID(ctx context.Context, id int64) (pb.Bot, error)
	GetByUUID(ctx context.Context, uuid string) (pb.Bot, error)
	GetByIdentifier(ctx context.Context, identifier string) (pb.Bot, error)
	List(ctx context.Context) ([]*pb.Bot, error)
	Create(ctx context.Context, bot *pb.Bot) (int64, error)
	Delete(ctx context.Context, id int64) error
	ListGroupBot(ctx context.Context, groupId int64) ([]*pb.Bot, error)
	CreateGroupBot(ctx context.Context, groupId int64, bot *pb.Bot) error
	DeleteGroupBot(ctx context.Context, groupId, botId int64) error
	GetGroup(ctx context.Context, id int64) (pb.Group, error)
	GetGroupByUUID(ctx context.Context, uuid string) (pb.Group, error)
	GetGroupBySequence(ctx context.Context, userId, sequence int64) (pb.Group, error)
	ListGroup(ctx context.Context, userId int64) ([]*pb.Group, error)
	CreateGroup(ctx context.Context, group *pb.Group) (int64, error)
	DeleteGroup(ctx context.Context, id int64) error
	UpdateGroup(ctx context.Context, group *pb.Group) error
	UpdateGroupSetting(ctx context.Context, groupId int64, kvs []*pb.KV) error
	UpdateGroupBotSetting(ctx context.Context, groupId, botId int64, kvs []*pb.KV) error
	GetGroupSetting(ctx context.Context, groupId int64) ([]*pb.KV, error)
	GetGroupBotSetting(ctx context.Context, groupId, botId int64) ([]*pb.KV, error)
	ListGroupTag(ctx context.Context, groupId int64) ([]*pb.GroupTag, error)
	CreateGroupTag(ctx context.Context, tag *pb.GroupTag) (int64, error)
	DeleteGroupTag(ctx context.Context, id int64) error
}

func CreateChatbotRepository

func CreateChatbotRepository(id string) (ChatbotRepository, error)

func NewMysqlChatbotRepository

func NewMysqlChatbotRepository(id *global.ID, locker *global.Locker, db *mysql.Conn) ChatbotRepository

type MysqlChatbotRepository

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

func (*MysqlChatbotRepository) Create

func (r *MysqlChatbotRepository) Create(ctx context.Context, bot *pb.Bot) (int64, error)

func (*MysqlChatbotRepository) CreateGroup

func (r *MysqlChatbotRepository) CreateGroup(ctx context.Context, group *pb.Group) (int64, error)

func (*MysqlChatbotRepository) CreateGroupBot

func (r *MysqlChatbotRepository) CreateGroupBot(ctx context.Context, groupId int64, bot *pb.Bot) error

func (*MysqlChatbotRepository) CreateGroupTag

func (r *MysqlChatbotRepository) CreateGroupTag(ctx context.Context, tag *pb.GroupTag) (int64, error)

func (*MysqlChatbotRepository) Delete

func (r *MysqlChatbotRepository) Delete(ctx context.Context, id int64) error

func (*MysqlChatbotRepository) DeleteGroup

func (r *MysqlChatbotRepository) DeleteGroup(ctx context.Context, id int64) error

func (*MysqlChatbotRepository) DeleteGroupBot

func (r *MysqlChatbotRepository) DeleteGroupBot(ctx context.Context, groupId, botId int64) error

func (*MysqlChatbotRepository) DeleteGroupTag

func (r *MysqlChatbotRepository) DeleteGroupTag(ctx context.Context, id int64) error

func (*MysqlChatbotRepository) GetByID

func (r *MysqlChatbotRepository) GetByID(ctx context.Context, id int64) (pb.Bot, error)

func (*MysqlChatbotRepository) GetByIdentifier

func (r *MysqlChatbotRepository) GetByIdentifier(ctx context.Context, identifier string) (pb.Bot, error)

func (*MysqlChatbotRepository) GetByUUID

func (r *MysqlChatbotRepository) GetByUUID(ctx context.Context, uuid string) (pb.Bot, error)

func (*MysqlChatbotRepository) GetGroup

func (r *MysqlChatbotRepository) GetGroup(ctx context.Context, id int64) (pb.Group, error)

func (*MysqlChatbotRepository) GetGroupBotSetting

func (r *MysqlChatbotRepository) GetGroupBotSetting(ctx context.Context, groupId, botId int64) ([]*pb.KV, error)

func (*MysqlChatbotRepository) GetGroupBySequence

func (r *MysqlChatbotRepository) GetGroupBySequence(ctx context.Context, userId, sequence int64) (pb.Group, error)

func (*MysqlChatbotRepository) GetGroupByUUID

func (r *MysqlChatbotRepository) GetGroupByUUID(ctx context.Context, uuid string) (pb.Group, error)

func (*MysqlChatbotRepository) GetGroupSetting

func (r *MysqlChatbotRepository) GetGroupSetting(ctx context.Context, groupId int64) ([]*pb.KV, error)

func (*MysqlChatbotRepository) List

func (r *MysqlChatbotRepository) List(ctx context.Context) ([]*pb.Bot, error)

func (*MysqlChatbotRepository) ListGroup

func (r *MysqlChatbotRepository) ListGroup(ctx context.Context, userId int64) ([]*pb.Group, error)

func (*MysqlChatbotRepository) ListGroupBot

func (r *MysqlChatbotRepository) ListGroupBot(ctx context.Context, groupId int64) ([]*pb.Bot, error)

func (*MysqlChatbotRepository) ListGroupTag

func (r *MysqlChatbotRepository) ListGroupTag(ctx context.Context, groupId int64) ([]*pb.GroupTag, error)

func (*MysqlChatbotRepository) UpdateGroup

func (r *MysqlChatbotRepository) UpdateGroup(ctx context.Context, group *pb.Group) error

func (*MysqlChatbotRepository) UpdateGroupBotSetting

func (r *MysqlChatbotRepository) UpdateGroupBotSetting(ctx context.Context, groupId, botId int64, kvs []*pb.KV) error

func (*MysqlChatbotRepository) UpdateGroupSetting

func (r *MysqlChatbotRepository) UpdateGroupSetting(ctx context.Context, groupId int64, kvs []*pb.KV) error

Jump to

Keyboard shortcuts

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