Documentation ¶
Index ¶
- func Clone(pipe nuggit.Pipe) nuggit.Pipe
- func Deps(p nuggit.Pipe) iter.Seq[integrity.NameDigest]
- func Flatten(idx *Index, pipe nuggit.Pipe) (nuggit.Pipe, error)
- type Index
- func (i *Index) Add(name, digest string, pipe nuggit.Pipe)
- func (i *Index) All() iter.Seq2[integrity.NameDigest, nuggit.Pipe]
- func (i *Index) Get(name, digest string) (nuggit.Pipe, bool)
- func (i *Index) GetUnique(name string) (digest string, ok bool)
- func (i *Index) GetUniquePipe(name string) (nuggit.Pipe, bool)
- func (i *Index) Has(name, digest string) bool
- func (i *Index) HasName(name string) bool
- func (i *Index) Keys() iter.Seq[integrity.NameDigest]
- func (i *Index) Qualified() (*Index, error)
- func (idx *Index) Qualify(pipe nuggit.Pipe) (nuggit.Pipe, error)
- func (i *Index) Remove(name, digest string)
- func (i *Index) Reset()
- func (i *Index) Topo() iter.Seq2[integrity.NameDigest, error]
- func (i *Index) Values() iter.Seq[nuggit.Pipe]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Flatten ¶
Flatten recursively replaces all pipe actions with their definitions returning a new Pipe or an error if the process failed. The flattened pipe is fully hermetric, making no references to other pipes. If the given pipe definition is not present in referencedPipes a ErrInvalidArgument error is returned.
NOTE: The returned pipe will have a different digest than the input pipe. If the value in the index was qualified it will be rendered useless.
TODO: check the digests of pipes in referencedPipes.
Types ¶
type Index ¶ added in v1.8.0
type Index struct {
// contains filtered or unexported fields
}
func (*Index) GetUniquePipe ¶ added in v1.8.1
func (*Index) Qualified ¶ added in v1.8.2
Qualified returns a new index with all pipes qualified by digest.
func (*Index) Qualify ¶ added in v1.8.2
Qualify replaces all pipe references with a valid digest.
Qualify does not update the pipe digest in the index.
Use Qualified to create a new qualified index.