cmd

package
v0.0.0-...-dc1648f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CatalogCmd

func CatalogCmd(cfg *config.Config) *cobra.Command

func LoadContractFromArgs

func LoadContractFromArgs(args []string) (*contract.Contract, error)

func NewCatalogExternalsCmd

func NewCatalogExternalsCmd() runner.SubCommand

NewCatalogExternalsCmd instantiates the "externals" subcommand.

func NewCatalogGenerateCmd

func NewCatalogGenerateCmd() runner.SubCommand

NewCatalogGenerateCmd instantiates the "generate" subcommand.

func NewCatalogGenerateFromExternalCmd

func NewCatalogGenerateFromExternalCmd() runner.SubCommand

NewCatalogGenerateFromExternalCmd instantiates the "generate" subcommand.

func NewLintCmd

func NewLintCmd() runner.SubCommand

NewLintCmd instantiates the "lint" subcommand.

func NewProbeCmd

func NewProbeCmd() runner.SubCommand

func NewReleaseCmd

func NewReleaseCmd() runner.SubCommand

NewReleaseCmd instantiates the NewReleaseCmd subcommand and flags.

func NewRenderCmd

func NewRenderCmd() runner.SubCommand

NewRenderCmd instantiate the "render" subcommand.

func NewRootCmd

func NewRootCmd(stream *tkncli.Stream) *cobra.Command

func NewSignCmd

func NewSignCmd() runner.SubCommand

NewSignCmd instantiate the SignCmd and flags.

func NewVerifyCmd

func NewVerifyCmd() runner.SubCommand

NewVerifyCmd instantiates the "verify" subcommand.

Types

type ExternalsCmd

type ExternalsCmd struct {
	// contains filtered or unexported fields
}

ExternalsCmd represents the "externals" subcommand to externals the signature of a resource file.

func (*ExternalsCmd) Cmd

func (v *ExternalsCmd) Cmd() *cobra.Command

Cmd exposes the cobra command instance.

func (*ExternalsCmd) Complete

func (v *ExternalsCmd) Complete(_ *config.Config, args []string) error

Complete asserts the required flags are informed, and the last argument is the resource file for signature verification.

func (*ExternalsCmd) Run

func (v *ExternalsCmd) Run(cfg *config.Config) error

Run

func (*ExternalsCmd) Validate

func (v *ExternalsCmd) Validate() error

Validate asserts all the required files exists.

type GenerateCmd

type GenerateCmd struct {
	// contains filtered or unexported fields
}

GenerateCmd represents the "generate" subcommand to generate the signature of a resource file.

func (*GenerateCmd) Cmd

func (v *GenerateCmd) Cmd() *cobra.Command

Cmd exposes the cobra command instance.

func (*GenerateCmd) Complete

func (v *GenerateCmd) Complete(_ *config.Config, args []string) error

Complete asserts the required flags are informed, and the last argument is the resource file for signature verification.

func (*GenerateCmd) Run

func (v *GenerateCmd) Run(cfg *config.Config) error

Run wrapper around "cosign generate-blob" command.

func (*GenerateCmd) Validate

func (v *GenerateCmd) Validate() error

Validate asserts all the required files exists.

type GenerateFromExternalCmd

type GenerateFromExternalCmd struct {
	// contains filtered or unexported fields
}

GenerateFromExternalCmd represents the "generate" subcommand to generate the signature of a resource file.

func (*GenerateFromExternalCmd) Cmd

Cmd exposes the cobra command instance.

func (*GenerateFromExternalCmd) Complete

func (v *GenerateFromExternalCmd) Complete(_ *config.Config, args []string) error

Complete asserts the required flags are informed, and the last argument is the resource file for signature verification.

func (*GenerateFromExternalCmd) Run

Run wrapper around "cosign generate-blob" command.

func (*GenerateFromExternalCmd) Validate

func (v *GenerateFromExternalCmd) Validate() error

Validate asserts all the required files exists.

type GitHubMatrixObject

type GitHubMatrixObject struct {
	Include []GitHubRunObject `json:"include"`
}

type GitHubRunObject

type GitHubRunObject struct {
	Name           string `json:"name"`
	URL            string `json:"url"`
	Type           string `json:"type"`
	IgnoreVersions string `json:"ignoreVersions"`
}

type LintCmd

type LintCmd struct {
	// contains filtered or unexported fields
}

LintCmd "lint" subcommand, to assert the best practices on a Tekton resource file.

func (*LintCmd) Cmd

func (l *LintCmd) Cmd() *cobra.Command

Cmd shares the Cobra command instance.

func (*LintCmd) Complete

func (l *LintCmd) Complete(_ *config.Config, args []string) error

Complete asserts a single argument is informed.

func (*LintCmd) Run

func (l *LintCmd) Run(cfg *config.Config) error

Run runs the linter against the informed resource file.

func (*LintCmd) Validate

func (l *LintCmd) Validate() error

Validate assert the informed file exists.

type ProbeCmd

type ProbeCmd struct {
	// contains filtered or unexported fields
}

func (*ProbeCmd) Cmd

func (p *ProbeCmd) Cmd() *cobra.Command

func (*ProbeCmd) Complete

func (p *ProbeCmd) Complete(_ *config.Config, args []string) error

func (*ProbeCmd) Run

func (p *ProbeCmd) Run(cfg *config.Config) error

func (*ProbeCmd) Validate

func (p *ProbeCmd) Validate() error

type ReleaseCmd

type ReleaseCmd struct {
	// contains filtered or unexported fields
}

ReleaseCmd creates a contract (".catalog.yaml") based on Tekton resources files.

func (*ReleaseCmd) Cmd

func (r *ReleaseCmd) Cmd() *cobra.Command

Cmd exposes the cobra command instance.

func (*ReleaseCmd) Complete

func (r *ReleaseCmd) Complete(_ *config.Config, args []string) error

Complete creates the "release" scope by finding all Tekton resource files using the cli args glob pattern(s).

func (*ReleaseCmd) Run

func (r *ReleaseCmd) Run(_ *config.Config) error

Run creates a ".catalog.yaml" (contract file) with the release scope, saves the contract on the location informed by the "--output" flag.

func (*ReleaseCmd) Validate

func (r *ReleaseCmd) Validate() error

Validate assert the release scope is not empty.

type RenderCmd

type RenderCmd struct {
	// contains filtered or unexported fields
}

func (*RenderCmd) Cmd

func (r *RenderCmd) Cmd() *cobra.Command

Cmd shares the Cobra command instance.

func (*RenderCmd) Complete

func (r *RenderCmd) Complete(_ *config.Config, args []string) error

Complete asserts a single argument is informed.

func (*RenderCmd) Run

func (r *RenderCmd) Run(cfg *config.Config) error

Run renders the resource as markdown.

func (*RenderCmd) Validate

func (r *RenderCmd) Validate() error

Validate assert the informed resource file exists.

type SignCmd

type SignCmd struct {
	// contains filtered or unexported fields
}

SignCmd subcommand "sign" to handles signing contract resources.

func (*SignCmd) Cmd

func (s *SignCmd) Cmd() *cobra.Command

Cmd exposes the cobra command instance.

func (*SignCmd) Complete

func (s *SignCmd) Complete(_ *config.Config, args []string) error

Complete loads the contract file from the location informed on the first argument.

func (*SignCmd) Run

func (s *SignCmd) Run(_ *config.Config) error

Run perform the resource signing.

func (*SignCmd) Validate

func (*SignCmd) Validate() error

Validate implements runner.SubCommand.

type VerifyCmd

type VerifyCmd struct {
	// contains filtered or unexported fields
}

VerifyCmd represents the "verify" subcommand to verify the signature of a resource file.

func (*VerifyCmd) Cmd

func (v *VerifyCmd) Cmd() *cobra.Command

Cmd exposes the cobra command instance.

func (*VerifyCmd) Complete

func (v *VerifyCmd) Complete(_ *config.Config, args []string) error

Complete asserts the required flags are informed, and the last argument is the resource file for signature verification.

func (*VerifyCmd) Run

func (v *VerifyCmd) Run(cfg *config.Config) error

Run wrapper around "cosign verify-blob" command.

func (*VerifyCmd) Validate

func (v *VerifyCmd) Validate() error

Validate asserts all the required files exists.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL