repository

package
v0.0.0-...-7767b9c Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileRepository

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

func NewFileRepository

func NewFileRepository(db *sqlx.DB) *FileRepository

func (*FileRepository) Clear

func (r *FileRepository) Clear() error

func (*FileRepository) Create

func (r *FileRepository) Create(file *domain.File) (uint, error)

func (*FileRepository) DeleteOne

func (r *FileRepository) DeleteOne(ID int) (int, error)

func (*FileRepository) GetAllIds

func (r *FileRepository) GetAllIds() []domain.FileTypeIds

func (*FileRepository) GetByID

func (r *FileRepository) GetByID(ID int) (*domain.File, error)

func (*FileRepository) GetIds

func (r *FileRepository) GetIds(fType string) []int

type Files

type Files interface {
	Create(file *domain.File) (uint, error)
	GetByID(ID int) (*domain.File, error)
	GetAllIds() []domain.FileTypeIds
	GetIds(fType string) []int
	DeleteOne(ID int) (int, error)
	Clear() error
}

type Repositories

type Repositories struct {
	Files Files
}

func NewRepositories

func NewRepositories(db *sqlx.DB) *Repositories

Jump to

Keyboard shortcuts

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