profilescmdline

package
Version: v0.0.0-...-abfb8b1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2016 License: BSD-3-Clause Imports: 18 Imported by: 3

Documentation

Overview

Package profilescmdline provides a command line driver (for v.io/x/lib/cmdline) for implementing jiri 'profile' subcommands. The intent is to support project specific instances of such profiles for managing software dependencies.

There are two ways of using the cmdline support, one is to read profile information, via RegisterReaderCommands and RegisterReaderCommandsUsingParent; the other is to manage profile installations via the RegisterManagementCommands function. The management commands can manage profiles that are linked into the binary itself or invoke external commands that implement the profile management. These external 'installer' commands are accessed by specifing them as a prefix to the profile name. For example myproject::go will invoke the external command jiri-profile-myproject with "go" as the profile name. Thus the following invocations are equivalent: jiri profile install myproject::go jiri profile-myproject install go

Regardless of which is used, the profile name, as seen by profile database readers will be myproject::go.

Package profilescmdline provides a command line driver (for v.io/x/lib/cmdline) for implementing jiri 'profile' subcommands. The intent is to support project specific instances of such profiles for managing software dependencies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HelpMsg

func HelpMsg() string

HelpMsg returns a detailed help message for the profiles packages.

func IsFlagSet

func IsFlagSet(fs *flag.FlagSet, name string) bool

IsFlagSet returns true if the specified flag has been set on the command line.

func RegisterDBPathFlag

func RegisterDBPathFlag(flags *flag.FlagSet, manifest *string, defaultDBPath string)

RegisterDBPathFlag registers the --profiles-db flag with the supplied FlagSet.

func RegisterManagementCommands

func RegisterManagementCommands(parent *cmdline.Command, useSubcommands bool, installer, defaultDBPath, defaultProfilesPath string)

RegisterManagementCommands registers the management subcommands: uninstall, install, update and cleanup.

func RegisterMergePoliciesFlag

func RegisterMergePoliciesFlag(flags *flag.FlagSet, policies *profilesreader.MergePolicies)

RegisterMergePoliciesFlag registers the --merge-policies flag

func RegisterProfilesFlag

func RegisterProfilesFlag(flags *flag.FlagSet, defaultProfiles string, profiles *string)

RegisterProfilesFlag registers the --profiles flag

func RegisterReaderCommands

func RegisterReaderCommands(parent *cmdline.Command, defaultProfiles, defaultDBPath string)

RegisterReaderCommands registers the list and env subcommands. The subcommands will host the 'reader' flags (see RegisterReaderFlags) resulting in a command line of the form: <parent> [list|env] <reader-flags> <list/env specific specific commands>

func RegisterReaderCommandsUsingParent

func RegisterReaderCommandsUsingParent(parent *cmdline.Command, fv *ReaderFlagValues, defaultProfiles, defaultDBPath string)

RegisterReaderCommandsUsingParent registers the 'reader' flags (see RegisterReaderFlags) with the parent command and creates the list and env subcommands. The values of the flags can be accessed via the supplied ReaderFlagValues struct. RegisterReaderCommandsUsingParent results in a command line of the form: <parent> <reader-flags> [list|env] <list/env specific commands>

func RegisterReaderFlags

func RegisterReaderFlags(flags *flag.FlagSet, fv *ReaderFlagValues, defaultProfiles, defaultDBPath string)

RegisterReaderFlags registers the 'reader' flags (see below) with the parent command. The values of the flags can be accessed via the supplied ReaderFlagValues struct. The reader flags are:

--skip-profiles
--profiles-db
--profiles
--merge-policies
--target and --env

Types

type ReaderFlagValues

type ReaderFlagValues struct {
	// The value of --skip-profiles
	ProfilesMode profilesreader.ProfilesMode
	// The value of --profiles-db
	DBFilename string
	// The value of --profiles
	Profiles string
	// The value of --target and --env
	Target profiles.Target
	// The value of --merge-policies
	MergePolicies profilesreader.MergePolicies
	// The value of -v
	Verbose bool
}

ReaderFlagValues contains the values of the command line flags accepted required to configure and use the profiles/Reader package.

Directories

Path Synopsis
internal
i1
Profiles are used to manage external sofware dependencies and offer a balance between providing no support at all and a full blown package manager.
Profiles are used to manage external sofware dependencies and offer a balance between providing no support at all and a full blown package manager.
i2
Profiles are used to manage external sofware dependencies and offer a balance between providing no support at all and a full blown package manager.
Profiles are used to manage external sofware dependencies and offer a balance between providing no support at all and a full blown package manager.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL