清理复杂的流程
This commit is contained in:
@@ -7,17 +7,14 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type BranchInfo struct {
|
||||
type Metadata struct {
|
||||
ID string `json:"id"`
|
||||
LastModified time.Time `json:"last_modified"`
|
||||
}
|
||||
|
||||
type Backend interface {
|
||||
io.Closer
|
||||
// Repos return repo name + default branch
|
||||
Repos(ctx context.Context, owner string) (map[string]string, error)
|
||||
// Branches return branch + commit id
|
||||
Branches(ctx context.Context, owner, repo string) (map[string]*BranchInfo, error)
|
||||
Meta(ctx context.Context, owner, repo string) (*Metadata, error)
|
||||
// Open return file or error (error)
|
||||
Open(ctx context.Context, owner, repo, commit, path string, headers http.Header) (*http.Response, error)
|
||||
Open(ctx context.Context, owner, repo, id, path string, headers http.Header) (*http.Response, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user