2024-03-24 20:52:32 +03:00
|
|
|
package gitlab
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2024-04-02 22:54:15 +03:00
|
|
|
"fmt"
|
2024-03-24 20:52:32 +03:00
|
|
|
|
|
|
|
"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,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-02 22:54:15 +03:00
|
|
|
func (g *Gitlab) Name() string {
|
|
|
|
return "gitlab"
|
|
|
|
}
|
|
|
|
|
2024-03-24 20:52:32 +03:00
|
|
|
func (g *Gitlab) RequestOpen(ctx context.Context, branch string, path string, mod modules.Update) error {
|
2024-04-02 22:54:15 +03:00
|
|
|
return fmt.Errorf("implement me")
|
2024-03-24 20:52:32 +03:00
|
|
|
}
|
|
|
|
func (g *Gitlab) RequestClose(ctx context.Context, branch string, path string) error {
|
2024-04-02 22:54:15 +03:00
|
|
|
return fmt.Errorf("implement me")
|
2024-03-24 20:52:32 +03:00
|
|
|
}
|
|
|
|
func (g *Gitlab) RequestUpdate(ctx context.Context, branch string, path string, mod modules.Update) error {
|
2024-04-02 22:54:15 +03:00
|
|
|
return fmt.Errorf("implement me")
|
2024-03-24 20:52:32 +03:00
|
|
|
}
|
|
|
|
func (g *Gitlab) RequestList(ctx context.Context, branch string) (map[string]string, error) {
|
2024-04-02 22:54:15 +03:00
|
|
|
return nil, fmt.Errorf("implement me")
|
2024-03-24 20:52:32 +03:00
|
|
|
}
|