Documentation
¶
Index ¶
- Constants
- type Cloud
- func (st *Cloud) GetURL(ctx context.Context, route string) (string, error)
- func (st *Cloud) List(ctx context.Context, query storage.Query, h storage.IterHandler) error
- func (st *Cloud) Remove(ctx context.Context, route string) error
- func (st *Cloud) Upload(ctx context.Context, prefix string, f io.ReadCloser) (string, error)
- type File
- func (f *File) CreatedTime() (time.Time, error)
- func (f *File) FolderInfo() (name string, path string, exist bool)
- func (f *File) GetURL() string
- func (f *File) ModTime() (time.Time, error)
- func (f *File) Name() string
- func (f *File) NewReader(ctx context.Context) (reader io.ReadCloser, closeFn func() error, err error)
- func (f *File) NewWriter(ctx context.Context) (writer io.WriteCloser, closeFn func() error)
- func (f *File) Path() string
- func (f *File) Remove(ctx context.Context) error
- func (f *File) Size() (int64, error)
- type Folder
Constants ¶
View Source
const StorageDomain = "https://storage.googleapis.com/"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
Handle *storage.BucketHandle `json:"-"`
FilePath string `json:"path,omitempty"`
PublicURL string `json:"public_url,omitempty"`
MediaLink string `json:"media_link,omitempty"`
ContentType string `json:"content_type,omitempty"`
FileSize int64 `json:"size,omitempty"`
Created time.Time `json:"created,omitempty"`
Updated time.Time `json:"updated,omitempty"`
Folder *Folder `json:"folders,omitempty"`
}
func (*File) GetURL ¶
GetURL fetches the file URL for downloading but returns ErrNotFound if no found.
Click to show internal directories.
Click to hide internal directories.