Documentation ¶
Index ¶
- type File
- type Mirror
- func (receiver *Mirror) AddFile(bucketName string, file File) bool
- func (receiver *Mirror) AddFolder(path string, lastModified time.Time)
- func (receiver *Mirror) FileExists(bucketName string, path string) bool
- func (receiver *Mirror) GetFileInfo(path string) *File
- func (receiver *Mirror) GetFolderInfo(parentPath string) map[string]WebFile
- func (receiver *Mirror) ListBuckets() []string
- func (receiver *Mirror) ListFiles(bucketName string) []*File
- type WebFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct { Path string `json:"path"` OriginURL string `json:"origin_url"` ContentLength int64 `json:"content_length"` ContentType string `json:"content_type"` LastModified time.Time `json:"last_modified"` }
File struct
type Mirror ¶
type Mirror struct {
// contains filtered or unexported fields
}
Mirror struct
var M *Mirror
M Mirror instance
func (*Mirror) AddFile ¶
AddFile add file to bucket @return ok bool. false: nothing changed, true: file data have been written
func (*Mirror) FileExists ¶
FileExists check file is exists
func (*Mirror) GetFileInfo ¶
GetFileInfo get file info
func (*Mirror) GetFolderInfo ¶
GetFolderInfo get folder info
func (*Mirror) ListBuckets ¶
ListBuckets get bucket name list
Click to show internal directories.
Click to hide internal directories.