hfilesvs

package
v1.1.44 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DownloadFlag = "FILE-DOWNLOAD"
	PreviewFlag  = "FILE-PREVIEW"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadRequest added in v1.1.0

type DownloadRequest struct {
	core.SlotRequestBase

	Path    *string `json:"path" param:"require"`
	Preview *bool   `json:"preview" param:"require"`
}

type FileService

type FileService struct {
	core.ServiceConf

	DatabaseKey string
	AutoMigrate bool
	Name        string
	Hash        string
	Storage     string
	CleanFs     bool
	MinioBucket string
}

type Service

type Service struct {
	core.Service
	// contains filtered or unexported fields
}

func New

func New() *Service

func (*Service) Config

func (this *Service) Config() core.IEntityConf

func (*Service) Download

func (this *Service) Download(req *DownloadRequest, res *core.SlotResponse)

func (*Service) EntityStub

func (this *Service) EntityStub() *core.EntityStub

func (*Service) Objects

func (this *Service) Objects() []interface{}

func (*Service) Open

func (this *Service) Open(s core.IServer, instance core.IService, options htypes.Any) *herrors.Error

func (*Service) Upload

func (this *Service) Upload(req *UploadRequest, res *core.SlotResponse)

type SvsFile

type SvsFile struct {
	gorm.Model

	Path string `json:"path" gorm:"size:50;index"`
	Name string `json:"name"`
	Size int    `json:"size"`
	Hash string `json:"hash" gorm:"index"`
}

type UploadFileItem added in v1.1.16

type UploadFileItem struct {
	Name string `json:"name"`
	Data []byte `json:"data"`
}

type UploadRequest added in v1.1.0

type UploadRequest struct {
	core.SlotRequestBase

	Files *[]UploadFileItem `json:"files" param:"require"`
}

Jump to

Keyboard shortcuts

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