repository

package
v0.0.0-...-7fbc4b1 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasTransaction

func HasTransaction(ctx context.Context, tx *gorm.DB) *gorm.DB

Types

type FileAccessStore

type FileAccessStore interface {
	DB() *gorm.DB
	FindByID(ctx context.Context, id uint) (*domain.FileAccess, error)
	FindByHash(ctx context.Context, hash string) (*domain.FileAccess, error)
	Save(ctx context.Context, fileAccess *domain.FileAccess) error
	DeleteByID(ctx context.Context, id uint) error
}

func NewPostgresFileAccessStore

func NewPostgresFileAccessStore(db *gorm.DB) FileAccessStore

type FileStore

type FileStore interface {
	DB() *gorm.DB
	FindByID(ctx context.Context, id uint) (*domain.File, error)
	Save(ctx context.Context, file *domain.File) error
	DeleteByID(ctx context.Context, id uint) error
}

func NewPostgresFileStore

func NewPostgresFileStore(db *gorm.DB) FileStore

type PostgresFileAccessStore

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

func (*PostgresFileAccessStore) DB

func (r *PostgresFileAccessStore) DB() *gorm.DB

func (*PostgresFileAccessStore) DeleteByID

func (r *PostgresFileAccessStore) DeleteByID(ctx context.Context, id uint) error

func (*PostgresFileAccessStore) FindByHash

func (r *PostgresFileAccessStore) FindByHash(ctx context.Context, hash string) (*domain.FileAccess, error)

func (*PostgresFileAccessStore) FindByID

func (*PostgresFileAccessStore) Save

func (r *PostgresFileAccessStore) Save(ctx context.Context, fileAccess *domain.FileAccess) error

type PostgresFileStore

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

func (*PostgresFileStore) DB

func (r *PostgresFileStore) DB() *gorm.DB

func (*PostgresFileStore) DeleteByID

func (r *PostgresFileStore) DeleteByID(ctx context.Context, id uint) error

func (*PostgresFileStore) FindByID

func (r *PostgresFileStore) FindByID(ctx context.Context, id uint) (*domain.File, error)

func (*PostgresFileStore) Save

func (r *PostgresFileStore) Save(ctx context.Context, file *domain.File) error

type PostgresUserStore

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

func (*PostgresUserStore) DB

func (r *PostgresUserStore) DB() *gorm.DB

func (*PostgresUserStore) DeleteByID

func (r *PostgresUserStore) DeleteByID(ctx context.Context, id uint) error

func (*PostgresUserStore) FindAll

func (r *PostgresUserStore) FindAll(ctx context.Context) []*domain.User

func (*PostgresUserStore) FindByEmail

func (r *PostgresUserStore) FindByEmail(ctx context.Context, email string) (*domain.User, error)

func (*PostgresUserStore) FindByID

func (r *PostgresUserStore) FindByID(ctx context.Context, id uint) (*domain.User, error)

func (*PostgresUserStore) Save

func (r *PostgresUserStore) Save(ctx context.Context, user *domain.User) error

type UserStore

type UserStore interface {
	DB() *gorm.DB
	FindAll(ctx context.Context) []*domain.User
	FindByID(ctx context.Context, id uint) (*domain.User, error)
	FindByEmail(ctx context.Context, email string) (*domain.User, error)
	Save(ctx context.Context, user *domain.User) error
	DeleteByID(ctx context.Context, uuid uint) error
}

func NewPostgresUserStore

func NewPostgresUserStore(db *gorm.DB) UserStore

Jump to

Keyboard shortcuts

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