file

package
v1.3.100 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllFileIDType = []IDType{
	IDTypeOSSCounterID,
	IDTypeFileID,
}

Functions

This section is empty.

Types

type File

type File struct {
	ID        uint64
	URL       string
	Filename  string
	Namespace oss.Namespace
	IDType    IDType
}

type IDType

type IDType string
const (
	IDTypeOSSCounterID IDType = "oss_counter_id"
	IDTypeFileID       IDType = "file_id"
)

func (IDType) IsValid

func (f IDType) IsValid() bool

type Image

type Image struct {
	ID        uint64 `json:",omitempty"`
	URL       string
	Namespace string
	Primary   bool
	Hidden    bool
}

type RequestDTOUploadFile

type RequestDTOUploadFile struct {
	Namespace string                `form:"namespace" json:"namespace" binding:"required"`
	File      *multipart.FileHeader `form:"file" json:"file" binding:"required" swaggerignore:"true"`
}

func (*RequestDTOUploadFile) ToUploadImage

func (r *RequestDTOUploadFile) ToUploadImage() (*RequestDTOUploadImage, func() error, error)

type RequestDTOUploadImage

type RequestDTOUploadImage struct {
	Image     Upload
	Namespace oss.Namespace
}

type Upload

type Upload struct {
	File        io.Reader `swaggerignore:"true"`
	Filename    string
	Size        int64
	ContentType string
}

Jump to

Keyboard shortcuts

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