Vasiliy Tolstov ae246907c9 fixup for 2fa auth in gitea
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2024-04-03 17:39:00 +03:00

39 lines
940 B
Go

package gogs
import (
"context"
"fmt"
"git.unistack.org/unistack-org/pkgdash/internal/configcli"
"git.unistack.org/unistack-org/pkgdash/internal/modules"
)
type Gogs struct {
Username string
Password string
}
func NewGogs(cfg configcli.Config) *Gogs {
return &Gogs{
Username: cfg.Source.Username,
Password: cfg.Source.Password,
}
}
func (g *Gogs) Name() string {
return "gogs"
}
func (g *Gogs) RequestOpen(ctx context.Context, branch string, path string, mod modules.Update) error {
return fmt.Errorf("implement me")
}
func (g *Gogs) RequestClose(ctx context.Context, branch string, path string) error {
return fmt.Errorf("implement me")
}
func (g *Gogs) RequestUpdate(ctx context.Context, branch string, path string, mod modules.Update) error {
return fmt.Errorf("implement me")
}
func (g *Gogs) RequestList(ctx context.Context, branch string) (map[string]string, error) {
return nil, fmt.Errorf("implement me")
}