storage

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

This section is empty.

Types

type Migrator

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

func NewMigrator

func NewMigrator(db *sql.DB, migrations fs.FS) *Migrator

func (*Migrator) Up

func (m *Migrator) Up(ctx context.Context) error

type NopStore

type NopStore struct{}

func NewNopStore

func NewNopStore() *NopStore

func (*NopStore) Broadcasts

func (s *NopStore) Broadcasts() message.BroadcastRepository

func (*NopStore) Channels

func (s *NopStore) Channels() channel.Repository

func (*NopStore) Close

func (s *NopStore) Close(ctx context.Context) error

func (*NopStore) Devices

func (s *NopStore) Devices() device.Repository

func (*NopStore) Migrate

func (s *NopStore) Migrate(ctx context.Context) error

func (*NopStore) ServerInvites

func (s *NopStore) ServerInvites() serverinvite.Repository

func (*NopStore) Users

func (s *NopStore) Users() user.Repository

type PostgresStore

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

func NewPostgresStore

func NewPostgresStore(ctx context.Context, dbURL string) (*PostgresStore, error)

func (*PostgresStore) Broadcasts

func (s *PostgresStore) Broadcasts() message.BroadcastRepository

func (*PostgresStore) Channels

func (s *PostgresStore) Channels() channel.Repository

func (*PostgresStore) Close

func (s *PostgresStore) Close(ctx context.Context) error

func (*PostgresStore) Devices

func (s *PostgresStore) Devices() device.Repository

func (*PostgresStore) Migrate

func (s *PostgresStore) Migrate(ctx context.Context) error

func (*PostgresStore) ServerInvites

func (s *PostgresStore) ServerInvites() serverinvite.Repository

func (*PostgresStore) Users

func (s *PostgresStore) Users() user.Repository

type Store

type Store interface {
	Close(ctx context.Context) error
	Migrate(ctx context.Context) error
	Users() user.Repository
	Devices() device.Repository
	Broadcasts() message.BroadcastRepository
	Channels() channel.Repository
	ServerInvites() serverinvite.Repository
}

Jump to

Keyboard shortcuts

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