app

package
v0.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: Apache-2.0 Imports: 54 Imported by: 0

README

Open Component Model Command Line Tool

Config File

The command line tool can be configured by a configuration file. If not specified on the command line, the file ~/.ocmconfig is read.

The configuration file is a yaml file following format by the configuration context.

It consists of list of configuration specifications according to the registered configurations types provided by the used library. Every entry must provide an appropriate type field specifying the dedicated configuration format.

The basic layout looks as follows:

type: generic.config.ocm.software/v1
configurations:
  - type: credentials.config.ocm.software
    repositories:
      - repository:
          type: DockerConfig/v1
          dockerConfigFile: "~/.docker/config.json"
          propagateConsumerIdentity: true

The example above just lists a configuration specification supported by the credentials context, which configures the docker configuration file as credential repository to use. Additionally it is configured to assign the contained credentials to their OCI repositories managed by the OCI context.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCliCommand

func NewCliCommand(ctx clictx.Context, mod ...func(clictx.Context, *cobra.Command)) *cobra.Command

func NewCliCommandForArgs

func NewCliCommandForArgs(ctx clictx.Context, args []string, mod ...func(clictx.Context, *cobra.Command)) (*cobra.Command, error)

func NewVersionCommand

func NewVersionCommand(ctx clictx.Context) *cobra.Command

Types

type CLIOptions

type CLIOptions struct {
	Completed   bool
	Config      string
	Credentials []string
	Context     clictx.Context
	Settings    []string
	Verbose     bool
	LogLevel    string
	LogFile     string
	LogConfig   string
	Version     bool
	// contains filtered or unexported fields
}

func Prepare

func Prepare(ctx clictx.Context, args []string) (*CLIOptions, []string, error)

Prepare pre-prepares CLI options by evaluation the main options and providing an appropriately configured cli context.

func (*CLIOptions) AddFlags

func (o *CLIOptions) AddFlags(fs *pflag.FlagSet)

func (*CLIOptions) Close

func (o *CLIOptions) Close() error

func (*CLIOptions) Complete

func (o *CLIOptions) Complete() error

Jump to

Keyboard shortcuts

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