Documentation
¶
Index ¶
- func ClearCache()
- func GetAllVersion(repo string, path string) (*[]Release, error)
- func GetGithubOtherFile(repo string, basePath string, cacheExpiration int) (*[]File, error)
- func GetNextDir(wholePath string, basePath string) string
- func GetRequest(url string, cacheExpiration int) (*resty.Response, error)
- func SetHeader(token string)
- type Addition
- type File
- type GithubReleases
- func (d *GithubReleases) Config() driver.Config
- func (d *GithubReleases) Copy(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error)
- func (d *GithubReleases) Drop(ctx context.Context) error
- func (d *GithubReleases) GetAddition() driver.Additional
- func (d *GithubReleases) Init(ctx context.Context) error
- func (d *GithubReleases) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)
- func (d *GithubReleases) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)
- func (d *GithubReleases) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) (model.Obj, error)
- func (d *GithubReleases) Move(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error)
- func (d *GithubReleases) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, ...) (model.Obj, error)
- func (d *GithubReleases) Remove(ctx context.Context, obj model.Obj) error
- func (d *GithubReleases) Rename(ctx context.Context, srcObj model.Obj, newName string) (model.Obj, error)
- type Release
- type ReleasesData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearCache ¶
func ClearCache()
func GetGithubOtherFile ¶
获取 README、LICENSE 等文件
func GetRequest ¶
发送 GET 请求
Types ¶
type Addition ¶
type Addition struct { driver.RootID RepoStructure string `` /* 166-byte string literal not displayed */ ShowReadme bool `json:"show_readme" type:"bool" default:"true" help:"show README、LICENSE file"` Token string `` /* 134-byte string literal not displayed */ ShowAllVersion bool `json:"show_all_version" type:"bool" default:"false" help:"show all versions"` }
type File ¶
type File struct { FileName string `json:"name"` Size int64 `json:"size"` CreateAt time.Time `json:"time"` UpdateAt time.Time `json:"chtime"` Url string `json:"url"` Type string `json:"type"` Path string `json:"path"` }
func (File) CreateTime ¶
type GithubReleases ¶
func (*GithubReleases) Config ¶
func (d *GithubReleases) Config() driver.Config
func (*GithubReleases) GetAddition ¶
func (d *GithubReleases) GetAddition() driver.Additional
func (*GithubReleases) Put ¶
func (d *GithubReleases) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) (model.Obj, error)
type Release ¶
type ReleasesData ¶
type ReleasesData struct { Files []File `json:"files"` Size int64 `json:"size"` UpdateAt time.Time `json:"chtime"` CreateAt time.Time `json:"time"` Url string `json:"url"` }
func GetRepoReleaseInfo ¶
func GetRepoReleaseInfo(repo string, version string, basePath string, cacheExpiration int) (*ReleasesData, error)
获取 GitHub Release 详细信息
Click to show internal directories.
Click to hide internal directories.