Documentation ¶
Index ¶
- func NewPostgresDB(cfg Config) (*sqlx.DB, error)
- type Config
- type File
- type FilePostgres
- func (r *FilePostgres) Create(files []common.UploadedFile, userCode string) error
- func (r *FilePostgres) DeleteAll(userCode string) error
- func (r *FilePostgres) GetAll(userCode string) ([]common.File, error)
- func (r *FilePostgres) GetByCode(userCode string) (common.File, error)
- func (r *FilePostgres) UpdateStatus(userCode, errorMess string, status common.ProcessStatus) error
- type Repository
- type User
- type UserPostgres
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type File ¶
type File interface { GetAll(userCode string) ([]common.File, error) DeleteAll(userCode string) error Create(files []common.UploadedFile, userCode string) error UpdateStatus(userCode, errorMess string, status common.ProcessStatus) error GetByCode(userCode string) (common.File, error) }
File - интерфейс для работы с файлом
type FilePostgres ¶
type FilePostgres struct {
// contains filtered or unexported fields
}
func NewFilePostgres ¶
func NewFilePostgres(db *sqlx.DB) *FilePostgres
func (*FilePostgres) Create ¶
func (r *FilePostgres) Create(files []common.UploadedFile, userCode string) error
func (*FilePostgres) DeleteAll ¶
func (r *FilePostgres) DeleteAll(userCode string) error
func (*FilePostgres) GetByCode ¶
func (r *FilePostgres) GetByCode(userCode string) (common.File, error)
func (*FilePostgres) UpdateStatus ¶
func (r *FilePostgres) UpdateStatus(userCode, errorMess string, status common.ProcessStatus) error
type Repository ¶
Repository - репозиторий
type User ¶
type User interface { CreateUser(userCode uuid.UUID) error GetUser(code uuid.UUID) (common.User, error) }
User - интерфейс для работы с пользователем
type UserPostgres ¶
type UserPostgres struct {
// contains filtered or unexported fields
}
func NewUserPostgres ¶
func NewUserPostgres(db *sqlx.DB) *UserPostgres
func (*UserPostgres) CreateUser ¶
func (r *UserPostgres) CreateUser(userCode uuid.UUID) error
Click to show internal directories.
Click to hide internal directories.