jiri: v.io/jiri/profiles/profilescmdline Index | Files

package profilescmdline

import "v.io/jiri/profiles/profilescmdline"

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

Package Files

help.go manager_cmdline.go profile_manager.go reader_cmdline.go

func HelpMsg Uses

func HelpMsg() string

HelpMsg returns a detailed help message for the profiles packages.

func IsFlagSet Uses

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

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

func RegisterDBPathFlag Uses

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

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

func RegisterManagementCommands Uses

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

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

func RegisterMergePoliciesFlag Uses

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

RegisterMergePoliciesFlag registers the --merge-policies flag

func RegisterProfilesFlag Uses

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

RegisterProfilesFlag registers the --profiles flag

func RegisterReaderCommands Uses

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 Uses

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 Uses

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

type ReaderFlagValues Uses

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.

Package profilescmdline imports 18 packages (graph) and is imported by 33 packages. Updated 2018-08-24. Refresh now. Tools for package owners.