Documentation
¶
Index ¶
- Variables
- func DiscoverConfigPath(startDir string) (string, error)
- func RenderInitConfigTemplate(ctx context.Context, rootDir string) ([]byte, error)
- type CellRefConfig
- type DependentEdit
- type DependentEntry
- type DependentsConfig
- type ProjectConfig
- func (c *ProjectConfig) AllowedCells(ctx context.Context) ([]string, error)
- func (c *ProjectConfig) AllowedDependentEntries(ctx context.Context) ([]DependentEntry, error)
- func (c *ProjectConfig) AllowedDependentRepos(ctx context.Context) ([]string, error)
- func (c *ProjectConfig) CanSubmitToCell(ctx context.Context, value string) (bool, error)
- func (c *ProjectConfig) CanonicalRepo(ctx context.Context) (string, error)
- func (c *ProjectConfig) CellNameFromRepo(ctx context.Context, repo string) (string, bool)
- func (c *ProjectConfig) CellResolution(ctx context.Context) (*cellref.Context, error)
- func (c *ProjectConfig) DefaultRef(ctx context.Context) (string, error)
- func (c *ProjectConfig) DependentCells(ctx context.Context) ([]string, error)
- func (c *ProjectConfig) DependentEntries(ctx context.Context) ([]DependentEntry, error)
- func (c *ProjectConfig) DependentRepos(ctx context.Context) ([]string, error)
- func (c *ProjectConfig) ExpandCellName(ctx context.Context, value string) (string, error)
- func (c *ProjectConfig) JobDBURI(ctx context.Context) (string, error)
- func (c *ProjectConfig) Path() string
- func (c *ProjectConfig) Pattern(ctx context.Context) (string, error)
- func (c *ProjectConfig) RootCell(ctx context.Context) (string, error)
- func (c *ProjectConfig) RootDir() string
- func (c *ProjectConfig) RootRef(ctx context.Context) (string, error)
- func (c *ProjectConfig) RootRepo(ctx context.Context) (string, error)
- func (c *ProjectConfig) SelfRef(ctx context.Context) (string, error)
- func (c *ProjectConfig) SelfRepo(ctx context.Context) (string, error)
- type SelfConfig
- type StringOrCommand
Constants ¶
This section is empty.
Variables ¶
var (
ErrConfigNotFound = errors.New("c2j config not found")
)
Functions ¶
func DiscoverConfigPath ¶
Types ¶
type CellRefConfig ¶
type CellRefConfig struct {
Repo StringOrCommand `yaml:"repo"`
Ref StringOrCommand `yaml:"ref"`
}
type DependentEdit ¶ added in v0.0.86
type DependentEdit struct {
Path string
Repo string
Status string
YAML []byte
Changed bool
// contains filtered or unexported fields
}
DependentEdit is a validated config edit. Preparing it never writes files.
func PrepareDependentEdit ¶ added in v0.0.86
func PrepareDependentEdit(ctx context.Context, startDir, value string, description *string) (*DependentEdit, error)
PrepareDependentEdit adds or updates a manual entry. A nil description leaves existing metadata alone; a pointer to an empty string clears it.
func (*DependentEdit) Write ¶ added in v0.0.86
func (e *DependentEdit) Write() error
Write atomically replaces the config, rejecting detected intervening changes. The last check is optimistic concurrency detection, not cross-process locking.
type DependentEntry ¶ added in v0.0.86
type DependentEntry struct {
Repo string `yaml:"repo"`
Description string `yaml:"description,omitempty"`
}
DependentEntry describes a repository in the dependent cell set.
type DependentsConfig ¶
type DependentsConfig struct {
Repos []string // Repository projection of Entries, retained for repo-only callers.
Entries []DependentEntry
Command string `yaml:"command"`
Filter string `yaml:"filter"`
// contains filtered or unexported fields
}
func (*DependentsConfig) UnmarshalYAML ¶
func (d *DependentsConfig) UnmarshalYAML(node *yaml.Node) error
type ProjectConfig ¶
type ProjectConfig struct {
// contains filtered or unexported fields
}
func LoadProjectConfig ¶
func LoadProjectConfig(startDir string) (*ProjectConfig, error)
func (*ProjectConfig) AllowedCells ¶
func (c *ProjectConfig) AllowedCells(ctx context.Context) ([]string, error)
func (*ProjectConfig) AllowedDependentEntries ¶ added in v0.0.86
func (c *ProjectConfig) AllowedDependentEntries(ctx context.Context) ([]DependentEntry, error)
AllowedDependentEntries applies discovery filters while retaining metadata.
func (*ProjectConfig) AllowedDependentRepos ¶
func (c *ProjectConfig) AllowedDependentRepos(ctx context.Context) ([]string, error)
func (*ProjectConfig) CanSubmitToCell ¶
func (*ProjectConfig) CanonicalRepo ¶
func (c *ProjectConfig) CanonicalRepo(ctx context.Context) (string, error)
func (*ProjectConfig) CellNameFromRepo ¶
func (*ProjectConfig) CellResolution ¶ added in v0.0.54
CellResolution captures effective settings; workers never execute config commands.
func (*ProjectConfig) DefaultRef ¶
func (c *ProjectConfig) DefaultRef(ctx context.Context) (string, error)
func (*ProjectConfig) DependentCells ¶
func (c *ProjectConfig) DependentCells(ctx context.Context) ([]string, error)
func (*ProjectConfig) DependentEntries ¶ added in v0.0.86
func (c *ProjectConfig) DependentEntries(ctx context.Context) ([]DependentEntry, error)
DependentEntries resolves descriptions with their repository locations.
func (*ProjectConfig) DependentRepos ¶
func (c *ProjectConfig) DependentRepos(ctx context.Context) ([]string, error)
DependentRepos projects repository locations from the resolved entries.
func (*ProjectConfig) ExpandCellName ¶
func (*ProjectConfig) JobDBURI ¶ added in v0.0.42
func (c *ProjectConfig) JobDBURI(ctx context.Context) (string, error)
func (*ProjectConfig) Path ¶
func (c *ProjectConfig) Path() string
func (*ProjectConfig) Pattern ¶
func (c *ProjectConfig) Pattern(ctx context.Context) (string, error)
func (*ProjectConfig) RootCell ¶
func (c *ProjectConfig) RootCell(ctx context.Context) (string, error)
func (*ProjectConfig) RootDir ¶
func (c *ProjectConfig) RootDir() string
func (*ProjectConfig) RootRef ¶
func (c *ProjectConfig) RootRef(ctx context.Context) (string, error)
func (*ProjectConfig) RootRepo ¶
func (c *ProjectConfig) RootRepo(ctx context.Context) (string, error)
type SelfConfig ¶ added in v0.0.5
type SelfConfig struct {
Repo StringOrCommand `yaml:"repo"`
Ref StringOrCommand `yaml:"ref"`
}
type StringOrCommand ¶
func (*StringOrCommand) UnmarshalYAML ¶
func (s *StringOrCommand) UnmarshalYAML(node *yaml.Node) error