media

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyDB            = "admin.media.gorm.db"
	KeyNoCheckRouter = "admin.media.router.nocheck"
	KeyCheckRouter   = "admin.media.router.check"
)

Variables

This section is empty.

Functions

func CreateFolder

func CreateFolder(parent, name string, user *model.User) (string, error)

func GetMedia

func GetMedia(path, name string) (*model.Media, error)

func ListFolders

func ListFolders(path string) ([]model.MediaFolder, error)

func MakeMediaPublish

func MakeMediaPublish(siteID, path, name string, obj any, publish bool) error

func PrepareStoreLocalDir

func PrepareStoreLocalDir() (string, error)

func RemoveDirectory

func RemoveDirectory(path string) (string, error)

func RemoveFile

func RemoveFile(path, name string) error

func StoreExternal

func StoreExternal(externalUploader, path, name string, data []byte) (string, error)

func StoreLocal

func StoreLocal(uploadDir, storePath string, data []byte) (string, error)

func UploadFile

func UploadFile(path, name string, reader io.Reader) (*model.UploadResult, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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