c7nclient

package
v0.0.0-...-9c8d8c7 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitClient

func InitClient(config *C7NContext, platformConfig *C7NConfig)

Types

type C7NClient

type C7NClient struct {
	BaseURL string
	// contains filtered or unexported fields
}
var Client C7NClient

func (*C7NClient) CheckIsLogin

func (c *C7NClient) CheckIsLogin() error

func (*C7NClient) CreateApp

func (c *C7NClient) CreateApp(out io.Writer, projectId int, appPostInfo *model.AppPostInfo)

func (*C7NClient) CreateCert

func (c *C7NClient) CreateCert(out io.Writer, projectId int, data *url.Values)

func (*C7NClient) CreateCluster

func (c *C7NClient) CreateCluster(out io.Writer, projectId int, clusterPostInfo *model.ClusterPostInfo)

func (*C7NClient) CreateConfigMap

func (c *C7NClient) CreateConfigMap(out io.Writer, projectId int, configMapPostInfo *model.ConfigMapPostInfo)

func (*C7NClient) CreateCustom

func (c *C7NClient) CreateCustom(out io.Writer, projectId int, data *url.Values)

func (*C7NClient) CreateEnv

func (c *C7NClient) CreateEnv(out io.Writer, projectId int, envPostInfo *model.EnvPostInfo)

func (*C7NClient) CreateIngress

func (c *C7NClient) CreateIngress(out io.Writer, projectId int, ingressPostInfo *model.IngressPostInfo)

func (*C7NClient) CreateInstance

func (c *C7NClient) CreateInstance(out io.Writer, projectId int, instancePostInfo *model.InstancePostInfo)

func (*C7NClient) CreatePv

func (c *C7NClient) CreatePv(out io.Writer, projectId int, pvPostInfo *model.PvPostInfo)

func (*C7NClient) CreatePvc

func (c *C7NClient) CreatePvc(out io.Writer, projectId int, pvcPostInfo *model.PvcPostInfo)

func (*C7NClient) CreateSecret

func (c *C7NClient) CreateSecret(out io.Writer, projectId int, secretPostInfo *model.SecretPostInfo)

func (*C7NClient) CreateService

func (c *C7NClient) CreateService(out io.Writer, projectId int, servicePostInfo *model.ServicePostInfo)

func (*C7NClient) GetApp

func (c *C7NClient) GetApp(appCode string, projectId int) (error error, result *model.App)

func (*C7NClient) GetAppVersion

func (c *C7NClient) GetAppVersion(out io.Writer, projectId int, version string, appId int) (error error, result *model.AppVersion)

func (*C7NClient) GetCert

func (c *C7NClient) GetCert(out io.Writer, projectId int, envId int, name string) (error error, result *model.Certification)

func (*C7NClient) GetCluster

func (c *C7NClient) GetCluster(out io.Writer, projectId int, clusterCode string) (error error, result model.Cluster)

func (*C7NClient) GetEnv

func (c *C7NClient) GetEnv(out io.Writer, projectId int, code string) (error error, result *model.DevOpsEnv)

func (*C7NClient) GetEnvSyncStatus

func (c *C7NClient) GetEnvSyncStatus(envId int) (bool, error)

func (*C7NClient) GetOrganization

func (c *C7NClient) GetOrganization(out io.Writer, userId int, orgCode string) (error error, organizationId int)

func (*C7NClient) GetProject

func (c *C7NClient) GetProject(out io.Writer, userId int, proCode string) (error error, project model.Project)

func (*C7NClient) GetService

func (c *C7NClient) GetService(out io.Writer, projectId int, envId int, name string) (error error, result *model.DevOpsService)

func (*C7NClient) InstanceResources

func (c *C7NClient) InstanceResources(out io.Writer, instancesId int)

func (*C7NClient) ListAppVersions

func (c *C7NClient) ListAppVersions(out io.Writer, appCode *string, projectId int)

func (*C7NClient) ListApps

func (c *C7NClient) ListApps(out io.Writer, projectId int)

func (*C7NClient) ListCert

func (c *C7NClient) ListCert(out io.Writer, projectId int, envId int)

func (*C7NClient) ListClusterNode

func (c *C7NClient) ListClusterNode(out io.Writer, projectId int, clusterId int)

func (*C7NClient) ListClusters

func (c *C7NClient) ListClusters(out io.Writer, projectId int)

func (*C7NClient) ListConfigMap

func (c *C7NClient) ListConfigMap(out io.Writer, projectId int, envId int)

func (*C7NClient) ListCustom

func (c *C7NClient) ListCustom(out io.Writer, projectId int, envId int)

func (*C7NClient) ListEnvs

func (c *C7NClient) ListEnvs(out io.Writer, projectId int)

func (*C7NClient) ListEnvsInstance

func (c *C7NClient) ListEnvsInstance(out io.Writer, envId int)

func (*C7NClient) ListGenericCert

func (c *C7NClient) ListGenericCert(out io.Writer, projectId int)

func (*C7NClient) ListIngress

func (c *C7NClient) ListIngress(out io.Writer, envId int)

/devops/v1/projects/42/ingress/54/listByEnv

func (*C7NClient) ListOrganization

func (c *C7NClient) ListOrganization(out io.Writer, userId int)

func (*C7NClient) ListProject

func (c *C7NClient) ListProject(out io.Writer, userId int)

func (*C7NClient) ListPv

func (c *C7NClient) ListPv(out io.Writer, projectId int)

func (*C7NClient) ListPvc

func (c *C7NClient) ListPvc(out io.Writer, projectId int, envId int)

func (*C7NClient) ListSecret

func (c *C7NClient) ListSecret(out io.Writer, projectId int, envId int)

func (*C7NClient) ListService

func (c *C7NClient) ListService(out io.Writer, envId int)

func (*C7NClient) ListValue

func (c *C7NClient) ListValue(out io.Writer, envId int, valueDir string)

func (*C7NClient) Login

func (c *C7NClient) Login(out io.Writer)

func (*C7NClient) Logout

func (c *C7NClient) Logout(out io.Writer)

func (*C7NClient) QueryGitlabUserId

func (c *C7NClient) QueryGitlabUserId(out io.Writer, userId int, projectId int) (error error, gitlabUserId int)

func (*C7NClient) QuerySelf

func (c *C7NClient) QuerySelf(out io.Writer) (error error, info model.UserInfo)

func (*C7NClient) SetOrganization

func (c *C7NClient) SetOrganization(out io.Writer, userId int) (error error)

func (*C7NClient) SetProject

func (c *C7NClient) SetProject(out io.Writer, userId int) (error error)

func (*C7NClient) SwitchContext

func (c *C7NClient) SwitchContext(out io.Writer, name string)

func (*C7NClient) UseOrganization

func (c *C7NClient) UseOrganization(out io.Writer, orgCode string)

func (*C7NClient) UseProject

func (c *C7NClient) UseProject(out io.Writer, proCode string)

type C7NConfig

type C7NConfig struct {
	Contexts       []C7NContext `yaml:"contexts"`
	CurrentContext string       `yaml:"currentContext"`
}

type C7NContext

type C7NContext struct {
	Name   string  `yaml:"name"`
	Server string  `yaml:"server"`
	User   C7NUser `yaml:"user"`
}

type C7NUser

type C7NUser struct {
	UserName         string `yaml:"userName"`
	Token            string `yaml:"token"`
	ProjectId        int    `yaml:"projectId"`
	OrganizationId   int    `yaml:"organizationId"`
	OrganizationCode string `yaml:"organizationCode"`
	ProjectCode      string `yaml:"projectCode"`
}

type SafeMap

type SafeMap struct {
	sync.RWMutex
	Map map[string]interface{}
}

func NewSafeMap

func NewSafeMap() *SafeMap

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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