#8 implement interface Source and methods for gitea without Update (#9)

Прикинул метод Open и Delete, Update пока не до делал.

Co-authored-by: Gorbunov Kirill Andreevich <kgorbunov@mtsbank.ru>
Reviewed-on: #9
Co-authored-by: Кирилл Горбунов <kirya_gorbunov_2015@mail.ru>
Co-committed-by: Кирилл Горбунов <kirya_gorbunov_2015@mail.ru>
This commit is contained in:
Кирилл Горбунов
2024-03-24 20:52:32 +03:00
parent c9a16829fd
commit ec5c6c591d
32 changed files with 1766 additions and 464 deletions

View File

@@ -0,0 +1,31 @@
package gitlab
import (
"context"
"git.unistack.org/unistack-org/pkgdash/internal/configcli"
"git.unistack.org/unistack-org/pkgdash/internal/modules"
)
type Gitlab struct {
Token string
}
func NewGitlab(cfg configcli.Config) *Gitlab {
return &Gitlab{
Token: cfg.Source.Token,
}
}
func (g *Gitlab) RequestOpen(ctx context.Context, branch string, path string, mod modules.Update) error {
return nil
}
func (g *Gitlab) RequestClose(ctx context.Context, branch string, path string) error {
return nil
}
func (g *Gitlab) RequestUpdate(ctx context.Context, branch string, path string, mod modules.Update) error {
return nil
}
func (g *Gitlab) RequestList(ctx context.Context, branch string) (map[string]string, error) {
return nil, nil
}