forge

package
v0.0.0-...-05b005d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrExists      = errors.New("already exists")
	ErrUnsupported = errors.New("not supported by this forge")
)

Functions

This section is empty.

Types

type Forge

type Forge interface {
	Create(ctx context.Context, user string, m Meta) error
	Update(ctx context.Context, user string, m Meta) error
	Archive(ctx context.Context, user, name string, flag bool) error
	Delete(ctx context.Context, user, name string) error
	List(ctx context.Context, user string) ([]string, error)
	Sync(ctx context.Context, user string, m Meta) error
}

forge abstracts forge CRUD operations create returns ErrExists if the repo already exists archive may return ErrUnsupported on forges without archive API list returns all repos owned by the authenticated user sync is create-or-update with archive handling

func Dispatch

func Dispatch(f config.Forge, token, domain string) (Forge, error)

type Meta

type Meta struct {
	Name     string
	Desc     *string
	Vis      config.Visibility
	Archived bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL