更新内容
This commit is contained in:
14
pkg/services/backend.go
Normal file
14
pkg/services/backend.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package services
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type Backend interface {
|
||||
// Repos return repo name + default branch
|
||||
Repos(owner string) (map[string]string, error)
|
||||
// Branches return branch + commit id
|
||||
Branches(owner, repo string) (map[string]string, error)
|
||||
// Open return file or error
|
||||
Open(client http.Client, owner, repo, commit, path string, headers map[string]string) (*http.Response, error)
|
||||
}
|
||||
7
pkg/services/cache.go
Normal file
7
pkg/services/cache.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package services
|
||||
|
||||
type Cache interface {
|
||||
Put(key string, value []byte) error
|
||||
Get(key string) ([]byte, error)
|
||||
Delete(key string) error
|
||||
}
|
||||
Reference in New Issue
Block a user