client

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrReposNotFoundInContext = errors.New("repos map not found in context")
)
View Source
var (
	ErrUnstagedChanges = errors.New("unstanged changes")
)

Functions

func RepoMap

func RepoMap(ctx context.Context) (map[string][]*Repository, error)

func Verbose added in v0.0.2

func Verbose(ctx context.Context) bool

func WithExcludes

func WithExcludes(ctx context.Context, repos []*Repository) context.Context

func WithRepos

func WithRepos(ctx context.Context, repos []*github.Repository) context.Context

func WithVerbose added in v0.0.2

func WithVerbose(ctx context.Context, verbose bool) context.Context

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(cfg *config.Config) (*Client, error)

func (*Client) Add added in v0.0.2

func (c *Client) Add(ctx context.Context, dirs []string, name, baseURL string) error

func (*Client) Branches added in v0.0.2

func (c *Client) Branches(ctx context.Context, dirs []string, args ...string) error

func (*Client) CheckoutRepos

func (c *Client) CheckoutRepos(ctx context.Context, dirs []string, args ...string) error

func (*Client) CloneRepos

func (c *Client) CloneRepos(ctx context.Context, baseDir string) ([]*Repository, error)

func (*Client) DiffRepos added in v0.0.3

func (c *Client) DiffRepos(ctx context.Context, dirs []string, cfg *DiffConfig) error

func (*Client) GetDirs

func (c *Client) GetDirs(ctx context.Context, baseDir string) ([]string, error)

func (*Client) GetLogins

func (c *Client) GetLogins(ctx context.Context) ([]string, error)

func (*Client) GetRepos

func (c *Client) GetRepos(ctx context.Context, name string) ([]*github.Repository, error)

func (*Client) ListBranches added in v0.0.2

func (c *Client) ListBranches(ctx context.Context, dirs []string, args ...string) error

func (*Client) ListTags added in v0.0.2

func (c *Client) ListTags(ctx context.Context, dirs []string, args ...string) error

func (*Client) LogRepos added in v0.0.3

func (c *Client) LogRepos(ctx context.Context, dirs []string, ignoreEmpty bool, args ...string) error

func (*Client) PullRepos

func (c *Client) PullRepos(ctx context.Context, dirs []string, args ...string) error

func (*Client) PushRepos added in v0.0.2

func (c *Client) PushRepos(ctx context.Context, dirs []string, args ...string) error

func (*Client) Remotes added in v0.0.2

func (c *Client) Remotes(ctx context.Context, dirs []string, args ...string) error

func (*Client) Remove added in v0.0.2

func (c *Client) Remove(ctx context.Context, dirs []string, name string) error

func (*Client) SetURLs added in v0.0.2

func (c *Client) SetURLs(ctx context.Context, dirs []string, name, baseURL string) error

func (*Client) TagRepos added in v0.0.2

func (c *Client) TagRepos(ctx context.Context, dirs []string, args ...string) error

type Clienter added in v0.0.2

type Clienter interface {
	Add(ctx context.Context, dirs []string, name, baseURL string) error
	Branches(ctx context.Context, repoDirs []string, args ...string) error
	CheckoutRepos(ctx context.Context, repoDirs []string, args ...string) error
	CloneRepos(ctx context.Context, dir string) ([]*Repository, error)
	DiffRepos(ctx context.Context, repoDirs []string, cfg *DiffConfig) error
	GetDirs(ctx context.Context, dir string) ([]string, error)
	GetLogins(ctx context.Context) ([]string, error)
	GetRepos(ctx context.Context, name string) ([]*github.Repository, error)
	ListTags(ctx context.Context, repoDirs []string, args ...string) error
	LogRepos(ctx context.Context, repoDirs []string, ignoreEmtpy bool, args ...string) error
	PullRepos(ctx context.Context, repoDirs []string, args ...string) error
	PushRepos(ctx context.Context, repoDirs []string, args ...string) error
	Remotes(ctx context.Context, repoDirs []string, args ...string) error
	Remove(ctx context.Context, dirs []string, name string) error
	SetURLs(ctx context.Context, repoDirs []string, name, baseURL string) error
	TagRepos(ctx context.Context, repoDirs []string, args ...string) error
}

type DiffConfig added in v0.0.3

type DiffConfig struct {
	IgnoreEmpty      bool
	IgnoreFilePrefix []string
	MatchExtension   []string
	Args             []string
}

type Repository added in v0.0.2

type Repository struct {
	// contains filtered or unexported fields
}

func Excludes

func Excludes(ctx context.Context) ([]*Repository, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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