Documentation ¶
Index ¶
- Constants
- Variables
- func AddFileToVFolder(rail miso.Rail, tx *gorm.DB, req AddFileToVfolderReq, user common.User) error
- func BatchDeleteFileEp(inb *miso.Inbound, req BatchDeleteFileReq) (any, error)
- func BatchTransferAsync(rail miso.Rail, cmd TransferGalleryImageReq, user common.User, tx *gorm.DB) (any, error)
- func BootstrapServer(args []string)
- func CachedFindUser(rail miso.Rail, userNo string) (vault.UserInfo, error)
- func CalcDirSize(rail miso.Rail, fk string, db *gorm.DB) error
- func CompensateThumbnail(rail miso.Rail, tx *gorm.DB) error
- func CreateFile(rail miso.Rail, tx *gorm.DB, r CreateFileReq, user common.User) error
- func CreateFileEp(inb *miso.Inbound, req CreateFileReq) (any, error)
- func CreateGalleryAccess(rail miso.Rail, tx *gorm.DB, userNo string, galleryNo string, operator string) error
- func CreateGalleryForDir(rail miso.Rail, cmd CreateGalleryForDirCmd, tx *gorm.DB) (string, error)
- func CreateGalleryImage(rail miso.Rail, cmd CreateGalleryImageCmd, userNo string, username string, ...) error
- func CreateVFolder(rail miso.Rail, tx *gorm.DB, r CreateVFolderReq, user common.User) (string, error)
- func CreateVFolderEp(inb *miso.Inbound, req CreateVFolderReq) (string, error)
- func DeleteFile(rail miso.Rail, tx *gorm.DB, req DeleteFileReq, user common.User, ...) error
- func DeleteFileEp(inb *miso.Inbound, req DeleteFileReq) (any, error)
- func DeleteFstoreFile(rail miso.Rail, fileId string) error
- func DeleteGallery(rail miso.Rail, tx *gorm.DB, cmd DeleteGalleryCmd, user common.User) error
- func DeleteGalleryEp(inb *miso.Inbound, cmd DeleteGalleryCmd) (any, error)
- func DeleteGalleryImage(rail miso.Rail, tx *gorm.DB, fileKey string) error
- func DupPreflightCheckEp(inb *miso.Inbound, req PreflightCheckReq) (bool, error)
- func FileExists(c miso.Rail, tx *gorm.DB, req PreflightCheckReq, user common.User) (bool, error)
- func FindGalleryCreator(rail miso.Rail, galleryNo string, tx *gorm.DB) (*string, error)
- func GalleryExists(rail miso.Rail, tx *gorm.DB, galleryNo string) (bool, error)
- func GalleryNoOfDir(dirFileKey string, tx *gorm.DB) (string, error)
- func GenFileTknEp(inb *miso.Inbound, req GenerateTempTokenReq) (string, error)
- func GenFileTknQRCodeEp(inb *miso.Inbound)
- func GenFstoreTknAsync(rail miso.Rail, fileId string, name string) miso.Future[FstoreTmpToken]
- func GenFstoreTknBatch(rail miso.Rail, futures *miso.AwaitFutures[FstoreTmpToken], fileId string, ...)
- func GenTempToken(rail miso.Rail, tx *gorm.DB, r GenerateTempTokenReq, user common.User) (string, error)
- func GetFstoreTmpToken(rail miso.Rail, fileId string, filename string) (string, error)
- func GrantGalleryAccessToUser(rail miso.Rail, tx *gorm.DB, cmd PermitGalleryAccessCmd, user common.User) error
- func GranteGalleryAccessEp(inb *miso.Inbound, cmd PermitGalleryAccessCmd) (any, error)
- func GuessIsImage(rail miso.Rail, f FileInfo) bool
- func HandleAddFileToVFolderEvent(rail miso.Rail, tx *gorm.DB, evt AddFileToVfolderEvent) error
- func HandleZipUnpackResult(rail miso.Rail, db *gorm.DB, evt fstore.UnzipFileReplyEvent) error
- func HasAccessToGallery(rail miso.Rail, tx *gorm.DB, userNo string, galleryNo string) (bool, error)
- func ImMemBatchCalcDirSize(rail miso.Rail, db *gorm.DB) error
- func IsGalleryNameUsed(name string, userNo string, tx *gorm.DB) (bool, error)
- func ListFiles(rail miso.Rail, tx *gorm.DB, req ListFileReq, user common.User) (miso.PageRes[ListedFile], error)
- func ListFilesEp(inb *miso.Inbound, req ListFileReq) (miso.PageRes[ListedFile], error)
- func ListFilesInDir(rail miso.Rail, tx *gorm.DB, req ListFilesInDirReq) ([]string, error)
- func ListFilesInDirEp(inb *miso.Inbound, req ListFilesInDirReq) ([]string, error)
- func ListGalleries(rail miso.Rail, cmd ListGalleriesCmd, user common.User, db *gorm.DB) (miso.PageRes[VGallery], error)
- func ListGalleriesEp(inb *miso.Inbound, cmd ListGalleriesCmd) (miso.PageRes[VGallery], error)
- func ListGalleryAccessEp(inb *miso.Inbound, cmd ListGrantedGalleryAccessCmd) (miso.PageRes[ListedGalleryAccessRes], error)
- func ListedGrantedGalleryAccess(rail miso.Rail, tx *gorm.DB, req ListGrantedGalleryAccessCmd, user common.User) (miso.PageRes[ListedGalleryAccessRes], error)
- func MakeDir(rail miso.Rail, tx *gorm.DB, req MakeDirReq, user common.User) (string, error)
- func MakeDirEp(inb *miso.Inbound, req MakeDirReq) (string, error)
- func MoveFileToDir(rail miso.Rail, db *gorm.DB, req MoveIntoDirReq, user common.User) error
- func MoveFileToDirEp(inb *miso.Inbound, req MoveIntoDirReq) (any, error)
- func NewGalleryFileLock(rail miso.Rail, galleryNo string, fileKey string) *miso.RLock
- func NewVFolderLock(rail miso.Rail, folderNo string) *miso.RLock
- func OnAddFileToVfolderEvent(rail miso.Rail, evt AddFileToVfolderEvent) error
- func OnCalcDirSizeEvt(rail miso.Rail, evt CalcDirSizeEvt) error
- func OnCreateGalleryImgEvent(rail miso.Rail, evt CreateGalleryImgEvent) error
- func OnFileDeleted(rail miso.Rail, evt StreamEvent) error
- func OnFileSaved(rail miso.Rail, evt StreamEvent) error
- func OnImageCompressed(rail miso.Rail, evt hammer.ImageCompressReplyEvent) error
- func OnNotifyFileDeletedEvent(rail miso.Rail, evt NotifyFileDeletedEvent) error
- func OnThumbnailGenerated(rail miso.Rail, tx *gorm.DB, identifier string, fileId string) error
- func OnThumbnailUpdated(rail miso.Rail, evt StreamEvent) error
- func OnUnzipFileReplyEvent(rail miso.Rail, evt fstore.UnzipFileReplyEvent) error
- func OnVidoeThumbnailGenerated(rail miso.Rail, evt hammer.GenVideoThumbnailReplyEvent) error
- func PrepareEventBus(rail miso.Rail) error
- func PrepareServer()
- func PrintVersion(rail miso.Rail) error
- func RegisterHttpRoutes(rail miso.Rail) error
- func RemoveFileFromVFolder(rail miso.Rail, tx *gorm.DB, req RemoveFileFromVfolderReq, user common.User) error
- func RemoveGalleryAccess(rail miso.Rail, tx *gorm.DB, cmd RemoveGalleryAccessCmd, user common.User) error
- func RemoveGalleryAccessEp(inb *miso.Inbound, cmd RemoveGalleryAccessCmd) (any, error)
- func RemoveVFolder(rail miso.Rail, tx *gorm.DB, user common.User, req RemoveVFolderReq) error
- func RemoveVFolderAccess(rail miso.Rail, tx *gorm.DB, req RemoveGrantedFolderAccessReq, ...) error
- func RemoveVFolderAccessEp(inb *miso.Inbound, req RemoveGrantedFolderAccessReq) (any, error)
- func RemoveVFolderEp(inb *miso.Inbound, req RemoveVFolderReq) (any, error)
- func SaveFileRecord(rail miso.Rail, tx *gorm.DB, r SaveFileReq, user common.User) error
- func ShareVFolder(rail miso.Rail, tx *gorm.DB, sharedTo vault.UserInfo, folderNo string, ...) error
- func ShareVFolderEp(inb *miso.Inbound, req ShareVfolderReq) (any, error)
- func TransferGalleryImageEp(inb *miso.Inbound, cmd TransferGalleryImageReq) (any, error)
- func TransferImagesInDir(rail miso.Rail, cmd TransferGalleryImageInDirReq, user common.User, ...) error
- func TruncateDir(rail miso.Rail, db *gorm.DB, req DeleteFileReq, user common.User, async bool) error
- func TruncateDirEp(inb *miso.Inbound, req DeleteFileReq) (any, error)
- func UnpackZip(rail miso.Rail, db *gorm.DB, user common.User, req UnpackZipReq) error
- func UnpackZipEp(inb *miso.Inbound, req UnpackZipReq) (any, error)
- func UpdateFile(rail miso.Rail, tx *gorm.DB, r UpdateFileReq, user common.User) error
- func UpdateFileEp(inb *miso.Inbound, req UpdateFileReq) (any, error)
- func UpdateGallery(rail miso.Rail, cmd UpdateGalleryCmd, user common.User, tx *gorm.DB) error
- func UpdateGalleryEp(inb *miso.Inbound, cmd UpdateGalleryCmd) (any, error)
- func VFolderAddFileEp(inb *miso.Inbound, req AddFileToVfolderReq) (any, error)
- func VFolderRemoveFileEp(inb *miso.Inbound, req RemoveFileFromVfolderReq) (any, error)
- func ValidateFileOwner(rail miso.Rail, tx *gorm.DB, q ValidateFileOwnerReq) (bool, error)
- type AddFileToVfolderEvent
- type AddFileToVfolderReq
- type BatchDeleteFileReq
- type CalcDirSizeEvt
- type CreateFileReq
- type CreateGalleryCmd
- type CreateGalleryForDirCmd
- type CreateGalleryImageCmd
- type CreateGalleryImgEvent
- type CreateVFolderReq
- type DeleteFileReq
- type DeleteGalleryCmd
- type FetchFileInfoReq
- type FetchParentFileReq
- type FileDownloadInfo
- type FileInfo
- type FileInfoResp
- type FileKeyName
- type FileVFolder
- type FstoreFile
- type FstoreTmpToken
- type Gallery
- type GalleryImage
- type GalleryUserAccess
- type GenerateTempTokenReq
- type GrantAccessReq
- type ImageInfo
- type ImgStatus
- type ListFileReq
- type ListFilesInDirReq
- type ListGalleriesCmd
- type ListGalleryImagesCmd
- type ListGalleryImagesResp
- type ListGrantedFolderAccessReq
- type ListGrantedFolderAccessRes
- type ListGrantedGalleryAccessCmd
- type ListVFolderReq
- type ListVFolderRes
- type ListedDir
- type ListedFile
- type ListedFolderAccess
- type ListedGalleryAccessRes
- type ListedVFolder
- type MakeDirReq
- type MoveIntoDirReq
- type NotifyFileDeletedEvent
- type ParentFileInfo
- type PermitGalleryAccessCmd
- type PreflightCheckReq
- type RemoveFileFromVfolderReq
- type RemoveGalleryAccessCmd
- type RemoveGrantedAccessReq
- type RemoveGrantedFolderAccessReq
- type RemoveVFolderReq
- type SaveFileReq
- type ShareVfolderReq
- type StreamEvent
- type StreamEventColumn
- type ThumbnailInfo
- type TransferGalleryImageInDirReq
- type TransferGalleryImageReq
- type UnpackZipExtra
- type UnpackZipReq
- type UpdateFileReq
- type UpdateGUAIsDelCmd
- type UpdateGalleryCmd
- type UserVFolder
- type VFolder
- type VFolderBrief
- type VFolderWithOwnership
- type VGallery
- type VGalleryBrief
- type ValidateFileOwnerReq
Constants ¶
const ( FileTypeFile = "FILE" // file FileTypeDir = "DIR" // directory LDelN = 0 // normal file LDelY = 1 // file marked deleted PDelN = 0 // file marked deleted, the actual deletion is not yet processed PDelY = 1 // file finally deleted, may be removed from disk or move to somewhere else VfolderOwner = "OWNER" // owner of the vfolder VfolderGranted = "GRANTED" // granted access to the vfolder )
const ( FileSavedEventBus = "event.bus.vfm.file.saved" ThumbnailUpdatedEventBus = "event.bus.vfm.file.thumbnail.updated" FileLDeletedEventBus = "event.bus.vfm.file.logic.deleted" CalcDirSizeEventBus = "event.bus.vfm.dir.size.calc" AddFileToVFolderEventBus = "event.bus.vfm.file.vfolder.add" CompressImgNotifyEventBus = "vfm.image.compressed.event" GenVideoThumbnailNotifyEventBus = "vfm.video.thumbnail.generate" UnzipResultNotifyEventBus = "vfm.unzip.result.notify.event" AddDirGalleryImgEventBus = "event.bus.fantahsea.dir.gallery.image.add" SyncGalleryFileDeletedEventBus = "event.bus.fantahsea.notify.file.deleted" )
const ( NORMAL ImgStatus = "NORMAL" DELETED ImgStatus = "DELETED" // 40mb is the maximum size for an image IMAGE_SIZE_THRESHOLD int64 = 40 * 1048576 )
const (
FileStatusNormal = "NORMAL" // file.status - normal
)
const (
ManageFilesResource = "manage-files"
)
const (
PropVfmSiteHost = "vfm.site.host"
)
const (
Version = "v0.1.19"
)
Variables ¶
var ( UnzipResultNotifyPipeline = miso.NewEventPipeline[fstore.UnzipFileReplyEvent](UnzipResultNotifyEventBus) GenVideoThumbnailNotifyPipeline = miso.NewEventPipeline[hammer.GenVideoThumbnailReplyEvent](GenVideoThumbnailNotifyEventBus) CompressImgNotifyPipeline = miso.NewEventPipeline[hammer.ImageCompressReplyEvent](CompressImgNotifyEventBus) AddFileToVFolderPipeline = miso.NewEventPipeline[AddFileToVfolderEvent](AddFileToVFolderEventBus) CalcDirSizePipeline = miso.NewEventPipeline[CalcDirSizeEvt](CalcDirSizeEventBus) FileLDeletedPipeline = miso.NewEventPipeline[StreamEvent](FileLDeletedEventBus) ThumbnailUpdatedPipeline = miso.NewEventPipeline[StreamEvent](ThumbnailUpdatedEventBus) FileSavedPipeline = miso.NewEventPipeline[StreamEvent](FileSavedEventBus) AddDirGalleryImgPipeline = miso.NewEventPipeline[CreateGalleryImgEvent](AddDirGalleryImgEventBus) SyncGalleryFileDeletedPipeline = miso.NewEventPipeline[NotifyFileDeletedEvent](SyncGalleryFileDeletedEventBus) CompressImageTriggerPipeline = miso.NewEventPipeline[hammer.ImageCompressTriggerEvent](hammer.CompressImageTriggerEventBus) GenVideoThumbnailTriggerPipeline = miso.NewEventPipeline[hammer.GenVideoThumbnailTriggerEvent](hammer.GenVideoThumbnailTriggerEventBus) )
var (
SchemaFs embed.FS
)
Functions ¶
func AddFileToVFolder ¶
func BatchDeleteFileEp ¶
func BatchDeleteFileEp(inb *miso.Inbound, req BatchDeleteFileReq) (any, error)
func BatchTransferAsync ¶
func BootstrapServer ¶ added in v0.1.19
func BootstrapServer(args []string)
func CompensateThumbnail ¶ added in v0.1.14
func CreateFile ¶
func CreateFileEp ¶
func CreateFileEp(inb *miso.Inbound, req CreateFileReq) (any, error)
func CreateGalleryAccess ¶
func CreateGalleryAccess(rail miso.Rail, tx *gorm.DB, userNo string, galleryNo string, operator string) error
Assign user access to the gallery
func CreateGalleryForDir ¶
Create a new Gallery for dir
func CreateGalleryImage ¶
func CreateGalleryImage(rail miso.Rail, cmd CreateGalleryImageCmd, userNo string, username string, tx *gorm.DB) error
Create a gallery image record
func CreateVFolder ¶
func CreateVFolderEp ¶
func CreateVFolderEp(inb *miso.Inbound, req CreateVFolderReq) (string, error)
func DeleteFile ¶
func DeleteFileEp ¶
func DeleteFileEp(inb *miso.Inbound, req DeleteFileReq) (any, error)
func DeleteGallery ¶
Delete a gallery
func DeleteGalleryEp ¶
func DeleteGalleryEp(inb *miso.Inbound, cmd DeleteGalleryCmd) (any, error)
func DeleteGalleryImage ¶
func DupPreflightCheckEp ¶
func DupPreflightCheckEp(inb *miso.Inbound, req PreflightCheckReq) (bool, error)
func FileExists ¶
func FindGalleryCreator ¶
Find Gallery's creator by gallery_no
func GalleryExists ¶
Check if the gallery exists
func GenFileTknEp ¶
func GenFileTknEp(inb *miso.Inbound, req GenerateTempTokenReq) (string, error)
func GenFileTknQRCodeEp ¶ added in v0.1.10
func GenFstoreTknAsync ¶
func GenFstoreTknBatch ¶ added in v0.1.11
func GenFstoreTknBatch(rail miso.Rail, futures *miso.AwaitFutures[FstoreTmpToken], fileId string, name string)
func GenTempToken ¶
func GetFstoreTmpToken ¶
func GrantGalleryAccessToUser ¶
func GrantGalleryAccessToUser(rail miso.Rail, tx *gorm.DB, cmd PermitGalleryAccessCmd, user common.User) error
Grant user's access to the gallery, only the owner can do so
func GranteGalleryAccessEp ¶
func GranteGalleryAccessEp(inb *miso.Inbound, cmd PermitGalleryAccessCmd) (any, error)
func GuessIsImage ¶
Guess whether a file is an image
func HandleZipUnpackResult ¶
func HasAccessToGallery ¶
Check if user has access to the gallery
func ImMemBatchCalcDirSize ¶ added in v0.1.14
func IsGalleryNameUsed ¶
Check if the name is already used by current user
func ListFilesEp ¶
func ListFilesEp(inb *miso.Inbound, req ListFileReq) (miso.PageRes[ListedFile], error)
func ListFilesInDir ¶
func ListFilesInDirEp ¶
func ListFilesInDirEp(inb *miso.Inbound, req ListFilesInDirReq) ([]string, error)
func ListGalleries ¶
func ListGalleries(rail miso.Rail, cmd ListGalleriesCmd, user common.User, db *gorm.DB) (miso.PageRes[VGallery], error)
List Galleries
func ListGalleriesEp ¶
func ListGalleryAccessEp ¶
func ListGalleryAccessEp(inb *miso.Inbound, cmd ListGrantedGalleryAccessCmd) (miso.PageRes[ListedGalleryAccessRes], error)
func MoveFileToDir ¶
func MoveFileToDirEp ¶
func MoveFileToDirEp(inb *miso.Inbound, req MoveIntoDirReq) (any, error)
func NewGalleryFileLock ¶
func OnAddFileToVfolderEvent ¶
func OnAddFileToVfolderEvent(rail miso.Rail, evt AddFileToVfolderEvent) error
func OnCalcDirSizeEvt ¶
func OnCalcDirSizeEvt(rail miso.Rail, evt CalcDirSizeEvt) error
func OnCreateGalleryImgEvent ¶
func OnCreateGalleryImgEvent(rail miso.Rail, evt CreateGalleryImgEvent) error
func OnFileDeleted ¶
func OnFileDeleted(rail miso.Rail, evt StreamEvent) error
event-pump send binlog event when a file_info is deleted (is_logic_deleted changed) vfm notifies fantahsea about the delete
func OnFileSaved ¶
func OnFileSaved(rail miso.Rail, evt StreamEvent) error
event-pump send binlog event when a file_info record is saved. vfm guesses if the file is an image by file name, if so, vfm sends events to hammer to compress the image as a thumbnail
func OnImageCompressed ¶
func OnImageCompressed(rail miso.Rail, evt hammer.ImageCompressReplyEvent) error
hammer sends event message when the thumbnail image is compressed and saved on mini-fstore
func OnNotifyFileDeletedEvent ¶
func OnNotifyFileDeletedEvent(rail miso.Rail, evt NotifyFileDeletedEvent) error
func OnThumbnailGenerated ¶ added in v0.1.14
func OnThumbnailUpdated ¶
func OnThumbnailUpdated(rail miso.Rail, evt StreamEvent) error
event-pump send binlog event when a file_info's thumbnail is updated. vfm receives the event and check if the file has a thumbnail, if so, sends events to fantahsea to create a gallery image, adding current image to the gallery for its directory
func OnUnzipFileReplyEvent ¶
func OnUnzipFileReplyEvent(rail miso.Rail, evt fstore.UnzipFileReplyEvent) error
func OnVidoeThumbnailGenerated ¶ added in v0.1.14
func OnVidoeThumbnailGenerated(rail miso.Rail, evt hammer.GenVideoThumbnailReplyEvent) error
func PrepareEventBus ¶
func PrepareServer ¶
func PrepareServer()
func PrintVersion ¶ added in v0.1.19
func RegisterHttpRoutes ¶
func RemoveFileFromVFolder ¶
func RemoveGalleryAccess ¶
func RemoveGalleryAccessEp ¶
func RemoveGalleryAccessEp(inb *miso.Inbound, cmd RemoveGalleryAccessCmd) (any, error)
func RemoveVFolder ¶
func RemoveVFolderAccess ¶
func RemoveVFolderAccessEp ¶
func RemoveVFolderAccessEp(inb *miso.Inbound, req RemoveGrantedFolderAccessReq) (any, error)
func RemoveVFolderEp ¶
func RemoveVFolderEp(inb *miso.Inbound, req RemoveVFolderReq) (any, error)
func SaveFileRecord ¶
func ShareVFolder ¶
func ShareVFolderEp ¶
func ShareVFolderEp(inb *miso.Inbound, req ShareVfolderReq) (any, error)
func TransferGalleryImageEp ¶
func TransferGalleryImageEp(inb *miso.Inbound, cmd TransferGalleryImageReq) (any, error)
func TransferImagesInDir ¶
func TransferImagesInDir(rail miso.Rail, cmd TransferGalleryImageInDirReq, user common.User, tx *gorm.DB) error
Transfer images in dir
func TruncateDir ¶ added in v0.1.16
func TruncateDirEp ¶ added in v0.1.16
func TruncateDirEp(inb *miso.Inbound, req DeleteFileReq) (any, error)
func UnpackZipEp ¶
func UnpackZipEp(inb *miso.Inbound, req UnpackZipReq) (any, error)
func UpdateFile ¶
func UpdateFileEp ¶
func UpdateFileEp(inb *miso.Inbound, req UpdateFileReq) (any, error)
func UpdateGallery ¶
Update a Gallery
func UpdateGalleryEp ¶
func UpdateGalleryEp(inb *miso.Inbound, cmd UpdateGalleryCmd) (any, error)
func VFolderAddFileEp ¶
func VFolderAddFileEp(inb *miso.Inbound, req AddFileToVfolderReq) (any, error)
func VFolderRemoveFileEp ¶
func VFolderRemoveFileEp(inb *miso.Inbound, req RemoveFileFromVfolderReq) (any, error)
func ValidateFileOwner ¶
Types ¶
type AddFileToVfolderEvent ¶
type AddFileToVfolderReq ¶
type BatchDeleteFileReq ¶
type BatchDeleteFileReq struct {
FileKeys []string
}
type CalcDirSizeEvt ¶
type CalcDirSizeEvt struct {
FileKey string
}
type CreateFileReq ¶
type CreateGalleryCmd ¶
type CreateGalleryCmd struct {
Name string `json:"name" validation:"notEmpty"`
}
type CreateGalleryForDirCmd ¶
type CreateGalleryImageCmd ¶
type CreateGalleryImgEvent ¶
type CreateVFolderReq ¶
type CreateVFolderReq struct {
Name string `json:"name"`
}
type DeleteFileReq ¶
type DeleteFileReq struct {
Uuid string `json:"uuid"`
}
type DeleteGalleryCmd ¶
type DeleteGalleryCmd struct {
GalleryNo string `json:"galleryNo" validation:"notEmpty"`
}
type FetchFileInfoReq ¶
type FetchFileInfoReq struct {
FileKey string `form:"fileKey"`
}
type FetchParentFileReq ¶
type FetchParentFileReq struct {
FileKey string `form:"fileKey"`
}
type FileDownloadInfo ¶
type FileDownloadInfo struct { FileId int Name string IsLogicDeleted int FileType string FstoreFileId string UploaderNo string }
func (*FileDownloadInfo) Deleted ¶
func (f *FileDownloadInfo) Deleted() bool
func (*FileDownloadInfo) IsFile ¶
func (f *FileDownloadInfo) IsFile() bool
type FileInfo ¶
type FileInfo struct { Id int Name string Uuid string FstoreFileId string Thumbnail string // thumbnail is also a fstore's file_id IsLogicDeleted int IsPhysicDeleted int SizeInBytes int64 UploaderId int // deprecated. UploaderNo string // uploader's user_no UploaderName string UploadTime miso.ETime LogicDeleteTime miso.ETime PhysicDeleteTime miso.ETime UserGroup int FsGroupId int FileType string ParentFile string CreateTime miso.ETime CreateBy string UpdateTime miso.ETime UpdateBy string IsDel int }
type FileInfoResp ¶
type FileInfoResp struct { Name string `json:"name"` Uuid string `json:"uuid"` SizeInBytes int64 `json:"sizeInBytes"` UploaderNo string `json:"uploaderNo"` UploaderName string `json:"uploaderName"` IsDeleted bool `json:"isDeleted"` FileType string `json:"fileType"` ParentFile string `json:"parentFile"` LocalPath string `json:"localPath"` FstoreFileId string `json:"fstoreFileId"` Thumbnail string `json:"thumbnail"` }
func FetchFileInfoInternal ¶
func FetchFileInfoInternal(rail miso.Rail, tx *gorm.DB, req FetchFileInfoReq) (FileInfoResp, error)
type FileKeyName ¶
type FileVFolder ¶
type FstoreFile ¶
type FstoreFile struct { Id int64 `json:"id"` FileId string `json:"fileId"` Name string `json:"name"` Status string `json:"status"` Size int64 `json:"size"` Md5 string `json:"md5"` UplTime miso.ETime `json:"uplTime"` LogDelTime *miso.ETime `json:"logDelTime"` PhyDelTime *miso.ETime `json:"phyDelTime"` }
func FetchFstoreFileInfo ¶
func (FstoreFile) IsZero ¶
func (f FstoreFile) IsZero() bool
type FstoreTmpToken ¶
type Gallery ¶
type Gallery struct { ID int64 GalleryNo string UserNo string Name string DirFileKey string CreateTime miso.ETime CreateBy string UpdateTime miso.ETime UpdateBy string IsDel bool }
Gallery
func CreateGallery ¶
func CreateGallery(rail miso.Rail, cmd CreateGalleryCmd, user common.User, tx *gorm.DB) (*Gallery, error)
Create a new Gallery
func CreateGalleryEp ¶
func CreateGalleryEp(inb *miso.Inbound, cmd CreateGalleryCmd) (*Gallery, error)
func FindGallery ¶
Find Gallery by gallery_no
type GalleryImage ¶
type GalleryImage struct { ID int64 GalleryNo string ImageNo string Name string FileKey string Status ImgStatus CreateTime time.Time CreateBy string UpdateTime time.Time UpdateBy string IsDel bool }
Image that belongs to a Gallery
func (GalleryImage) TableName ¶
func (GalleryImage) TableName() string
type GalleryUserAccess ¶
type GalleryUserAccess struct { ID int64 GalleryNo string UserNo string CreateTime time.Time CreateBy string UpdateTime time.Time UpdateBy string IsDel bool }
User's access to a Gallery
func (GalleryUserAccess) TableName ¶
func (GalleryUserAccess) TableName() string
type GenerateTempTokenReq ¶
type GenerateTempTokenReq struct {
FileKey string `json:"fileKey"`
}
type GrantAccessReq ¶
type ListFileReq ¶
type ListFilesInDirReq ¶
type ListGalleriesCmd ¶
type ListGalleryImagesCmd ¶
type ListGalleryImagesResp ¶
type ListGalleryImagesResp struct { Images []ImageInfo `json:"images"` Paging miso.Paging `json:"paging"` }
func ListGalleryImages ¶
func ListGalleryImages(rail miso.Rail, tx *gorm.DB, cmd ListGalleryImagesCmd, user common.User) (*ListGalleryImagesResp, error)
List gallery images
func ListGalleryImagesEp ¶
func ListGalleryImagesEp(inb *miso.Inbound, cmd ListGalleryImagesCmd) (*ListGalleryImagesResp, error)
type ListGrantedFolderAccessRes ¶
type ListGrantedFolderAccessRes struct { Page miso.Paging `json:"paging"` Payload []ListedFolderAccess `json:"payload"` }
func ListGrantedFolderAccess ¶
func ListGrantedFolderAccess(rail miso.Rail, tx *gorm.DB, req ListGrantedFolderAccessReq, user common.User) (ListGrantedFolderAccessRes, error)
func ListVFolderAccessEp ¶
func ListVFolderAccessEp(inb *miso.Inbound, req ListGrantedFolderAccessReq) (ListGrantedFolderAccessRes, error)
type ListVFolderReq ¶
type ListVFolderRes ¶
type ListVFolderRes struct { Page miso.Paging `json:"paging"` Payload []ListedVFolder `json:"payload"` }
func ListVFolders ¶
func ListVFolders(rail miso.Rail, tx *gorm.DB, req ListVFolderReq, user common.User) (ListVFolderRes, error)
func ListVFoldersEp ¶
func ListVFoldersEp(inb *miso.Inbound, req ListVFolderReq) (ListVFolderRes, error)
type ListedFile ¶
type ListedFile struct { Id int `json:"id"` Uuid string `json:"uuid"` Name string `json:"name"` UploadTime miso.ETime `json:"uploadTime"` UploaderName string `json:"uploaderName"` SizeInBytes int64 `json:"sizeInBytes"` FileType string `json:"fileType"` UpdateTime miso.ETime `json:"updateTime"` ParentFileName string `json:"parentFileName"` SensitiveMode string `json:"sensitiveMode"` ThumbnailToken string `json:"thumbnailToken"` Thumbnail string `json:"-"` ParentFile string `json:"-"` }
type ListedFolderAccess ¶
type ListedGalleryAccessRes ¶
type ListedVFolder ¶
type MakeDirReq ¶
type MoveIntoDirReq ¶
type NotifyFileDeletedEvent ¶
type NotifyFileDeletedEvent struct {
FileKey string `json:"fileKey"`
}
type ParentFileInfo ¶
type ParentFileInfo struct { Zero bool `json:"-"` FileKey string `json:"fileKey"` Filename string `json:"fileName"` }
func FindParentFile ¶
func FindParentFile(c miso.Rail, tx *gorm.DB, req FetchParentFileReq, user common.User) (ParentFileInfo, error)
func GetParentFileEp ¶
func GetParentFileEp(inb *miso.Inbound, req FetchParentFileReq) (*ParentFileInfo, error)
type PermitGalleryAccessCmd ¶
type PreflightCheckReq ¶
type RemoveGalleryAccessCmd ¶
type RemoveGrantedAccessReq ¶
type RemoveVFolderReq ¶
type RemoveVFolderReq struct {
FolderNo string
}
type SaveFileReq ¶
type ShareVfolderReq ¶
type ShareVfolderReq struct {}
type StreamEvent ¶
type StreamEventColumn ¶
type ThumbnailInfo ¶
type TransferGalleryImageReq ¶
type TransferGalleryImageReq struct {
Images []CreateGalleryImageCmd
}
type UnpackZipExtra ¶
type UnpackZipReq ¶
type UpdateFileReq ¶
type UpdateGUAIsDelCmd ¶
type UpdateGalleryCmd ¶
type UserVFolder ¶
type VFolderBrief ¶
func ListVFolderBrief ¶
func ListVFolderBriefEp ¶
func ListVFolderBriefEp(inb *miso.Inbound) ([]VFolderBrief, error)
type VFolderWithOwnership ¶
type VFolderWithOwnership struct { Id int FolderNo string Name string CreateTime miso.ETime CreateBy string UpdateTime miso.ETime UpdateBy string Ownership string }
func (*VFolderWithOwnership) IsOwner ¶
func (f *VFolderWithOwnership) IsOwner() bool
type VGallery ¶
type VGallery struct { ID int64 `json:"id"` GalleryNo string `json:"galleryNo"` UserNo string `json:"userNo"` Name string `json:"name"` CreateTime miso.ETime `json:"-"` UpdateTime miso.ETime `json:"-"` CreateBy string `json:"createBy"` UpdateBy string `json:"updateBy"` IsOwner bool `json:"isOwner"` CreateTimeStr string `json:"createTime"` UpdateTimeStr string `json:"updateTime"` }
type VGalleryBrief ¶
func ListGalleryBriefsEp ¶
func ListGalleryBriefsEp(inb *miso.Inbound) ([]VGalleryBrief, error)
func ListOwnedGalleryBriefs ¶
List owned gallery briefs