Documentation
¶
Index ¶
- func NewConnection(ctx context.Context, host, port, database, username, password string) (driver.Conn, error)
- type ChatRepository
- func (r ChatRepository) DeleteChannel(ctx context.Context, channel *chat.Channel) error
- func (r ChatRepository) GetChannel(ctx context.Context, uuid uuid.UUID) (*chat.Channel, error)
- func (r ChatRepository) GetChannels(ctx context.Context) ([]*chat.Channel, error)
- func (r ChatRepository) GetMessages(ctx context.Context, channel, username string, limit, offset int) ([]*chat.Message, error)
- func (r ChatRepository) PrepareDatabase(ctx context.Context) error
- func (r ChatRepository) SaveChannel(ctx context.Context, channel *chat.Channel) error
- func (r ChatRepository) SaveMessage(ctx context.Context, message *chat.Message) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChatRepository ¶
type ChatRepository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(conn driver.Conn, database string) *ChatRepository
func (ChatRepository) DeleteChannel ¶
func (ChatRepository) GetChannel ¶
func (ChatRepository) GetChannels ¶
func (ChatRepository) GetMessages ¶
func (ChatRepository) PrepareDatabase ¶
func (r ChatRepository) PrepareDatabase(ctx context.Context) error
func (ChatRepository) SaveChannel ¶
func (ChatRepository) SaveMessage ¶
Click to show internal directories.
Click to hide internal directories.