Documentation
¶
Index ¶
- Constants
- func AddYamlConfigFlag(cmd *cobra.Command, flagHelp string)
- func AddYamlConfigFlagVar(ptr *string, cmd *cobra.Command, flagHelp string)
- func CreateUser(cmd *cobra.Command, username string, groups []string, ...) error
- func DeleteUser(cmd *cobra.Command, username string) error
- func StringInSlice(a string, list []string) bool
- func UpdateProjectAssociation(cmd *cobra.Command, groupName string, projectName string, chosenRoles []string, ...) error
- func UpdateUserAssociation(cmd *cobra.Command, groupName string, addUsernames []string, ...) error
- type ApplyResourcesOptions
- type CmdOptions
- type CreateClusterImportedOptions
- type CreateClusterOptions
- type CreateGroupOptions
- type CreateIDpOptions
- type CreateOIDCProviderOptions
- type CreateProjectOptions
- type CreateRoleOptions
- type CreateUserOptions
- type DeleteClusterOptions
- type DeleteGroupOptions
- type DeleteIdpOptions
- type DeleteOIDCProviderOptions
- type DeleteProjectOptions
- type DeleteRoleOptions
- type DeleteUserOptions
- type DownloadConfigsOptions
- type DownloadKubeconfigOptions
- type GetClusterBootstrapOptions
- type GetClusterOptions
- type GetGroupOptions
- type GetIdpOptions
- type GetLocationOptions
- type GetProjectOptions
- type GetRolePermissionOptions
- type GetRolesOptions
- type GetUserOptions
- type GlobalOptions
- type OIDCProviderOptions
- type UpdateClusterOptions
- type UpdateGroupassociationOptions
Constants ¶
const ( YamlConfigFlag = "config-file" YamlConfigShorthandFlag = "f" )
const ( CreateClusterImportedLocationFlag = "location" CreateClusterImportedLocationShorthandFlag = "l" CreateClusterImportedTypeFlag = "type" )
const ( ClientIDFlag = "clientid" ClientSecretFlag = "clientsecret" CallbackUrlFlag = "callback-url" IssuerUrlFlag = "issuer-url" MapperUrlFlag = "mapper-url" ScopesFlag = "scopes" )
const ( ScopeFlag = "scope" PermissionsFlag = "permissions" )
const ( CreateConsoleAccessFlag = "console" CreateUserGroupAssocFlag = "groups" )
const ( ClusterDeleteConfirmFlag = "yes" ClusterDeleteConfirmShortFlag = "y" )
define flags names here
const ( DownloadKubeconfigClusterFlag = "cluster" DownloadKubeconfigNamespaceShorthandFlag = "n" DownloadKubeconfigToFileFlag = "to-file" DownloadKubeconfigToFileShorthandFlag = "s" )
const ( UpdateGroupProjectFlag = "associateproject" UpdateGroupRolesFlag = "roles" UpdateNamespacesFlag = "namespace" UpdateGroupUserFlag = "associateuser" UpdateAddGroupUserFlag = "addusers" UpdateRemoveGroupUserFlag = "removeusers" )
const (
CreateClusterTypeFlag = "type"
)
define flags names here
const (
CreateGroupDescriptionFlag = "desc"
)
const (
CreateProjectDescriptionFlag = "desc"
)
Variables ¶
This section is empty.
Functions ¶
func AddYamlConfigFlag ¶
func AddYamlConfigFlagVar ¶
func CreateUser ¶
func StringInSlice ¶
Types ¶
type ApplyResourcesOptions ¶
type ApplyResourcesOptions struct { YamlConfigPath string // contains filtered or unexported fields }
func NewApplyResourcesOptions ¶
func NewApplyResourcesOptions(logger log.Logger, config *config.Config) *ApplyResourcesOptions
func (*ApplyResourcesOptions) AddFlags ¶
func (c *ApplyResourcesOptions) AddFlags(_ *cobra.Command)
type CmdOptions ¶
type CmdOptions interface { // Validate is used to validate arguments and flags. // The function will validate args without calling REST APIs. // This means validating if files exist, if there are duplicate arguments provided, // if the proper flags are provided, etc. // It is also where config files are parsed Validate(cmd *cobra.Command, args []string) error // Run runs the command action Run(cmd *cobra.Command, args []string) error // AddFlags adds flags to the supplied cobra command AddFlags(cmd *cobra.Command) }
func NewGetProjectOptions ¶
func NewGetProjectOptions(logger log.Logger) CmdOptions
NewGetProjectOptions is used to create an new instance of the command. Parameters are dependencies required by the command, like a logger
type CreateClusterImportedOptions ¶
type CreateClusterImportedOptions struct {
// contains filtered or unexported fields
}
func NewCreateClusterImportedOptions ¶
func NewCreateClusterImportedOptions(logger log.Logger) *CreateClusterImportedOptions
func (*CreateClusterImportedOptions) AddFlags ¶
func (o *CreateClusterImportedOptions) AddFlags(cmd *cobra.Command)
type CreateClusterOptions ¶
type CreateClusterOptions struct { YamlConfigPath string // contains filtered or unexported fields }
func NewCreateClusterOptions ¶
func NewCreateClusterOptions(logger log.Logger) *CreateClusterOptions
func (*CreateClusterOptions) AddFlags ¶
func (o *CreateClusterOptions) AddFlags(cmd *cobra.Command)
type CreateGroupOptions ¶
type CreateGroupOptions struct { Description string // contains filtered or unexported fields }
func NewCreateGroupOptions ¶
func NewCreateGroupOptions(logger log.Logger, config *config.Config) *CreateGroupOptions
func (*CreateGroupOptions) AddFlags ¶
func (o *CreateGroupOptions) AddFlags(cmd *cobra.Command)
type CreateIDpOptions ¶
type CreateIDpOptions struct {
// contains filtered or unexported fields
}
func NewCreateIdpOptions ¶
func NewCreateIdpOptions(logger log.Logger, config *config.Config) *CreateIDpOptions
func (*CreateIDpOptions) AddFlags ¶
func (c *CreateIDpOptions) AddFlags(_ *cobra.Command)
type CreateOIDCProviderOptions ¶
type CreateOIDCProviderOptions struct {
// contains filtered or unexported fields
}
func NewCreateOIDCProviderOptions ¶
func NewCreateOIDCProviderOptions(logger log.Logger, config *config.Config) *CreateOIDCProviderOptions
func (*CreateOIDCProviderOptions) AddFlags ¶
func (c *CreateOIDCProviderOptions) AddFlags(cmd *cobra.Command)
type CreateProjectOptions ¶
type CreateProjectOptions struct { YamlConfigPath string Description string // contains filtered or unexported fields }
func NewCreateProjectOptions ¶
func NewCreateProjectOptions(logger log.Logger, config *config.Config) *CreateProjectOptions
func (*CreateProjectOptions) AddFlags ¶
func (o *CreateProjectOptions) AddFlags(cmd *cobra.Command)
type CreateRoleOptions ¶
type CreateRoleOptions struct {
// contains filtered or unexported fields
}
func NewCreateRoleOptions ¶
func NewCreateRoleOptions(logger log.Logger, config *config.Config) *CreateRoleOptions
func (*CreateRoleOptions) AddFlags ¶
func (c *CreateRoleOptions) AddFlags(cmd *cobra.Command)
type CreateUserOptions ¶
type CreateUserOptions struct { ConsoleAccessInputs []string Groups []string // contains filtered or unexported fields }
func NewCreateUserOptions ¶
func NewCreateUserOptions(logger log.Logger, config *config.Config) *CreateUserOptions
func (*CreateUserOptions) AddFlags ¶
func (o *CreateUserOptions) AddFlags(cmd *cobra.Command)
type DeleteClusterOptions ¶
type DeleteClusterOptions struct {
// contains filtered or unexported fields
}
func NewDeleteClusterOptions ¶
func NewDeleteClusterOptions(logger log.Logger) *DeleteClusterOptions
func (*DeleteClusterOptions) AddFlags ¶
func (c *DeleteClusterOptions) AddFlags(cmd *cobra.Command)
type DeleteGroupOptions ¶
type DeleteGroupOptions struct {
// contains filtered or unexported fields
}
func NewDeleteGroupOptions ¶
func NewDeleteGroupOptions(logger log.Logger, config *config.Config) *DeleteGroupOptions
func (*DeleteGroupOptions) AddFlags ¶
func (o *DeleteGroupOptions) AddFlags(_ *cobra.Command)
type DeleteIdpOptions ¶
type DeleteIdpOptions struct {
// contains filtered or unexported fields
}
func NewDeleteIdpOptions ¶
func NewDeleteIdpOptions(logger log.Logger, config *config.Config) *DeleteIdpOptions
func (*DeleteIdpOptions) AddFlags ¶
func (o *DeleteIdpOptions) AddFlags(_ *cobra.Command)
type DeleteOIDCProviderOptions ¶
type DeleteOIDCProviderOptions struct {
// contains filtered or unexported fields
}
func NewDeleteOIDCProviderOptions ¶
func NewDeleteOIDCProviderOptions(logger log.Logger, config *config.Config) *DeleteOIDCProviderOptions
func (*DeleteOIDCProviderOptions) AddFlags ¶
func (o *DeleteOIDCProviderOptions) AddFlags(_ *cobra.Command)
type DeleteProjectOptions ¶
type DeleteProjectOptions struct { YamlConfigPath string // contains filtered or unexported fields }
func NewDeleteProjectOptions ¶
func NewDeleteProjectOptions(logger log.Logger, config *config.Config) *DeleteProjectOptions
func (*DeleteProjectOptions) AddFlags ¶
func (o *DeleteProjectOptions) AddFlags(_ *cobra.Command)
type DeleteRoleOptions ¶
type DeleteRoleOptions struct {
// contains filtered or unexported fields
}
func NewDeleteRoleOptions ¶
func NewDeleteRoleOptions(logger log.Logger, config *config.Config) *DeleteRoleOptions
func (*DeleteRoleOptions) AddFlags ¶
func (o *DeleteRoleOptions) AddFlags(_ *cobra.Command)
type DeleteUserOptions ¶
type DeleteUserOptions struct {
// contains filtered or unexported fields
}
func NewDeleteUserOptions ¶
func NewDeleteUserOptions(logger log.Logger) *DeleteUserOptions
func (*DeleteUserOptions) AddFlags ¶
func (c *DeleteUserOptions) AddFlags(_ *cobra.Command)
type DownloadConfigsOptions ¶ added in v0.1.4
type DownloadConfigsOptions struct {
// contains filtered or unexported fields
}
func NewDownloadConfigOptions ¶ added in v0.1.4
func NewDownloadConfigOptions(logger log.Logger) *DownloadConfigsOptions
func (*DownloadConfigsOptions) AddFlags ¶ added in v0.1.4
func (o *DownloadConfigsOptions) AddFlags(cmd *cobra.Command)
type DownloadKubeconfigOptions ¶
type DownloadKubeconfigOptions struct { Cluster, FileOutput string // contains filtered or unexported fields }
func NewDownloadKubeconfigOptions ¶
func NewDownloadKubeconfigOptions(logger log.Logger) *DownloadKubeconfigOptions
func (*DownloadKubeconfigOptions) AddFlags ¶
func (c *DownloadKubeconfigOptions) AddFlags(cmd *cobra.Command)
type GetClusterBootstrapOptions ¶
type GetClusterBootstrapOptions struct {
// contains filtered or unexported fields
}
func NewGetClusterBootstrapOptions ¶
func NewGetClusterBootstrapOptions(logger log.Logger) *GetClusterBootstrapOptions
func (*GetClusterBootstrapOptions) AddFlags ¶
func (o *GetClusterBootstrapOptions) AddFlags(_ *cobra.Command)
type GetClusterOptions ¶
type GetClusterOptions struct {
// contains filtered or unexported fields
}
func NewGetClusterOptions ¶
func NewGetClusterOptions(logger log.Logger) *GetClusterOptions
func (*GetClusterOptions) AddFlags ¶
func (o *GetClusterOptions) AddFlags(_ *cobra.Command)
type GetGroupOptions ¶
type GetGroupOptions struct {
Limit, Offset int
// contains filtered or unexported fields
}
flagpole
func NewGetGroupOptions ¶
func NewGetGroupOptions(logger log.Logger) *GetGroupOptions
NewGetGroupOptions is used to create an new instance of the command. Parameters are dependencies required by the command, like a logger
func (*GetGroupOptions) AddFlags ¶
func (o *GetGroupOptions) AddFlags(cmd *cobra.Command)
AddFlags is where you define the command flags and attach the flagpole
type GetIdpOptions ¶
type GetIdpOptions struct {
Limit, Offset int
// contains filtered or unexported fields
}
GetIdpOptions flagpole
func NewGetIdpOptions ¶
func NewGetIdpOptions(logger log.Logger) *GetIdpOptions
NewGetIdpOptions is used to create an new instance of the command. Parameters are dependencies required by the command, like a logger
func (*GetIdpOptions) AddFlags ¶
func (o *GetIdpOptions) AddFlags(cmd *cobra.Command)
AddFlags is where you define the command flags and attach the flagpole
type GetLocationOptions ¶
type GetLocationOptions struct {
// contains filtered or unexported fields
}
func NewGetLocationOptions ¶
func NewGetLocationOptions(logger log.Logger) *GetLocationOptions
func (*GetLocationOptions) AddFlags ¶
func (o *GetLocationOptions) AddFlags(_ *cobra.Command)
type GetProjectOptions ¶
type GetProjectOptions struct {
Limit, Offset int
// contains filtered or unexported fields
}
flagpole
func (*GetProjectOptions) AddFlags ¶
func (o *GetProjectOptions) AddFlags(cmd *cobra.Command)
AddFlags is where you define the command flags and attach the flagpole
type GetRolePermissionOptions ¶
type GetRolePermissionOptions struct {
// contains filtered or unexported fields
}
func NewGetRolePermissionOptions ¶
func NewGetRolePermissionOptions(logger log.Logger) *GetRolePermissionOptions
func (*GetRolePermissionOptions) AddFlags ¶
func (o *GetRolePermissionOptions) AddFlags(_ *cobra.Command)
type GetRolesOptions ¶
type GetRolesOptions struct {
// contains filtered or unexported fields
}
func NewGetRolesOptions ¶
func NewGetRolesOptions(logger log.Logger) *GetRolesOptions
func (*GetRolesOptions) AddFlags ¶
func (o *GetRolesOptions) AddFlags(_ *cobra.Command)
type GetUserOptions ¶
type GetUserOptions struct {
Limit, Offset int
// contains filtered or unexported fields
}
flagpole
func NewGetUserOptions ¶
func NewGetUserOptions(logger log.Logger) *GetUserOptions
NewGetUserOptions is used to create an new instance of the command. Parameters are dependencies required by the command, like a logger
func (*GetUserOptions) AddFlags ¶
func (o *GetUserOptions) AddFlags(cmd *cobra.Command)
AddFlags is where you define the command flags and attach the flagpole
type GlobalOptions ¶
type GlobalOptions struct { Verbose, Debug bool ConfigFile, Output, Project string FilePath string Group string // contains filtered or unexported fields }
GlobalOptions is a struct to hold the values for global options
func NewGlobalOptions ¶
func NewGlobalOptions(log log.Logger, config *config.Config) *GlobalOptions
func (*GlobalOptions) AddFlags ¶
func (g *GlobalOptions) AddFlags(cmd *cobra.Command)
type OIDCProviderOptions ¶
type OIDCProviderOptions struct {
Limit, Offset int
// contains filtered or unexported fields
}
GetOIDCProviderOptions flagpole
func NewGetOIDCProviderOptions ¶
func NewGetOIDCProviderOptions(logger log.Logger) *OIDCProviderOptions
NewGetOIDCProviderOptions is used to create an new instance of the command. Parameters are dependencies required by the command, like a logger
func (*OIDCProviderOptions) AddFlags ¶
func (o *OIDCProviderOptions) AddFlags(cmd *cobra.Command)
AddFlags is where you define the command flags and attach the flagpole
type UpdateClusterOptions ¶
type UpdateClusterOptions struct { YamlConfigPath string // contains filtered or unexported fields }
func NewUpdateClusterOptions ¶
func NewUpdateClusterOptions(logger log.Logger, config *config.Config) *UpdateClusterOptions
func (*UpdateClusterOptions) AddFlags ¶
func (o *UpdateClusterOptions) AddFlags(_ *cobra.Command)
type UpdateGroupassociationOptions ¶
type UpdateGroupassociationOptions struct { Project string Roles []string Scope string Namespace string User string AddUsers []string RemoveUsers []string // contains filtered or unexported fields }
func NewUpdateGroupassociationOptions ¶
func NewUpdateGroupassociationOptions(logger log.Logger, config *config.Config) *UpdateGroupassociationOptions
func (*UpdateGroupassociationOptions) AddFlags ¶
func (o *UpdateGroupassociationOptions) AddFlags(cmd *cobra.Command)
Source Files
¶
- apply_resources.go
- common.go
- config_download.go
- create_cluster.go
- create_cluster_imported.go
- create_group.go
- create_idp.go
- create_oidc.go
- create_project.go
- create_role.go
- create_user.go
- delete_cluster.go
- delete_group.go
- delete_idp.go
- delete_oidc.go
- delete_project.go
- delete_role.go
- delete_user.go
- download_kubeconfig.go
- get_cluster.go
- get_clusterbootstrap.go
- get_group.go
- get_idp.go
- get_location.go
- get_oidc.go
- get_project.go
- get_role.go
- get_rolepermission.go
- get_user.go
- update_cluster.go
- update_groupassociation.go