初始化项目
This commit is contained in:
15
pkg/providers/backend.go
Normal file
15
pkg/providers/backend.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package providers
|
||||
|
||||
import "io"
|
||||
|
||||
type Blob struct {
|
||||
MediaType string
|
||||
io.ReadCloser
|
||||
}
|
||||
|
||||
type Backend interface {
|
||||
Owners() ([]string, error)
|
||||
Repos(owner string) ([]string, error)
|
||||
Branches(owner, repo string) ([]string, error)
|
||||
Open(owner, repo, branch, path string) (Blob, error)
|
||||
}
|
||||
24
pkg/providers/gitea.go
Normal file
24
pkg/providers/gitea.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package providers
|
||||
|
||||
type ProviderGitea struct {
|
||||
}
|
||||
|
||||
func (g *ProviderGitea) Owners() ([]string, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *ProviderGitea) Repos(owner string) ([]string, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *ProviderGitea) Branches(owner, repo string) ([]string, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *ProviderGitea) Open(owner, repo, branch, path string) (Blob, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
Reference in New Issue
Block a user