models

package
v0.0.0-...-5ed09de Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Uploader *UploaderConfig `json:"uploader"`
}

AppConfig ...

func NewConfig

func NewConfig() (*AppConfig, manager.IConfig, error)

NewConfig ...

type DownloadRequest

type DownloadRequest struct {
	Section  string `json:"section" validate:"nonzero" db:"section"`
	Size     string `json:"size" validate:"nonzero" db:"size"`
	IdUpload string `json:"id_upload" validate:"nonzero"`
}

type ErrorResponse

type ErrorResponse struct {
	Code    web.Status `json:"code,omitempty"`
	Message string     `json:"message,omitempty"`
	Cause   string     `json:"cause,omitempty"`
}

type ImageSize

type ImageSize struct {
	Name   string `json:"name" db:"name"`
	Path   string `json:"path" db:"path"`
	Width  int    `json:"width" db:"width"`
	Height int    `json:"height" db:"height"`
}

type ImageSizeList

type ImageSizeList []*ImageSize

func (*ImageSizeList) Scan

func (i *ImageSizeList) Scan(src interface{}) error

func (*ImageSizeList) Value

func (i *ImageSizeList) Value() (driver.Value, error)

type Section

type Section struct {
	IdSection  int           `json:"id_section" db:"id_section"`
	Name       string        `json:"name" db:"name"`
	Path       string        `json:"path" db:"path"`
	ImageSizes ImageSizeList `json:"image_sizes" db:"image_sizes"`
}

type UploadRequest

type UploadRequest struct {
	IdUpload string `json:"id_upload" db:"id_upload"`
	Name     string `json:"name" validate:"nonzero" db:"name"`
	Section  string `json:"section" validate:"nonzero" db:"section"`
	FileName string `json:"file_name" validate:"nonzero"`
	File     []byte `json:"file" validate:"nonzero" db:"file"`
}

type UploadResponse

type UploadResponse struct {
	IdUpload string `json:"id_upload"`
}

type UploaderConfig

type UploaderConfig struct {
	Storage   string                   `json:"storage"`
	Host      string                   `json:"host"`
	Db        manager.DBConfig         `json:"db"`
	Redis     manager.RedisConfig      `json:"redis"`
	Rabbitmq  manager.RabbitmqConfig   `json:"rabbitmq"`
	Dropbox   dropbox.DropboxConfig    `json:"dropbox"`
	Migration services.MigrationConfig `json:"migration"`
	Log       struct {
		Level string `json:"level"`
	} `json:"log"`
}

UploaderConfig ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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