Documentation
¶
Index ¶
- Constants
- func ConnectDb(logger *zap.Logger, host, cred, dbName string) driver.Database
- func GetEnsureCollection(log *zap.Logger, ctx context.Context, db driver.Database, name string) driver.Collection
- func GraphGetEdgeEnsure(logger *zap.Logger, ctx context.Context, graph driver.Graph, ...) driver.Collection
- func GraphGetEnsure(logger *zap.Logger, ctx context.Context, db driver.Database, name string) driver.Graph
- func GraphGetVertexEnsure(logger *zap.Logger, ctx context.Context, db driver.Database, ...) (col driver.Collection)
- type Attachment
- type AttachmentsController
- type ChatsController
- func (c *ChatsController) Count(ctx context.Context, requester string, filters map[string]*structpb.Value) (map[int32]int64, error)
- func (c *ChatsController) Create(ctx context.Context, chat *cc.Chat) (*cc.Chat, error)
- func (c *ChatsController) Delete(ctx context.Context, chat *cc.Chat) (*cc.Chat, error)
- func (c *ChatsController) DeleteGateways(ctx context.Context, fields map[string]*structpb.Value) error
- func (c *ChatsController) Get(ctx context.Context, uuid, requestor string) (*cc.Chat, error)
- func (c *ChatsController) GetByGateway(ctx context.Context, gate string, gateId *structpb.Value) (*cc.Chat, error)
- func (c *ChatsController) GetMessages(ctx context.Context, chat *cc.Chat, is_admin bool) ([]*cc.Message, error)
- func (c *ChatsController) List(ctx context.Context, requester string, req *cc.ListChatsRequest) ([]*cc.Chat, int64, error)
- func (c *ChatsController) Merge(ctx context.Context, chats []string) (*cc.Chat, error)
- func (c *ChatsController) SetBotState(ctx context.Context, chat *cc.Chat) (*cc.Chat, error)
- func (c *ChatsController) Sync(ctx context.Context, cfg *cc.Defaults) error
- func (c *ChatsController) Update(ctx context.Context, chat *cc.Chat) (*cc.Chat, error)
- type MessagesController
- func (c *MessagesController) Delete(ctx context.Context, msg *cc.Message) (*cc.Message, error)
- func (c *MessagesController) Get(ctx context.Context, uuid string) (*cc.Message, error)
- func (c *MessagesController) Read(ctx context.Context, msg *cc.Message, reader string) (*cc.Message, error)
- func (c *MessagesController) Send(ctx context.Context, msg *cc.Message) (*cc.Message, error)
- func (c *MessagesController) Update(ctx context.Context, msg *cc.Message) (*cc.Message, error)
- type UsersController
Constants ¶
View Source
const ( CHATS_COLLECTION = "CC_Chats" MESSAGES_COLLECTION = "CC_Messages" ATTACHMENTS_COLLECTION = "CC_Attachments" )
Variables ¶
This section is empty.
Functions ¶
func GetEnsureCollection ¶
func GraphGetEdgeEnsure ¶
func GraphGetEnsure ¶
Types ¶
type Attachment ¶
type AttachmentsController ¶
type AttachmentsController struct {
// contains filtered or unexported fields
}
func NewAttachmentsController ¶
func NewAttachmentsController(logger *zap.Logger, db driver.Database) *AttachmentsController
func (*AttachmentsController) Delete ¶
func (c *AttachmentsController) Delete(ctx context.Context, uuid string) error
func (*AttachmentsController) Get ¶
func (c *AttachmentsController) Get(ctx context.Context, uuid string) (*Attachment, error)
func (*AttachmentsController) Upload ¶
func (c *AttachmentsController) Upload(ctx context.Context, a *Attachment) (*Attachment, error)
type ChatsController ¶
type ChatsController struct {
// contains filtered or unexported fields
}
func NewChatsController ¶
func NewChatsController(logger *zap.Logger, db driver.Database) *ChatsController
func (*ChatsController) DeleteGateways ¶
func (*ChatsController) GetByGateway ¶
func (*ChatsController) GetMessages ¶
func (*ChatsController) List ¶
func (c *ChatsController) List(ctx context.Context, requester string, req *cc.ListChatsRequest) ([]*cc.Chat, int64, error)
func (*ChatsController) SetBotState ¶
type MessagesController ¶
type MessagesController struct {
// contains filtered or unexported fields
}
func NewMessagesController ¶
func NewMessagesController(logger *zap.Logger, db driver.Database) *MessagesController
type UsersController ¶
type UsersController struct {
// contains filtered or unexported fields
}
func NewUsersController ¶
func NewUsersController(logger *zap.Logger, db driver.Database, colname string) *UsersController
func (*UsersController) GetMembers ¶
func (*UsersController) UpdateCommands ¶
Click to show internal directories.
Click to hide internal directories.