Documentation
¶
Overview ¶
Package rename moves a package to the name its repository has now.
A package's name is part of everything: the branch its generated versions live on, the path aqua fetches them from, the entry the catalogue lists it under. A repository that is renamed or transferred leaves all of it under a name nobody uses, and the versions are not something to generate again -- each one was downloaded, hashed and opened on six machines to get there.
So the branch is carried over and the old name becomes an alias, which is how a configuration still asking for it resolves.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catalogue ¶
type Catalogue interface {
Rename(ctx context.Context, logger *slog.Logger, from, to string, cfg *aquag2.Config) error
}
Catalogue is the index a renamed package has to be listed in under its new name.
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller renames a package.
func (*Controller) Rename ¶
Rename moves the package from one name to the other.
The definition first, then the catalogue. The branch stays where it is -- it is named after the package's id, which is what an id is for -- so what moves is what the definition says the branch holds, and after it the entry the catalogue lists the package under.
The catalogue can go ahead of the pull request that carries the definition, because both names point at the same branch: a reader resolves either one to it, and what it holds for each version doesn't change. What the pull request settles is which name the registry will answer for once a run asks again.