clickhouse

package
v0.0.0-...-24ffa16 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnection

func NewConnection(ctx context.Context, host, port, database, username, password string) (driver.Conn, error)

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 (r ChatRepository) DeleteChannel(ctx context.Context, channel *chat.Channel) error

func (ChatRepository) GetChannel

func (r ChatRepository) GetChannel(ctx context.Context, uuid uuid.UUID) (*chat.Channel, error)

func (ChatRepository) GetChannels

func (r ChatRepository) GetChannels(ctx context.Context) ([]*chat.Channel, error)

func (ChatRepository) GetMessages

func (r ChatRepository) GetMessages(ctx context.Context, channel, username string, limit, offset int) ([]*chat.Message, error)

func (ChatRepository) PrepareDatabase

func (r ChatRepository) PrepareDatabase(ctx context.Context) error

func (ChatRepository) SaveChannel

func (r ChatRepository) SaveChannel(ctx context.Context, channel *chat.Channel) error

func (ChatRepository) SaveMessage

func (r ChatRepository) SaveMessage(ctx context.Context, message *chat.Message) error

Jump to

Keyboard shortcuts

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