pkgdash/internal/source/gogs/gogs.go

37 lines
879 B
Go
Raw Normal View History

package gogs
import (
"context"
2024-03-31 14:49:40 +03:00
"fmt"
"git.unistack.org/unistack-org/pkgdash/internal/configcli"
"git.unistack.org/unistack-org/pkgdash/internal/modules"
)
type Gogs struct {
Token string
}
func NewGogs(cfg configcli.Config) *Gogs {
return &Gogs{
Token: cfg.Source.Token,
}
}
2024-03-31 14:49:40 +03:00
func (g *Gogs) Name() string {
return "gogs"
}
func (g *Gogs) RequestOpen(ctx context.Context, branch string, path string, mod modules.Update) error {
2024-03-31 14:49:40 +03:00
return fmt.Errorf("implement me")
}
func (g *Gogs) RequestClose(ctx context.Context, branch string, path string) error {
2024-03-31 14:49:40 +03:00
return fmt.Errorf("implement me")
}
func (g *Gogs) RequestUpdate(ctx context.Context, branch string, path string, mod modules.Update) error {
2024-03-31 14:49:40 +03:00
return fmt.Errorf("implement me")
}
2024-03-23 18:52:13 +03:00
func (g *Gogs) RequestList(ctx context.Context, branch string) (map[string]string, error) {
2024-03-31 14:49:40 +03:00
return nil, fmt.Errorf("implement me")
2024-03-23 18:52:13 +03:00
}