Documentation ¶
Index ¶
- func Check(ctx context.Context, parser Parser, nodes []*yaml.Node) error
- func List() []string
- func Pin(ctx context.Context, res resolver.Resolver, parser Parser, nodes []*yaml.Node, ...) error
- func Unpin(ctx context.Context, nodes []*yaml.Node) error
- func Upgrade(ctx context.Context, res resolver.Resolver, parser Parser, nodes []*yaml.Node, ...) error
- type Actions
- type CircleCI
- type CloudBuild
- type Drone
- type GitLabCI
- type Parser
- type RefsList
- type Tekton
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Check ¶ added in v0.1.2
Check iterates over all references in the yaml and checks if they are pinned to an absolute reference. It ignores "ratchet:exclude" nodes from the lookup.
func Pin ¶
func Pin(ctx context.Context, res resolver.Resolver, parser Parser, nodes []*yaml.Node, concurrency int64) error
Pin extracts all references from the given YAML document and resolves them using the given resolver, updating the associated YAML nodes.
func Unpin ¶
Unpin removes any pinned references and updates the actual YAML to be the original reference, leaving any other comment intact. This effectively replaces the YAML with the cached comment, which could result in losing the current pin.
This function does not make any outbound network calls and relies solely on information in the document.
Types ¶
type Actions ¶
type Actions struct{}
func (*Actions) DenormalizeRef ¶ added in v0.10.0
DenormalizeRef changes the resolved ref into a ref that the parser expects.
type CircleCI ¶ added in v0.2.0
type CircleCI struct{}
func (*CircleCI) DenormalizeRef ¶ added in v0.10.0
DenormalizeRef changes the resolved ref into a ref that the parser expects.
type CloudBuild ¶
type CloudBuild struct{}
func (*CloudBuild) DenormalizeRef ¶ added in v0.10.0
func (c *CloudBuild) DenormalizeRef(ref string) string
DenormalizeRef changes the resolved ref into a ref that the parser expects.
type Drone ¶ added in v0.4.0
type Drone struct{}
func (*Drone) DenormalizeRef ¶ added in v0.10.0
DenormalizeRef changes the resolved ref into a ref that the parser expects.
type GitLabCI ¶ added in v0.3.1
type GitLabCI struct{}
func (*GitLabCI) DenormalizeRef ¶ added in v0.10.0
DenormalizeRef changes the resolved ref into a ref that the parser expects.
type Parser ¶
type Parser interface { DenormalizeRef(ref string) string Parse(nodes []*yaml.Node) (*RefsList, error) }
Parser defines an interface which parses references out of the given yaml node.
type Tekton ¶ added in v0.9.0
type Tekton struct{}
func (*Tekton) DenormalizeRef ¶ added in v0.10.0
DenormalizeRef changes the resolved ref into a ref that the parser expects.