project

package
v1.0.0-beta5 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create added in v0.0.4

func Create(client *occlient.Client, projectName string, wait bool) error

func Delete added in v0.0.11

func Delete(client *occlient.Client, projectName string) error

Delete deletes the project with name projectName and returns errors if any

func Exists added in v0.0.4

func Exists(client *occlient.Client, projectName string) (bool, error)

Exists Checks whether a project with the given name exists or not projectName is the project name to perform check for The first returned parameter is a bool indicating if a project with the given name already exists or not The second returned parameter is the error that might occurs while execution

func GetCurrent

func GetCurrent(client *occlient.Client) string

GetCurrent return current project

func MachineReadableSuccessOutput added in v1.0.0

func MachineReadableSuccessOutput(projectName string, message string)

MachineReadableSuccessOutput outputs a success output that includes project information and namespace

func SetCurrent

func SetCurrent(client *occlient.Client, projectName string) error

SetCurrent sets the projectName as current project

Types

type Project added in v1.0.0

type Project struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              ProjectSpec   `json:"spec,omitempty"`
	Status            ProjectStatus `json:"status,omitempty"`
}

func GetMachineReadableFormat added in v1.0.0

func GetMachineReadableFormat(projectName string, isActive bool, apps []string) Project

GetMachineReadableFormat gathers the readable format and output a Project struct for json to marshal

type ProjectList added in v1.0.0

type ProjectList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Project `json:"items"`
}

func DescribeProjects

func DescribeProjects(client *occlient.Client) (ProjectList, error)

type ProjectSpec added in v1.0.0

type ProjectSpec struct {
	Applications []string `json:"apps"`
}

type ProjectStatus added in v1.0.0

type ProjectStatus struct {
	Active bool `json:"active"`
}

Jump to

Keyboard shortcuts

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