Documentation ¶
Index ¶
- Variables
- func FromMultiResult(r Result) multiResults
- func IsMultiResult(r Result) bool
- func RegisterTarget(target Target)
- type Config
- type Disk
- type FileSystem
- func (f *FileSystem) Delete(key string, options ...HandleFunc) error
- func (f *FileSystem) Download(ctx context.Context, downloadUrl, filename string) error
- func (f *FileSystem) Exists(filename string, options ...HandleFunc) bool
- func (f *FileSystem) Setup() (err error)
- func (f *FileSystem) Upload(filename string, key string, options ...HandleFunc) (Result, error)
- func (f *FileSystem) Url(key string, options ...HandleFunc) string
- func (f *FileSystem) Use(name string) Disk
- type HandleFunc
- type LocalDisk
- func (l LocalDisk) Delete(key string, options ...HandleFunc) error
- func (l LocalDisk) Exists(key string, options ...HandleFunc) bool
- func (l LocalDisk) Fullname(key string) string
- func (l LocalDisk) IsEnable() bool
- func (l LocalDisk) Upload(filename, key string, options ...HandleFunc) (Result, error)
- func (l LocalDisk) Url(key string, options ...HandleFunc) string
- type LocalResult
- type Option
- type Result
- type Target
Constants ¶
This section is empty.
Variables ¶
View Source
var File_component_filesystem_filesystem_proto protoreflect.FileDescriptor
Functions ¶
func FromMultiResult ¶
func FromMultiResult(r Result) multiResults
func IsMultiResult ¶
func RegisterTarget ¶
func RegisterTarget(target Target)
RegisterTarget registers the provided Target for use with all Transport clients and servers.
Types ¶
type Config ¶
type Config struct { Default string `protobuf:"bytes,1,opt,name=default,proto3" json:"default,omitempty"` Disks map[string]*structpb.Struct `` /* 151-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Config) Descriptor
deprecated
func (*Config) GetDefault ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
type Disk ¶
type Disk interface { Exists(key string, options ...HandleFunc) bool Upload(filename, key string, options ...HandleFunc) (Result, error) Url(key string, options ...HandleFunc) string Delete(key string, options ...HandleFunc) error }
func NewMultiDisks ¶
type FileSystem ¶
type FileSystem struct {
// contains filtered or unexported fields
}
func (*FileSystem) Delete ¶
func (f *FileSystem) Delete(key string, options ...HandleFunc) error
func (*FileSystem) Download ¶
func (f *FileSystem) Download(ctx context.Context, downloadUrl, filename string) error
func (*FileSystem) Exists ¶
func (f *FileSystem) Exists(filename string, options ...HandleFunc) bool
func (*FileSystem) Setup ¶
func (f *FileSystem) Setup() (err error)
func (*FileSystem) Upload ¶
func (f *FileSystem) Upload(filename string, key string, options ...HandleFunc) (Result, error)
func (*FileSystem) Url ¶
func (f *FileSystem) Url(key string, options ...HandleFunc) string
func (*FileSystem) Use ¶
func (f *FileSystem) Use(name string) Disk
type HandleFunc ¶
type HandleFunc func(Option)
func IsExist ¶
func IsExist(exists bool) HandleFunc
func WithContext ¶
func WithContext(ctx context.Context) HandleFunc
type LocalDisk ¶
type LocalDisk struct { Enable bool `json:"enable,omitempty"` Root string `json:"root,omitempty"` Domain string `json:"domain,omitempty"` BasePath string `json:"basePath,omitempty"` }
type LocalResult ¶
type LocalResult string
func (LocalResult) Name ¶
func (l LocalResult) Name() string
func (LocalResult) Raw ¶
func (l LocalResult) Raw() any
Click to show internal directories.
Click to hide internal directories.