project

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client(ctx context.Context, opts Options) (client.Client, error)

func Create

func Create(ctx context.Context, opts Options, name, defaultRegion string, supportedRegions []string) error

func CreateNamespace

func CreateNamespace(req router.Request, resp router.Response) error

func EnsureAllAppsRemoved

func EnsureAllAppsRemoved(req router.Request, resp router.Response) error

EnsureAllAppsRemoved ensures that all apps are removed from the project before the namespace is deleted.

func Exists

func Exists(ctx context.Context, opts Options, name string) error

func List

func List(ctx context.Context, onlyUseCurrentServer bool, opts Options) (projects []string, warnings map[string]error, err error)

List lists all projects available to the user. onlyUseCurrentServer: if true, only list projects from the current Acorn server. This can be an Acorn Manager instsance or a local kubeconfig. If false, list projects from all Acorn servers and the local kubeconfig.

func ParseProject

func ParseProject(project string, defaultContext string) (server, account, namespace string, isKubeconfig bool, err error)

func Remove

func Remove(ctx context.Context, opts Options, name string) (*apiv1.Project, error)

func RenderProjectName

func RenderProjectName(project string, defaultContext string) string

func SetProjectSupportedRegions

func SetProjectSupportedRegions(req router.Request, resp router.Response) error

func Update

func Update(ctx context.Context, opts Options, project DetailProject, defaultRegion string, supportedRegions []string) error

Types

type DetailProject

type DetailProject struct {
	FullName string
	Project  *apiv1.Project
	Err      error
}

func GetDetails

func GetDetails(ctx context.Context, opts Options, projectNames []string) (projects []DetailProject, err error)

type Options

type Options struct {
	AcornConfigFile string
	Project         string
	Kubeconfig      string
	ContextEnv      string
	AllProjects     bool
	AllServers      bool
}

func (Options) CLIConfig

func (o Options) CLIConfig() (*config.CLIConfig, error)

Jump to

Keyboard shortcuts

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