Documentation
¶
Overview ¶
Package context provides request-scoped state helpers used throughout the align client.
Index ¶
- Variables
- func Concurrency(ctx context.Context, fallback int) (int, error)
- func IgnoredRepos(ctx context.Context) []string
- func RemoveExcludes(ctx context.Context, repoMap map[string][]*Repository) (map[string][]*Repository, error)
- func RepoMap(ctx context.Context) (map[string][]*Repository, error)
- func Verbose(ctx context.Context) bool
- func WithConcurrency(ctx context.Context, limit int) context.Context
- func WithExcludes(ctx context.Context, repos []*Repository) context.Context
- func WithIgnoredRepos(ctx context.Context, names []string) context.Context
- func WithRepos(ctx context.Context, repos []*github.Repository) context.Context
- func WithVerbose(ctx context.Context, verbose bool) context.Context
- type Repository
Constants ¶
This section is empty.
Variables ¶
var ( // ErrReposNotFoundInContext is returned by RepoMap when no repository map has been stored in the context. ErrReposNotFoundInContext = errors.New("repos map not found in context") )
Functions ¶
func Concurrency ¶ added in v0.0.6
Concurrency returns the override or fallback, rejecting nonpositive limits.
func IgnoredRepos ¶ added in v0.0.6
IgnoredRepos returns the local directory exclusions, or nil when unset.
func RemoveExcludes ¶
func RemoveExcludes(ctx context.Context, repoMap map[string][]*Repository) (map[string][]*Repository, error)
RemoveExcludes returns a copy of repoMap with excluded repositories removed.
func RepoMap ¶
func RepoMap(ctx context.Context) (map[string][]*Repository, error)
RepoMap retrieves the directory→repository map from ctx.
func WithConcurrency ¶ added in v0.0.6
WithConcurrency stores an invocation-scoped limit for operations that support it.
func WithExcludes ¶
func WithExcludes(ctx context.Context, repos []*Repository) context.Context
WithExcludes stores the repository exclusion list in ctx.
func WithIgnoredRepos ¶ added in v0.0.6
WithIgnoredRepos stores exact local directory names to exclude from discovery.
Types ¶
type Repository ¶
Repository holds the name and SSH URL of a repository to clone.