commands

package
v0.0.72 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2019 License: Apache-2.0 Imports: 38 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OutputWriter io.Writer
	LogWriter    io.Writer

	Filter           Filterer
	ErrorHandler     errorhandler.ErrorHandler
	Printer          printer.Printer
	RC               RCHandler
	Auth             Authenticator
	Sha256FileSummer sha256sum.FileSummer
)
View Source
var CreateAccessTokenService = func(
	rc RCHandler,
	profileName string,
	refreshToken string,
	host string,
	skipSSLValidation bool,
) gp.AccessTokenService {
	tokenService := pivnet.NewAccessTokenOrLegacyToken(refreshToken, host, skipSSLValidation, "Pivnet CLI")
	serviceThatSavesRc := CreateSaveTokenDecorator(rc, tokenService, profileName, refreshToken, host)
	return serviceThatSavesRc
}
View Source
var ErrShowHelpMessage = errors.New("help command invoked")
View Source
var Init = func(profileRequired bool) error {
	if OutputWriter == nil {
		OutputWriter = os.Stdout
	}

	if LogWriter == nil {
		switch Pivnet.Format {
		case printer.PrintAsJSON, printer.PrintAsYAML:
			LogWriter = os.Stderr
			break
		default:
			LogWriter = os.Stdout
		}
	}

	if ErrorHandler == nil {
		ErrorHandler = errorhandler.NewErrorHandler(Pivnet.Format, OutputWriter, LogWriter)
	}

	if Auth == nil {
		Auth = auth.NewAuthenticator(ErrorHandler)
	}

	if Printer == nil {
		Printer = printer.NewPrinter(OutputWriter)
	}

	if RC == nil {
		rcFileReadWriter := filesystem.NewPivnetRCReadWriter(Pivnet.ConfigFile)
		RC = rc.NewRCHandler(rcFileReadWriter)
	}

	profile, err := RC.ProfileForName(Pivnet.ProfileName)
	if err != nil {
		return ErrorHandler.HandleError(err)
	}

	if profileRequired {
		if profile == nil {
			err := fmt.Errorf("Please login first")
			return ErrorHandler.HandleError(err)
		} else {
			err := profile.Validate()
			if err != nil {
				e := fmt.Errorf("Saved profile is invalid (%s). Please login again", err.Error())
				return ErrorHandler.HandleError(e)
			}
		}
	}

	if profile != nil {
		Pivnet.profile = profile

		sanitizeWriters(profile.APIToken)
	}

	infoLogger := log.New(LogWriter, "", log.LstdFlags)
	debugLogger := log.New(LogWriter, "", log.LstdFlags)

	Pivnet.userAgent = fmt.Sprintf(
		"pivnet-cli/%s",
		version.Version,
	)

	Pivnet.Logger = logshim.NewLogShim(infoLogger, debugLogger, Pivnet.Verbose)

	if Filter == nil {
		Filter = filter.NewFilter(
			Pivnet.Logger,
		)
	}

	return nil
}
View Source
var NewCompanyGroupClient = func(client companygroup.PivnetClient) CompanyGroupClient {
	return companygroup.NewCompanyGroupClient(
		client,
		ErrorHandler,
		Pivnet.Format,
		OutputWriter,
		Printer,
	)
}
View Source
var NewCurlClient = func(client curl.PivnetClient) CurlClient {
	return curl.NewCurlClient(
		client,
		ErrorHandler,
		Pivnet.Format,
		OutputWriter,
		Printer,
	)
}
View Source
var NewEULAClient = func(client eula.PivnetClient) EULAClient {
	return eula.NewEULAClient(
		client,
		ErrorHandler,
		Pivnet.Format,
		OutputWriter,
		Printer,
	)
}
View Source
var NewFileGroupClient = func(client filegroup.PivnetClient) FileGroupClient {
	return filegroup.NewFileGroupClient(
		client,
		ErrorHandler,
		Pivnet.Format,
		OutputWriter,
		Printer,
	)
}
View Source
var NewImageReferenceClient = func(client imagereference.PivnetClient) ImageReferenceClient {
	return imagereference.NewImageReferenceClient(
		client,
		ErrorHandler,
		Pivnet.Format,
		OutputWriter,
		LogWriter,
		Printer,
		Pivnet.Logger,
	)
}
View Source
var NewLoginClient = func(client login.PivnetClient) LoginClient {
	return login.NewLoginClient(
		client,
		RC,
		ErrorHandler,
		Pivnet.Format,
		OutputWriter,
		Printer,
	)
}
View Source
var NewLogoutClient = func() LogoutClient {
	return logout.NewLogoutClient(
		RC,
		ErrorHandler,
		Pivnet.Format,
		OutputWriter,
		Printer,
	)
}
View Source
var NewProductClient = func(client product.PivnetClient) ProductClient {
	return product.NewProductClient(
		client,
		ErrorHandler,
		Pivnet.Format,
		OutputWriter,
		Printer,
	)
}
View Source
var NewReleaseClient = func(client release.PivnetClient) ReleaseClient {
	return release.NewReleaseClient(
		client,
		ErrorHandler,
		Pivnet.Format,
		OutputWriter,
		Printer,
	)
}
View Source
var NewReleaseTypeClient = func(client releasetype.PivnetClient) ReleaseTypeClient {
	return releasetype.NewReleaseTypeClient(
		client,
		ErrorHandler,
		Pivnet.Format,
		OutputWriter,
		Printer,
	)
}
View Source
var NewUserGroupClient = func(client usergroup.PivnetClient) UserGroupClient {
	return usergroup.NewUserGroupClient(
		client,
		ErrorHandler,
		Pivnet.Format,
		OutputWriter,
		Printer,
	)
}

Functions

func CreateSaveTokenDecorator added in v0.0.57

func CreateSaveTokenDecorator(rc RCHandler, accessTokenService gp.AccessTokenService, profileName string, refreshToken string, host string) gp.AccessTokenService

func NewPivnetClient

func NewPivnetClient() *gp.Client

func NewPivnetClientWithToken added in v0.0.38

func NewPivnetClientWithToken(tokenService gp.AccessTokenService, host string) *gp.Client

Types

type AcceptEULACommand

type AcceptEULACommand struct {
	ProductSlug    string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1" required:"true"`
}

func (*AcceptEULACommand) Execute

func (command *AcceptEULACommand) Execute(args []string) error

type AddCompanyGroupMemberCommand added in v0.0.68

type AddCompanyGroupMemberCommand struct {
	CompanyGroupID int    `long:"company-group-id" short:"i" description:"Company group ID e.g. 1234" required:"true"`
	MemberEmail    string `long:"member-email" description:"Email of member to add e.g. example@example.net" required:"true"`
	IsAdmin        string `long:"admin" description:"Whether the user should be an admin e.g. --admin=[true|false]"`
}

func (*AddCompanyGroupMemberCommand) Execute added in v0.0.68

func (command *AddCompanyGroupMemberCommand) Execute([]string) error

type AddFileGroupToReleaseCommand

type AddFileGroupToReleaseCommand struct {
	ProductSlug    string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	FileGroupID    int    `long:"file-group-id" short:"i" description:"Filegroup ID e.g. 1234" required:"true"`
	ReleaseVersion string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1" required:"true"`
}

func (*AddFileGroupToReleaseCommand) Execute

func (command *AddFileGroupToReleaseCommand) Execute([]string) error

type AddImageReferenceToReleaseCommand added in v0.0.65

type AddImageReferenceToReleaseCommand struct {
	ProductSlug      string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ImageReferenceID int    `long:"image-reference-id" short:"i" description:"Image reference ID e.g. 1234" required:"true"`
	ReleaseVersion   string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1" required:"true"`
}

func (*AddImageReferenceToReleaseCommand) Execute added in v0.0.65

func (command *AddImageReferenceToReleaseCommand) Execute([]string) error

type AddProductFileCommand

type AddProductFileCommand struct {
	ProductSlug    string  `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion *string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1"`
	ProductFileID  int     `long:"product-file-id" short:"i" description:"Product file ID e.g. 1234" required:"true"`
	FileGroupID    *int    `long:"file-group-id" short:"f" description:"File group ID e.g. 1234"`
}

func (*AddProductFileCommand) Execute

func (command *AddProductFileCommand) Execute([]string) error

type AddReleaseDependencyCommand

type AddReleaseDependencyCommand struct {
	ProductSlug             string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion          string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1" required:"true"`
	DependentProductSlug    string `long:"dependent-product-slug" short:"s" description:"Dependent product slug e.g. p-mysql" required:"true"`
	DependentReleaseVersion string `long:"dependent-release-version" short:"u" description:"Dependent release version e.g. 0.1.2-rc1" required:"true"`
}

func (*AddReleaseDependencyCommand) Execute

func (command *AddReleaseDependencyCommand) Execute([]string) error

type AddReleaseUpgradePathCommand

type AddReleaseUpgradePathCommand struct {
	ProductSlug            string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion         string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1" required:"true"`
	PreviousReleaseVersion string `long:"previous-release-version" short:"u" description:"Regex for previous release version e.g. 0.1.*" required:"true"`
}

func (*AddReleaseUpgradePathCommand) Execute

func (command *AddReleaseUpgradePathCommand) Execute([]string) error

type AddUserGroupCommand

type AddUserGroupCommand struct {
	ProductSlug    string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1" required:"true"`
	UserGroupID    int    `long:"user-group-id" short:"i" description:"User Group ID e.g. 1234" required:"true"`
}

func (*AddUserGroupCommand) Execute

func (command *AddUserGroupCommand) Execute([]string) error

type AddUserGroupMemberCommand

type AddUserGroupMemberCommand struct {
	UserGroupID        int    `long:"user-group-id" short:"i" description:"User group ID e.g. 1234" required:"true"`
	MemberEmailAddress string `long:"member-email" description:"Member email address e.g. 1234" required:"true"`
	Admin              bool   `long:"admin" description:"Whether the user should be an admin"`
}

func (*AddUserGroupMemberCommand) Execute

func (command *AddUserGroupMemberCommand) Execute([]string) error

type Args added in v0.0.42

type Args struct {
	URL string `positional-arg-name:"URL" description:"URL without host or API prefix e.g. /products/p-mysql/releases/3451"`
}

type Authenticator added in v0.0.38

type Authenticator interface {
	AuthenticateClient(client auth.AuthClient) error
}

type CompanyGroupClient added in v0.0.66

type CompanyGroupClient interface {
	List() error
	Get(companyGroupID int) error
	AddMember(companyGroupID int, memberEmail string, isAdmin string) error
	RemoveMember(companyGroupID int, memberEmail string) error
}

type CompanyGroupCommand added in v0.0.68

type CompanyGroupCommand struct {
	CompanyGroupID int `long:"company-group-id" short:"i" description:"Company group ID e.g. 1234" required:"true"`
}

func (*CompanyGroupCommand) Execute added in v0.0.68

func (command *CompanyGroupCommand) Execute([]string) error

type CompanyGroupsCommand added in v0.0.66

type CompanyGroupsCommand struct{}

func (*CompanyGroupsCommand) Execute added in v0.0.66

func (command *CompanyGroupsCommand) Execute([]string) error

type CreateDependencySpecifierCommand added in v0.0.42

type CreateDependencySpecifierCommand struct {
	ProductSlug          string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion       string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1" required:"true"`
	DependentProductSlug string `long:"dependent-product-slug" short:"s" description:"Dependent product slug e.g. p-mysql" required:"true"`
	Specifier            string `long:"specifier" short:"u" description:"Specifier e.g. 1.2.*" required:"true"`
}

func (*CreateDependencySpecifierCommand) Execute added in v0.0.42

func (command *CreateDependencySpecifierCommand) Execute([]string) error

type CreateFileGroupCommand

type CreateFileGroupCommand struct {
	ProductSlug string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	Name        string `long:"name" description:"Name e.g. my_file_group" required:"true"`
}

func (*CreateFileGroupCommand) Execute

func (command *CreateFileGroupCommand) Execute([]string) error

type CreateImageReferenceCommand added in v0.0.64

type CreateImageReferenceCommand struct {
	ProductSlug        string   `long:"product-slug" short:"p" description:"Product slug e.g. 'p-mysql'" required:"true"`
	Name               string   `long:"name" description:"Name e.g. 'p-mysql 1.7.13'" required:"true"`
	ImagePath          string   `long:"image-path" description:"Image path e.g. 'library/image:tag'" required:"true"`
	Digest             string   `long:"digest" description:"Digest of the image e.g. 'sha256:1234abcd'" required:"true"`
	Description        string   `long:"description" description:"Description of the image"`
	DocsURL            string   `long:"docs-url" description:"URL of docs for the image"`
	SystemRequirements []string `long:"system-requirement" description:"System-requirement of the image"`
}

func (*CreateImageReferenceCommand) Execute added in v0.0.64

func (command *CreateImageReferenceCommand) Execute([]string) error

type CreateProductFileCommand

type CreateProductFileCommand struct {
	ProductSlug        string   `long:"product-slug" short:"p" description:"Product slug e.g. 'p-mysql'" required:"true"`
	Name               string   `long:"name" description:"Name e.g. 'p-mysql 1.7.13'" required:"true"`
	AWSObjectKey       string   `long:"aws-object-key" description:"AWS Object Key e.g. 'product_files/P-MySQL/p-mysql-1.7.13.pivotal'" required:"true"`
	FileType           string   `long:"file-type" description:"File Type e.g. 'Software'" required:"true"`
	FileVersion        string   `long:"file-version" description:"File Version e.g. '1.7.13'" required:"true"`
	SHA256             string   `long:"sha256" description:"SHA256 of file"`
	MD5                string   `long:"md5" description:"MD5 of file" required:"true"`
	Description        string   `long:"description" description:"Description of file"`
	DocsURL            string   `long:"docs-url" description:"URL of docs for file"`
	IncludedFiles      []string `long:"included-file" description:"Name of included file"`
	Platforms          []string `long:"platform" description:"Platform of file"`
	ReleasedAt         string   `long:"released-at" description:"When file is marked for release e.g. '2016/01/16'"`
	SystemRequirements []string `long:"system-requirement" description:"System requirement of file"`
}

func (*CreateProductFileCommand) Execute

func (command *CreateProductFileCommand) Execute([]string) error

type CreateReleaseCommand

type CreateReleaseCommand struct {
	ProductSlug    string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1" required:"true"`
	ReleaseType    string `long:"release-type" short:"t" description:"Release type e.g. 'Minor Release'" required:"true"`
	EULASlug       string `long:"eula-slug" short:"e" description:"EULA slug e.g. pivotal_software_eula" required:"true"`
}

func (*CreateReleaseCommand) Execute

func (command *CreateReleaseCommand) Execute([]string) error

type CreateUserGroupCommand

type CreateUserGroupCommand struct {
	Name        string   `long:"name" description:"Name e.g. all_users" required:"true"`
	Description string   `long:"description" description:"Description e.g. 'All users in the world'" required:"true"`
	Members     []string `long:"member" description:"Email addresses of members to be added"`
}

func (*CreateUserGroupCommand) Execute

func (command *CreateUserGroupCommand) Execute([]string) error

type CurlClient

type CurlClient interface {
	MakeRequest(method string, body string, url string) error
}

type CurlCommand

type CurlCommand struct {
	Method string `long:"request" short:"X" description:"Custom method e.g. PATCH"`
	Data   string `long:"data" short:"d" description:"Request data e.g. '{\"foo\":\"bar\"}'"`
	Args   Args   `positional-args:"yes" required:"true"`
}

func (*CurlCommand) Execute

func (command *CurlCommand) Execute(args []string) error

type DeleteDependencySpecifierCommand added in v0.0.42

type DeleteDependencySpecifierCommand struct {
	ProductSlug           string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion        string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1" required:"true"`
	DependencySpecifierID int    `long:"dependency-specifier-id" short:"i" description:"Dependency specifier ID e.g. 1234" required:"true"`
}

func (*DeleteDependencySpecifierCommand) Execute added in v0.0.42

func (command *DeleteDependencySpecifierCommand) Execute([]string) error

type DeleteFileGroupCommand

type DeleteFileGroupCommand struct {
	ProductSlug string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	FileGroupID int    `long:"file-group-id" short:"i" description:"File group ID e.g. 1234" required:"true"`
}

func (*DeleteFileGroupCommand) Execute

func (command *DeleteFileGroupCommand) Execute([]string) error

type DeleteImageReferenceCommand added in v0.0.65

type DeleteImageReferenceCommand struct {
	ProductSlug      string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ImageReferenceID int    `long:"image-reference-id" short:"i" description:"Image reference ID e.g. 1234" required:"true"`
}

func (*DeleteImageReferenceCommand) Execute added in v0.0.65

func (command *DeleteImageReferenceCommand) Execute([]string) error

type DeleteProductFileCommand

type DeleteProductFileCommand struct {
	ProductSlug   string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ProductFileID int    `long:"product-file-id" short:"i" description:"Product file ID e.g. 1234" required:"true"`
}

func (*DeleteProductFileCommand) Execute

func (command *DeleteProductFileCommand) Execute([]string) error

type DeleteReleaseCommand

type DeleteReleaseCommand struct {
	ProductSlug    string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1" required:"true"`
}

func (*DeleteReleaseCommand) Execute

func (command *DeleteReleaseCommand) Execute([]string) error

type DeleteUserGroupCommand

type DeleteUserGroupCommand struct {
	UserGroupID int `long:"user-group-id" short:"i" description:"User group ID e.g. 1234" required:"true"`
}

func (*DeleteUserGroupCommand) Execute

func (command *DeleteUserGroupCommand) Execute([]string) error

type DependencySpecifierClient added in v0.0.42

type DependencySpecifierClient interface {
	List(productSlug string, releaseVersion string) error
	Get(productSlug string, releaseVersion string, dependencySpecifierID int) error
	Create(productSlug string, releaseVersion string, dependentProductSlug string, specifier string) error
	Delete(productSlug string, releaseVersion string, dependencyspecifierID int) error
}

type DependencySpecifierCommand added in v0.0.42

type DependencySpecifierCommand struct {
	ProductSlug           string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion        string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1" required:"true"`
	DependencySpecifierID int    `long:"dependency-specifier-id" short:"i" description:"Dependency specifier ID e.g. 1234" required:"true"`
}

func (*DependencySpecifierCommand) Execute added in v0.0.42

func (command *DependencySpecifierCommand) Execute([]string) error

type DependencySpecifiersCommand added in v0.0.42

type DependencySpecifiersCommand struct {
	ProductSlug    string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1" required:"true"`
}

func (*DependencySpecifiersCommand) Execute added in v0.0.42

func (command *DependencySpecifiersCommand) Execute([]string) error

type DownloadProductFilesCommand added in v0.0.35

type DownloadProductFilesCommand struct {
	ProductSlug    string   `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion string   `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1" required:"true"`
	ProductFileIDs []int    `long:"product-file-id" short:"i" description:"Product file ID e.g. 1234"`
	Globs          []string `long:"glob" short:"g" description:"Glob to match product name e.g. *aws*"`
	DownloadDir    string   `long:"download-dir" short:"d" default:"." description:"Local existing directory to download files to e.g. /tmp/my-file/"`
	AcceptEULA     bool     `long:"accept-eula" description:"Automatically accept EULA if necessary (Available for pivots only)"`
}

func (*DownloadProductFilesCommand) Execute added in v0.0.35

func (command *DownloadProductFilesCommand) Execute([]string) error

type EULAClient

type EULAClient interface {
	List() error
	Get(eulaSlug string) error
	AcceptEULA(productSlug string, releaseVersion string) error
}

type EULACommand

type EULACommand struct {
	EULASlug string `long:"eula-slug" description:"EULA slug e.g. pivotal_software_eula" required:"true"`
}

func (*EULACommand) Execute

func (command *EULACommand) Execute(args []string) error

type EULAsCommand

type EULAsCommand struct {
}

func (*EULAsCommand) Execute

func (command *EULAsCommand) Execute(args []string) error

type FileGroupClient

type FileGroupClient interface {
	List(productSlug string, releaseVersion string) error
	Get(productSlug string, productFileID int) error
	Create(productSlug string, name string) error
	Update(productSlug string, productFileID int, name *string) error
	Delete(productSlug string, productFileID int) error
	AddToRelease(productSlug string, productFileID int, releaseVersion string) error
	RemoveFromRelease(productSlug string, productFileID int, releaseVersion string) error
}

type FileGroupCommand

type FileGroupCommand struct {
	ProductSlug string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	FileGroupID int    `long:"file-group-id" short:"i" description:"Filegroup ID e.g. 1234" required:"true"`
}

func (*FileGroupCommand) Execute

func (command *FileGroupCommand) Execute([]string) error

type FileGroupsCommand

type FileGroupsCommand struct {
	ProductSlug    string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1"`
}

func (*FileGroupsCommand) Execute

func (command *FileGroupsCommand) Execute([]string) error

type Filterer added in v0.0.33

type Filterer interface {
	ReleasesByVersion(releases []pivnet.Release, version string) ([]pivnet.Release, error)
	ProductFileKeysByGlobs(productFiles []pivnet.ProductFile, globs []string) ([]pivnet.ProductFile, error)
}

type HelpCommand

type HelpCommand struct{}

func (*HelpCommand) Execute

func (command *HelpCommand) Execute(args []string) error

type ImageReferenceClient added in v0.0.64

type ImageReferenceClient interface {
	List(productSlug string, releaseVersion string) error
	Get(productSlug string, releaseVersion string, imageReferenceID int) error
	Create(config pivnet.CreateImageReferenceConfig) error
	Update(
		productSlug string,
		imageReferenceID int,
		name *string,
		description *string,
		docsURL *string,
		systemRequirements *[]string,
	) error
	Delete(productSlug string, imageReferenceID int) error
	AddToRelease(productSlug string, imageReferenceID int, releaseVersion string) error
	RemoveFromRelease(productSlug string, imageReferenceID int, releaseVersion string) error
}

type ImageReferenceCommand added in v0.0.65

type ImageReferenceCommand struct {
	ProductSlug      string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion   string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1"`
	ImageReferenceID int    `long:"image-reference-id" short:"i" description:"Image reference ID e.g. 1234" required:"true"`
}

func (*ImageReferenceCommand) Execute added in v0.0.65

func (command *ImageReferenceCommand) Execute([]string) error

type ImageReferencesCommand added in v0.0.65

type ImageReferencesCommand struct {
	ProductSlug    string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1 (Required for non-admins)"`
}

func (*ImageReferencesCommand) Execute added in v0.0.65

func (command *ImageReferencesCommand) Execute([]string) error

type LoginClient added in v0.0.38

type LoginClient interface {
	Login(name string, apiToken string, host string) error
}

type LoginCommand added in v0.0.38

type LoginCommand struct {
	APIToken string `long:"api-token" description:"Pivnet API Token (Pivnet legacy token or UAA refresh token)" required:"true"`
	Host     string `long:"host" description:"Pivnet API Host" default:"https://network.pivotal.io"`
}

func (*LoginCommand) Execute added in v0.0.38

func (command *LoginCommand) Execute([]string) error

type LogoutClient added in v0.0.38

type LogoutClient interface {
	Logout(profileName string) error
}

type LogoutCommand added in v0.0.38

type LogoutCommand struct {
}

func (*LogoutCommand) Execute added in v0.0.38

func (command *LogoutCommand) Execute([]string) error

type PivnetCommand

type PivnetCommand struct {
	VersionFunc func() `short:"v" long:"version" description:"Print the version of this CLI and exit"`

	Format  string `long:"format" description:"Format to print as" default:"table" choice:"table" choice:"json" choice:"yaml"`
	Verbose bool   `long:"verbose" description:"Display verbose output"`

	ProfileName       string `long:"profile" description:"Name of profile" default:"default"`
	ConfigFile        string `long:"config" description:"Path to config file"`
	SkipSSLValidation bool   `long:"skip-ssl-validation" description:"Skip verification of the API endpoint. Not recommended!"`

	Login  LoginCommand  `command:"login" alias:"l" description:"Log in to Pivotal Network."`
	Logout LogoutCommand `command:"logout" description:"Log out from Pivotal Network."`

	Help    HelpCommand    `command:"help" alias:"h" description:"Print this help message"`
	Version VersionCommand `command:"version" alias:"v" description:"Print the version of this CLI and exit"`

	Curl CurlCommand `command:"curl" alias:"c" description:"Curl an endpoint"`

	ReleaseTypes ReleaseTypesCommand `command:"release-types" alias:"rts" description:"List release types"`

	PivnetVersions PivnetVersionsCommand `command:"pivnet-versions" alias:"pv" description:"List Pivnet product versions"`

	EULAs      EULAsCommand      `command:"eulas" alias:"es" description:"List EULAs"`
	EULA       EULACommand       `command:"eula" alias:"e" description:"Show EULA"`
	AcceptEULA AcceptEULACommand `command:"accept-eula" alias:"ae" description:"Accept EULA (Available for pivots only)"`

	Products     ProductsCommand     `command:"products" alias:"ps" description:"List products"`
	Product      ProductCommand      `command:"product" alias:"p" description:"Show product"`
	ProductSlugs ProductSlugsCommand `command:"product-slugs" alias:"psl" description:"Show slugs associated to a product"`

	ProductFiles      ProductFilesCommand      `command:"product-files" alias:"pfs" description:"List product files"`
	ProductFile       ProductFileCommand       `command:"product-file" alias:"pf" description:"Show product file"`
	CreateProductFile CreateProductFileCommand `command:"create-product-file" alias:"cpf" description:"Create product file"`
	UpdateProductFile UpdateProductFileCommand `command:"update-product-file" alias:"upf" description:"Update product file"`
	AddProductFile    AddProductFileCommand    `command:"add-product-file" alias:"apf" description:"Add product file to release"`
	RemoveProductFile RemoveProductFileCommand `command:"remove-product-file" alias:"rpf" description:"Remove product file from release"`
	DeleteProductFile DeleteProductFileCommand `command:"delete-product-file" alias:"dpf" description:"Delete product file"`

	DownloadProductFiles DownloadProductFilesCommand `command:"download-product-files" alias:"dlpf" description:"Download product files"`

	FileGroups                 FileGroupsCommand                 `command:"file-groups" alias:"fgs" description:"List file groups"`
	FileGroup                  FileGroupCommand                  `command:"file-group" alias:"fg" description:"Show file group"`
	CreateFileGroup            CreateFileGroupCommand            `command:"create-file-group" alias:"cfg" description:"Create file group"`
	UpdateFileGroup            UpdateFileGroupCommand            `command:"update-file-group" alias:"ufg" description:"Update file group"`
	DeleteFileGroup            DeleteFileGroupCommand            `command:"delete-file-group" alias:"dfg" description:"Delete file group"`
	AddFileGroupToRelease      AddFileGroupToReleaseCommand      `command:"add-file-group" alias:"afg" description:"Add file group to release"`
	RemoveFileGroupFromRelease RemoveFileGroupFromReleaseCommand `command:"remove-file-group" alias:"rfg" description:"Remove file group from release"`

	ImageReferences                 ImageReferencesCommand                 `command:"image-references" alias:"irs" description:"List image references"`
	ImageReference                  ImageReferenceCommand                  `command:"image-reference" alias:"ir" description:"Show image reference"`
	CreateImageReference            CreateImageReferenceCommand            `command:"create-image-reference" alias:"cir" description:"Create a container image reference"`
	DeleteImageReference            DeleteImageReferenceCommand            `command:"delete-image-reference" alias:"dir" description:"Delete a container image reference"`
	AddImageReferenceToRelease      AddImageReferenceToReleaseCommand      `command:"add-image-reference" alias:"air" description:"Add image reference to release"`
	RemoveImageReferenceFromRelease RemoveImageReferenceFromReleaseCommand `command:"remove-image-reference" alias:"rir" description:"Remove image reference from release"`
	UpdateImageReference            UpdateImageReferenceCommand            `command:"update-image-reference" alias:"uir" description:"Update a container image reference"`

	Releases      ReleasesCommand      `command:"releases" alias:"rs" description:"List releases"`
	Release       ReleaseCommand       `command:"release" alias:"r" description:"Show release"`
	CreateRelease CreateReleaseCommand `command:"create-release" alias:"cr" description:"Create release"`
	DeleteRelease DeleteReleaseCommand `command:"delete-release" alias:"dr" description:"Delete release"`
	UpdateRelease UpdateReleaseCommand `command:"update-release" alias:"ur" description:"Update release"`

	UserGroups      UserGroupsCommand      `command:"user-groups" alias:"ugs" description:"List user groups"`
	UserGroup       UserGroupCommand       `command:"user-group" alias:"ug" description:"Show user group"`
	AddUserGroup    AddUserGroupCommand    `command:"add-user-group" alias:"aug" description:"Add user group to release"`
	RemoveUserGroup RemoveUserGroupCommand `command:"remove-user-group" alias:"rug" description:"Remove user group from release"`
	CreateUserGroup CreateUserGroupCommand `command:"create-user-group" alias:"cug" description:"Create user group"`
	UpdateUserGroup UpdateUserGroupCommand `command:"update-user-group" alias:"uug" description:"Update user group"`
	DeleteUserGroup DeleteUserGroupCommand `command:"delete-user-group" alias:"dug" description:"Delete user group"`

	AddUserGroupMember    AddUserGroupMemberCommand    `command:"add-user-group-member" alias:"augm" description:"Add user group member to group"`
	RemoveUserGroupMember RemoveUserGroupMemberCommand `command:"remove-user-group-member" alias:"rugm" description:"Remove user group member from group"`

	CompanyGroups            CompanyGroupsCommand            `command:"company-groups" alias:"cgs" description:"List managed company groups"`
	CompanyGroup             CompanyGroupCommand             `command:"company-group" alias:"cg" description:"Show company group"`
	AddCompanyGroupMember    AddCompanyGroupMemberCommand    `command:"company-group-add-member" alias:"cgam" description:"Add a member to a company group"`
	RemoveCompanyGroupMember RemoveCompanyGroupMemberCommand `command:"company-group-remove-member" alias:"cgrm" description:"Remove a member to a company group"`

	ReleaseDependencies     ReleaseDependenciesCommand     `command:"release-dependencies" alias:"rds" description:"List release dependencies"`
	AddReleaseDependency    AddReleaseDependencyCommand    `command:"add-release-dependency" alias:"ard" description:"Add release dependency"`
	RemoveReleaseDependency RemoveReleaseDependencyCommand `command:"remove-release-dependency" alias:"rrd" description:"Remove release dependency"`

	DependencySpecifiers      DependencySpecifiersCommand      `command:"dependency-specifiers" alias:"dss" description:"List dependency specifiers"`
	DependencySpecifier       DependencySpecifierCommand       `command:"dependency-specifier" alias:"ds" description:"Get dependency specifier"`
	CreateDependencySpecifier CreateDependencySpecifierCommand `command:"create-dependency-specifier" alias:"cds" description:"Create dependency specifier"`
	DeleteDependencySpecifier DeleteDependencySpecifierCommand `command:"delete-dependency-specifier" alias:"dds" description:"Delete dependency specifier"`

	ReleaseUpgradePaths      ReleaseUpgradePathsCommand      `command:"release-upgrade-paths" alias:"rups" description:"List release upgrade paths"`
	AddReleaseUpgradePath    AddReleaseUpgradePathCommand    `command:"add-release-upgrade-path" alias:"arup" description:"Add release upgrade path"`
	RemoveReleaseUpgradePath RemoveReleaseUpgradePathCommand `command:"remove-release-upgrade-path" alias:"rrup" description:"Remove release upgrade path"`

	Logger logger.Logger
	// contains filtered or unexported fields
}
var Pivnet PivnetCommand

type PivnetVersionsClient added in v0.0.57

type PivnetVersionsClient interface {
	List() error
	Warn(currentVersion string) string
}

type PivnetVersionsCommand added in v0.0.57

type PivnetVersionsCommand struct {
}

func (*PivnetVersionsCommand) Execute added in v0.0.57

func (command *PivnetVersionsCommand) Execute(args []string) error

type ProductClient

type ProductClient interface {
	List() error
	Get(productSlug string) error
	SlugAlias(productSlug string) error
}

type ProductCommand

type ProductCommand struct {
	ProductSlug string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
}

func (*ProductCommand) Execute

func (command *ProductCommand) Execute([]string) error

type ProductFileClient

type ProductFileClient interface {
	List(productSlug string, releaseVersion string) error
	Get(productSlug string, releaseVersion string, productFileID int) error
	Create(config pivnet.CreateProductFileConfig) error
	Update(
		productFileID int,
		productSlug string,
		name *string,
		fileVersion *string,
		sha256 *string,
		md5 *string,
		description *string,
		docsURL *string,
		systemRequirements *[]string,
	) error
	AddToRelease(productSlug string, releaseVersion string, productFileID int) error
	RemoveFromRelease(productSlug string, releaseVersion string, productFileID int) error
	AddToFileGroup(productSlug string, fileGroupID int, productFileID int) error
	RemoveFromFileGroup(productSlug string, fileGroupID int, productFileID int) error
	Delete(productSlug string, productFileID int) error
	Download(productSlug string, releaseVersion string, globs []string, productFileIDs []int, downloadDir string, acceptEULA bool, progressWriter io.Writer) error
}

type ProductFileCommand

type ProductFileCommand struct {
	ProductSlug    string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1"`
	ProductFileID  int    `long:"product-file-id" short:"i" description:"Product file ID e.g. 1234" required:"true"`
}

func (*ProductFileCommand) Execute

func (command *ProductFileCommand) Execute([]string) error

type ProductFilesCommand

type ProductFilesCommand struct {
	ProductSlug    string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1 (Required for non-admins)"`
}

func (*ProductFilesCommand) Execute

func (command *ProductFilesCommand) Execute([]string) error

type ProductSlugsCommand added in v0.0.69

type ProductSlugsCommand struct {
	ProductSlug string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
}

func (*ProductSlugsCommand) Execute added in v0.0.69

func (command *ProductSlugsCommand) Execute([]string) error

type ProductsCommand

type ProductsCommand struct {
}

func (*ProductsCommand) Execute

func (command *ProductsCommand) Execute([]string) error

type RCHandler added in v0.0.38

type RCHandler interface {
	SaveProfile(profileName string, apiToken string, host string, accessToken string, accessTokenExpiry int64) error
	ProfileForName(profileName string) (*rc.PivnetProfile, error)
	RemoveProfileWithName(profileName string) error
}

type ReleaseClient

type ReleaseClient interface {
	List(productSlug string) error
	ListWithLimit(productSlug string, limit string) error
	Get(productSlug string, releaseVersion string) error
	Create(productSlug string, releaseVersion string, releaseType string, eulaSlug string) error
	Update(productSlug string, releaseVersion string, availability *string, releaseType *string) error
	Delete(productSlug string, releaseVersion string) error
}

type ReleaseCommand

type ReleaseCommand struct {
	ProductSlug    string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1" required:"true"`
}

func (*ReleaseCommand) Execute

func (command *ReleaseCommand) Execute([]string) error

type ReleaseDependenciesCommand

type ReleaseDependenciesCommand struct {
	ProductSlug    string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1" required:"true"`
}

func (*ReleaseDependenciesCommand) Execute

func (command *ReleaseDependenciesCommand) Execute([]string) error

type ReleaseDependencyClient

type ReleaseDependencyClient interface {
	List(productSlug string, releaseVersion string) error
	Add(productSlug string, releaseVersion string, dependentProductSlug string, dependentReleaseVersion string) error
	Remove(productSlug string, releaseVersion string, dependentProductSlug string, dependentReleaseVersion string) error
}

type ReleaseTypeClient

type ReleaseTypeClient interface {
	List() error
}

type ReleaseTypesCommand

type ReleaseTypesCommand struct {
}

func (*ReleaseTypesCommand) Execute

func (command *ReleaseTypesCommand) Execute(args []string) error

type ReleaseUpgradePathClient

type ReleaseUpgradePathClient interface {
	List(productSlug string, releaseVersion string) error
	Add(productSlug string, releaseVersion string, previousReleaseVersion string) error
	Remove(productSlug string, releaseVersion string, previousReleaseVersion string) error
}

type ReleaseUpgradePathsCommand

type ReleaseUpgradePathsCommand struct {
	ProductSlug    string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1" required:"true"`
}

func (*ReleaseUpgradePathsCommand) Execute

func (command *ReleaseUpgradePathsCommand) Execute([]string) error

type ReleasesCommand

type ReleasesCommand struct {
	ProductSlug string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	Limit       string `long:"limit" short:"l" description:"Limit the number of returned releases to the most recent"`
}

func (*ReleasesCommand) Execute

func (command *ReleasesCommand) Execute([]string) error

type RemoveCompanyGroupMemberCommand added in v0.0.68

type RemoveCompanyGroupMemberCommand struct {
	CompanyGroupID int    `long:"company-group-id" short:"i" description:"Company group ID e.g. 1234" required:"true"`
	MemberEmail    string `long:"member-email" description:"Email of member to add e.g. example@example.net" required:"true"`
}

func (*RemoveCompanyGroupMemberCommand) Execute added in v0.0.68

func (command *RemoveCompanyGroupMemberCommand) Execute([]string) error

type RemoveFileGroupFromReleaseCommand

type RemoveFileGroupFromReleaseCommand struct {
	ProductSlug    string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	FileGroupID    int    `long:"file-group-id" short:"i" description:"Filegroup ID e.g. 1234" required:"true"`
	ReleaseVersion string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1" required:"true"`
}

func (*RemoveFileGroupFromReleaseCommand) Execute

func (command *RemoveFileGroupFromReleaseCommand) Execute([]string) error

type RemoveImageReferenceFromReleaseCommand added in v0.0.65

type RemoveImageReferenceFromReleaseCommand struct {
	ProductSlug      string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ImageReferenceID int    `long:"image-reference-id" short:"i" description:"Image reference ID e.g. 1234" required:"true"`
	ReleaseVersion   string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1" required:"true"`
}

func (*RemoveImageReferenceFromReleaseCommand) Execute added in v0.0.65

type RemoveProductFileCommand

type RemoveProductFileCommand struct {
	ProductSlug    string  `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion *string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1"`
	ProductFileID  int     `long:"product-file-id" short:"i" description:"Product file ID e.g. 1234" required:"true"`
	FileGroupID    *int    `long:"file-group-id" short:"f" description:"File group ID e.g. 1234"`
}

func (*RemoveProductFileCommand) Execute

func (command *RemoveProductFileCommand) Execute([]string) error

type RemoveReleaseDependencyCommand

type RemoveReleaseDependencyCommand struct {
	ProductSlug             string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion          string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1" required:"true"`
	DependentProductSlug    string `long:"dependent-product-slug" short:"s" description:"Dependent product slug e.g. p-mysql" required:"true"`
	DependentReleaseVersion string `long:"dependent-release-version" short:"u" description:"Dependent release version e.g. 0.1.2-rc1" required:"true"`
}

func (*RemoveReleaseDependencyCommand) Execute

func (command *RemoveReleaseDependencyCommand) Execute([]string) error

type RemoveReleaseUpgradePathCommand

type RemoveReleaseUpgradePathCommand struct {
	ProductSlug            string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion         string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1" required:"true"`
	PreviousReleaseVersion string `long:"previous-release-version" short:"u" description:"Regex for previous release version e.g. 0.1.*" required:"true"`
}

func (*RemoveReleaseUpgradePathCommand) Execute

func (command *RemoveReleaseUpgradePathCommand) Execute([]string) error

type RemoveUserGroupCommand

type RemoveUserGroupCommand struct {
	ProductSlug    string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1" required:"true"`
	UserGroupID    int    `long:"user-group-id" short:"i" description:"User Group ID e.g. 1234" required:"true"`
}

func (*RemoveUserGroupCommand) Execute

func (command *RemoveUserGroupCommand) Execute([]string) error

type RemoveUserGroupMemberCommand

type RemoveUserGroupMemberCommand struct {
	UserGroupID        int    `long:"user-group-id" short:"i" description:"User group ID e.g. 1234" required:"true"`
	MemberEmailAddress string `long:"member-email" description:"Member email address e.g. 1234" required:"true"`
}

func (*RemoveUserGroupMemberCommand) Execute

func (command *RemoveUserGroupMemberCommand) Execute([]string) error

type SaveTokenDecorator added in v0.0.57

type SaveTokenDecorator struct {
	WrappedService gp.AccessTokenService
	ProfileName    string
	RefreshToken   string
	Host           string
	Rc             RCHandler
}

func (SaveTokenDecorator) AccessToken added in v0.0.57

func (o SaveTokenDecorator) AccessToken() (string, error)

type UpdateFileGroupCommand

type UpdateFileGroupCommand struct {
	ProductSlug string  `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	FileGroupID int     `long:"file-group-id" short:"i" description:"Filegroup ID e.g. 1234" required:"true"`
	Name        *string `long:"name" description:"Name e.g. my_file_group"`
}

func (*UpdateFileGroupCommand) Execute

func (command *UpdateFileGroupCommand) Execute([]string) error

type UpdateImageReferenceCommand added in v0.0.68

type UpdateImageReferenceCommand struct {
	ProductSlug        string    `long:"product-slug" short:"p" description:"Product slug e.g. 'p-mysql'" required:"true"`
	ImageReferenceID   int       `long:"image-reference-id" short:"i" description:"Image reference ID e.g. 1234" required:"true"`
	Name               *string   `long:"name" description:"Name e.g. 'p-mysql 1.7.13'" `
	Description        *string   `long:"description" description:"Description of the image"`
	DocsURL            *string   `long:"docs-url" description:"URL of docs for the image"`
	SystemRequirements *[]string `long:"system-requirement" description:"System-requirement of the image"`
}

func (*UpdateImageReferenceCommand) Execute added in v0.0.68

func (command *UpdateImageReferenceCommand) Execute([]string) error

type UpdateProductFileCommand

type UpdateProductFileCommand struct {
	ProductSlug        string    `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ProductFileID      int       `long:"product-file-id" short:"i" description:"Product file ID e.g. 1234" required:"true"`
	Name               *string   `long:"name" description:"Name e.g. p-mysql 1.7.13"`
	FileVersion        *string   `long:"file-version" description:"File Version e.g. '1.7.13'"`
	SHA256             *string   `long:"sha256" description:"SHA256 of file"`
	MD5                *string   `long:"md5" description:"MD5 of file"`
	Description        *string   `long:"description" description:"File description e.g. 'This is a file description.'"`
	DocsURL            *string   `long:"docs-url" description:"URL of docs for file"`
	SystemRequirements *[]string `long:"system-requirement" description:"System requirement of file"`
}

func (*UpdateProductFileCommand) Execute

func (command *UpdateProductFileCommand) Execute([]string) error

type UpdateReleaseCommand added in v0.0.44

type UpdateReleaseCommand struct {
	ProductSlug    string  `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql" required:"true"`
	ReleaseVersion string  `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1" required:"true"`
	Availability   *string `long:"availability" description:"Release availability. Optional." choice:"admins" choice:"selected-user-groups" choice:"all"`
	ReleaseType    *string `` /* 206-byte string literal not displayed */
}

func (*UpdateReleaseCommand) Execute added in v0.0.44

func (command *UpdateReleaseCommand) Execute([]string) error

type UpdateUserGroupCommand

type UpdateUserGroupCommand struct {
	UserGroupID int     `long:"user-group-id" short:"i" description:"User group ID e.g. 1234" required:"true"`
	Name        *string `long:"name" description:"Name e.g. all_users"`
	Description *string `long:"description" description:"Description e.g. 'All users in the world'"`
}

func (*UpdateUserGroupCommand) Execute

func (command *UpdateUserGroupCommand) Execute([]string) error

type UserGroupClient

type UserGroupClient interface {
	List(productSlug string, releaseVersion string) error
	Get(userGroupID int) error
	Create(name string, description string, members []string) error
	Update(userGroupID int, name *string, description *string) error
	AddToRelease(productSlug string, releaseVersion string, userGroupID int) error
	Delete(userGroupID int) error
	RemoveFromRelease(productSlug string, releaseVersion string, userGroupID int) error
	AddUserGroupMember(userGroupID int, memberEmailAddress string, admin bool) error
	RemoveUserGroupMember(userGroupID int, memberEmailAddress string) error
}

type UserGroupCommand

type UserGroupCommand struct {
	UserGroupID int `long:"user-group-id" short:"i" description:"User group ID e.g. 1234" required:"true"`
}

func (*UserGroupCommand) Execute

func (command *UserGroupCommand) Execute([]string) error

type UserGroupsCommand

type UserGroupsCommand struct {
	ProductSlug    string `long:"product-slug" short:"p" description:"Product slug e.g. p-mysql"`
	ReleaseVersion string `long:"release-version" short:"r" description:"Release version e.g. 0.1.2-rc1"`
}

func (*UserGroupsCommand) Execute

func (command *UserGroupsCommand) Execute([]string) error

type VersionCommand

type VersionCommand struct{}

func (*VersionCommand) Execute

func (command *VersionCommand) Execute(args []string) error

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.
companygroupfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
curlfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
dependencyspecifierfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
eulafakes
Code generated by counterfeiter.
Code generated by counterfeiter.
filegroupfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
imagereferencefakes
Code generated by counterfeiter.
Code generated by counterfeiter.
loginfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
logoutfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
pivnetversionsfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
productfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
productfilefakes
Code generated by counterfeiter.
Code generated by counterfeiter.
releasefakes
Code generated by counterfeiter.
Code generated by counterfeiter.
releasedependencyfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
releasetypefakes
Code generated by counterfeiter.
Code generated by counterfeiter.
releaseupgradepathfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
usergroupfakes
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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