Documentation ¶
Index ¶
- Variables
- func NewPostgresWithOpt(opts ...pgConnOpt) *postgresClientOpt
- func WithDbName(dbName string) pgConnOpt
- func WithHost(host string) pgConnOpt
- func WithMaxConns(maxConns int32) pgConnOpt
- func WithMinConns(minConns int32) pgConnOpt
- func WithPassword(password string) pgConnOpt
- func WithPort(port uint16) pgConnOpt
- func WithUsername(username string) pgConnOpt
- type ArchiveConversationsBatchResults
- type CheckJoinedonversationParams
- type Conversation
- type ConversationSessionID
- type CreateConversationParams
- type DBTX
- type DeleteConversationsBatchResults
- type GetConversationUnReadMsgCountParams
- type GetJoinedConversationsRow
- type GetJoinedConversationsUnReadMsgCountParams
- type GetMsgFromDbInRangeParams
- type GetThe30MsgAfterTheIdParams
- type GetThe30MsgBeforeTheIdParams
- type KickoutForConversationBatchResults
- type KickoutForConversationParams
- type Message
- type Queries
- func (q *Queries) ArchiveConversations(ctx context.Context, conversationID []string) *ArchiveConversationsBatchResults
- func (q *Queries) CheckJoinedonversation(ctx context.Context, arg CheckJoinedonversationParams) (int64, error)
- func (q *Queries) CreateConversation(ctx context.Context, arg CreateConversationParams) error
- func (q *Queries) DeleteConversations(ctx context.Context, conversationID []string) *DeleteConversationsBatchResults
- func (q *Queries) GetConversationInfo(ctx context.Context, conversationID string) (Conversation, error)
- func (q *Queries) GetConversationSessionCountByConversationPkId(ctx context.Context, conversationID string) (int64, error)
- func (q *Queries) GetConversationUnReadMsgCount(ctx context.Context, arg GetConversationUnReadMsgCountParams) (int64, error)
- func (q *Queries) GetConversationsAllUsers(ctx context.Context) ([]ConversationSessionID, error)
- func (q *Queries) GetJoinedConversations(ctx context.Context, sessionID string) ([]GetJoinedConversationsRow, error)
- func (q *Queries) GetJoinedConversationsUnReadMsgCount(ctx context.Context, arg GetJoinedConversationsUnReadMsgCountParams) (int64, error)
- func (q *Queries) GetLast30MsgFromDb(ctx context.Context, conversationID string) ([]Message, error)
- func (q *Queries) GetLastOneMsgIdFromDb(ctx context.Context, conversationID string) (*string, error)
- func (q *Queries) GetMsgFromDbInRange(ctx context.Context, arg GetMsgFromDbInRangeParams) ([]Message, error)
- func (q *Queries) GetThe30MsgAfterTheId(ctx context.Context, arg GetThe30MsgAfterTheIdParams) ([]Message, error)
- func (q *Queries) GetThe30MsgBeforeTheId(ctx context.Context, arg GetThe30MsgBeforeTheIdParams) ([]Message, error)
- func (q *Queries) KickoutForConversation(ctx context.Context, arg []KickoutForConversationParams) *KickoutForConversationBatchResults
- func (q *Queries) SaveMsgToDb(ctx context.Context, arg []SaveMsgToDbParams) *SaveMsgToDbBatchResults
- func (q *Queries) SessionJoinsConversationUseCopyFrom(ctx context.Context, arg []SessionJoinsConversationUseCopyFromParams) (int64, error)
- func (q *Queries) UnArchiveConversations(ctx context.Context, conversationID []string) *UnArchiveConversationsBatchResults
- func (q *Queries) UpdateConversationLastMsg(ctx context.Context, arg UpdateConversationLastMsgParams) error
- func (q *Queries) UpdateSessionLastRecvMsg(ctx context.Context, arg UpdateSessionLastRecvMsgParams) error
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type SaveMsgToDbBatchResults
- type SaveMsgToDbParams
- type Session
- type SessionJoinsConversationUseCopyFromParams
- type UnArchiveConversationsBatchResults
- type UpdateConversationLastMsgParams
- type UpdateSessionLastRecvMsgParams
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrBatchAlreadyClosed = errors.New("batch already closed")
)
Functions ¶
func NewPostgresWithOpt ¶
func NewPostgresWithOpt(opts ...pgConnOpt) *postgresClientOpt
func WithDbName ¶
func WithDbName(dbName string) pgConnOpt
func WithMaxConns ¶
func WithMaxConns(maxConns int32) pgConnOpt
func WithMinConns ¶
func WithMinConns(minConns int32) pgConnOpt
func WithPassword ¶
func WithPassword(password string) pgConnOpt
func WithUsername ¶
func WithUsername(username string) pgConnOpt
Types ¶
type ArchiveConversationsBatchResults ¶
type ArchiveConversationsBatchResults struct {
// contains filtered or unexported fields
}
func (*ArchiveConversationsBatchResults) Close ¶
func (b *ArchiveConversationsBatchResults) Close() error
func (*ArchiveConversationsBatchResults) Exec ¶
func (b *ArchiveConversationsBatchResults) Exec(f func(int, error))
type Conversation ¶
type ConversationSessionID ¶
type DBTX ¶
type DBTX interface { Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) Query(context.Context, string, ...interface{}) (pgx.Rows, error) QueryRow(context.Context, string, ...interface{}) pgx.Row CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error) SendBatch(context.Context, *pgx.Batch) pgx.BatchResults }
type DeleteConversationsBatchResults ¶
type DeleteConversationsBatchResults struct {
// contains filtered or unexported fields
}
func (*DeleteConversationsBatchResults) Close ¶
func (b *DeleteConversationsBatchResults) Close() error
func (*DeleteConversationsBatchResults) Exec ¶
func (b *DeleteConversationsBatchResults) Exec(f func(int, error))
type KickoutForConversationBatchResults ¶
type KickoutForConversationBatchResults struct {
// contains filtered or unexported fields
}
func (*KickoutForConversationBatchResults) Close ¶
func (b *KickoutForConversationBatchResults) Close() error
func (*KickoutForConversationBatchResults) Exec ¶
func (b *KickoutForConversationBatchResults) Exec(f func(int, error))
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) ArchiveConversations ¶
func (q *Queries) ArchiveConversations(ctx context.Context, conversationID []string) *ArchiveConversationsBatchResults
func (*Queries) CheckJoinedonversation ¶
func (*Queries) CreateConversation ¶
func (q *Queries) CreateConversation(ctx context.Context, arg CreateConversationParams) error
func (*Queries) DeleteConversations ¶
func (q *Queries) DeleteConversations(ctx context.Context, conversationID []string) *DeleteConversationsBatchResults
func (*Queries) GetConversationInfo ¶
func (*Queries) GetConversationSessionCountByConversationPkId ¶
func (*Queries) GetConversationUnReadMsgCount ¶
func (*Queries) GetConversationsAllUsers ¶
func (q *Queries) GetConversationsAllUsers(ctx context.Context) ([]ConversationSessionID, error)
func (*Queries) GetJoinedConversations ¶
func (*Queries) GetJoinedConversationsUnReadMsgCount ¶
func (*Queries) GetLast30MsgFromDb ¶
func (*Queries) GetLastOneMsgIdFromDb ¶
func (*Queries) GetMsgFromDbInRange ¶
func (*Queries) GetThe30MsgAfterTheId ¶
func (*Queries) GetThe30MsgBeforeTheId ¶
func (*Queries) KickoutForConversation ¶
func (q *Queries) KickoutForConversation(ctx context.Context, arg []KickoutForConversationParams) *KickoutForConversationBatchResults
func (*Queries) SaveMsgToDb ¶
func (q *Queries) SaveMsgToDb(ctx context.Context, arg []SaveMsgToDbParams) *SaveMsgToDbBatchResults
func (*Queries) SessionJoinsConversationUseCopyFrom ¶
func (*Queries) UnArchiveConversations ¶
func (q *Queries) UnArchiveConversations(ctx context.Context, conversationID []string) *UnArchiveConversationsBatchResults
func (*Queries) UpdateConversationLastMsg ¶
func (q *Queries) UpdateConversationLastMsg(ctx context.Context, arg UpdateConversationLastMsgParams) error
func (*Queries) UpdateSessionLastRecvMsg ¶
func (q *Queries) UpdateSessionLastRecvMsg(ctx context.Context, arg UpdateSessionLastRecvMsgParams) error
type SaveMsgToDbBatchResults ¶
type SaveMsgToDbBatchResults struct {
// contains filtered or unexported fields
}
func (*SaveMsgToDbBatchResults) Close ¶
func (b *SaveMsgToDbBatchResults) Close() error
func (*SaveMsgToDbBatchResults) Exec ¶
func (b *SaveMsgToDbBatchResults) Exec(f func(int, error))
type SaveMsgToDbParams ¶
type UnArchiveConversationsBatchResults ¶
type UnArchiveConversationsBatchResults struct {
// contains filtered or unexported fields
}
func (*UnArchiveConversationsBatchResults) Close ¶
func (b *UnArchiveConversationsBatchResults) Close() error
func (*UnArchiveConversationsBatchResults) Exec ¶
func (b *UnArchiveConversationsBatchResults) Exec(f func(int, error))
Click to show internal directories.
Click to hide internal directories.