commands

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2016 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultHost = "https://network.pivotal.io"
)

Variables

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

	ErrorHandler errorhandler.ErrorHandler
	Printer      printer.Printer
)
View Source
var ErrShowHelpMessage = errors.New("help command invoked")
View Source
var NewCurlClient = func() CurlClient {
	return curl.NewCurlClient(
		NewPivnetClient(),
		ErrorHandler,
		Pivnet.Format,
		OutputWriter,
		Printer,
	)
}
View Source
var NewEULAClient = func() EULAClient {
	return eula.NewEULAClient(
		NewPivnetClient(),
		ErrorHandler,
		Pivnet.Format,
		OutputWriter,
		Printer,
	)
}
View Source
var NewFileGroupClient = func() FileGroupClient {
	return filegroup.NewFileGroupClient(
		NewPivnetClient(),
		ErrorHandler,
		Pivnet.Format,
		OutputWriter,
		Printer,
	)
}
View Source
var NewProductClient = func() ProductClient {
	return product.NewProductClient(
		NewPivnetClient(),
		ErrorHandler,
		Pivnet.Format,
		OutputWriter,
		Printer,
	)
}
View Source
var NewReleaseClient = func() ReleaseClient {
	return release.NewReleaseClient(
		NewPivnetClient(),
		ErrorHandler,
		Pivnet.Format,
		OutputWriter,
		Printer,
	)
}
View Source
var NewUserGroupClient = func() UserGroupClient {
	return usergroup.NewUserGroupClient(
		NewPivnetClient(),
		ErrorHandler,
		Pivnet.Format,
		OutputWriter,
		Printer,
	)
}

Functions

func Init

func Init()

func NewPivnetClient

func NewPivnetClient() *gp.CompositeClient

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 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 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" description:"Dependent product slug e.g. p-mysql" required:"true"`
	DependentReleaseVersion string `long:"dependent-release-version" 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" description:"Previous release version e.g. 0.1.2-rc1" 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 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 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"`
	MD5          string `long:"md5" description:"MD5 of file" required:"true"`
}

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, args []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\"}'"`
}

func (*CurlCommand) Execute

func (command *CurlCommand) Execute(args []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 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 DownloadProductFileCommand

type DownloadProductFileCommand 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"`
	ProductFileID  int    `long:"product-file-id" short:"i" description:"Product file ID e.g. 1234" required:"true"`
	Filepath       string `long:"filepath" description:"Local filepath to download file to e.g. /tmp/my-file" required:"true"`
	AcceptEULA     bool   `long:"accept-eula" description:"Automatically accept EULA if necessary"`
}

func (*DownloadProductFileCommand) Execute

func (command *DownloadProductFileCommand) 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 HelpCommand

type HelpCommand struct{}

func (*HelpCommand) Execute

func (command *HelpCommand) Execute(args []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"`

	APIToken string `long:"api-token" description:"Pivnet API token"`
	Host     string `long:"host" description:"Pivnet API Host"`

	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"`

	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"`

	Products ProductsCommand `command:"products" alias:"ps" description:"List products"`
	Product  ProductCommand  `command:"product" alias:"p" description:"Show 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"`

	DownloadProductFile DownloadProductFileCommand `command:"download-product-file" alias:"dlpf" description:"Download product file"`

	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"`

	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"`

	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"`

	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"`

	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 ProductClient

type ProductClient interface {
	List() error
	Get(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,
		fileType *string,
		fileVersion *string,
		md5 *string,
		description *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, productFileID int, filepath string, acceptEULA bool) 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"`
}

func (*ProductFilesCommand) Execute

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

type ProductsCommand

type ProductsCommand struct {
}

func (*ProductsCommand) Execute

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

type ReleaseClient

type ReleaseClient interface {
	List(productSlug string) error
	Get(productSlug string, releaseVersion string) error
	Create(productSlug string, releaseVersion string, releaseType string, eulaSlug 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"`
}

func (*ReleasesCommand) Execute

func (command *ReleasesCommand) 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 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" description:"Dependent product slug e.g. p-mysql" required:"true"`
	DependentReleaseVersion string `long:"dependent-release-version" 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" description:"Previous release version e.g. 0.1.2-rc1" 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 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 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"`
	FileType      *string `long:"file-type" description:"File Type e.g. 'Software'"`
	FileVersion   *string `long:"file-version" description:"File Version e.g. '1.7.13'"`
	MD5           *string `long:"md5" description:"MD5 of file"`
	Description   *string `long:"description" description:"File description e.g. 'This is a file description.'"`
}

func (*UpdateProductFileCommand) Execute

func (command *UpdateProductFileCommand) 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
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter
curlfakes
This file was generated by counterfeiter
This file was generated by counterfeiter
eulafakes
This file was generated by counterfeiter
This file was generated by counterfeiter
filegroupfakes
This file was generated by counterfeiter
This file was generated by counterfeiter
productfakes
This file was generated by counterfeiter
This file was generated by counterfeiter
productfilefakes
This file was generated by counterfeiter
This file was generated by counterfeiter
releasefakes
This file was generated by counterfeiter
This file was generated by counterfeiter
releasedependencyfakes
This file was generated by counterfeiter
This file was generated by counterfeiter
releasetypefakes
This file was generated by counterfeiter
This file was generated by counterfeiter
releaseupgradepathfakes
This file was generated by counterfeiter
This file was generated by counterfeiter
usergroupfakes
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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