Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ConfigFile the default config file path ConfigFile = ".kappital/config" // DeployInstanceURL the url format for deploying the instance DeployInstanceURL = "%v/api/v1alpha1/servicebinding/%v/instance?cluster_name=%v" // DeployServiceURL the url format for deploying the service package into cluster DeployServiceURL = "%v/api/v1alpha1/servicebinding" // GetInstancesURL the url format for getting the instances from the cluster GetInstancesURL = "%v/api/v1alpha1/servicebinding/%v/instance" // GetServiceURL the url format for getting the service from the cluster GetServiceURL = "%v/api/v1alpha1/servicebinding%v?cluster_name=%v" // GetServicesURL the url format for getting the service list from the cluster GetServicesURL = "%v/api/v1alpha1/servicebinding?cluster_name=%v" // DeleteInstanceURL the url format for deleting the instance from the cluster DeleteInstanceURL = "%v/api/v1alpha1/servicebinding/%v/instance/%v?cluster_name=%v" // DeleteServiceURL the url format for deleting service DeleteServiceURL = "%v/api/v1alpha1/servicebinding/%v?cluster_name=%v" )
Variables ¶
View Source
var ( // ManagerIPAddr the manager service ip address ManagerIPAddr = newInputFlag("manager-addr", "", "", "the ip Addr of kappital-manager") // ManagerHTTPSPort the manager https service port ManagerHTTPSPort = newInputFlag("manager-https-port", "", "", "the HTTPS Port of kappital-manager") // ManagerClientCertFile the manager certificate file path ManagerClientCertFile = newInputFlag("manager-client-cert", "", "", "the HTTPS client certificate file of kappital-manager") // ManagerClientKeyFile the manager key file path ManagerClientKeyFile = newInputFlag("manager-client-key", "", "", "the HTTPS client key file of kappital-manager") // ManagerCAFile the manager ca file path ManagerCAFile = newInputFlag("manager-ca", "", "", "the HTTPS ca file for kappital-manager") // ManagerSkipVerify the manager skip verify controller ManagerSkipVerify = newInputFlag("manager-skip-verify", "", false, "connect to kappital-manager need to skip verify") // OutputFormat the output result format of the result, now only offer yaml and json OutputFormat = newInputFlag("output", "o", "", "the output format of the queried resource, can be yaml or json") // Cluster name of service and service instance deployed Cluster = newInputFlag("cluster", "c", apis.DefaultCluster, "the cluster scope of the Cloud Native Service") // GetAll service or instance from cluster GetAll = newInputFlag("all", "A", false, `query resources across all repos/clusters. When this flag is set, --repo or --cluster flag will HAS NO EFFECT`) // Namespace of the service or service instance deployed Namespace = newInputFlag("namespace", "n", apis.DefaultNamespace, "the namespace of the specified instance") // ServiceName the name of deployed or will deploy service ServiceName = newInputFlag("service", "s", "", "the cloud native service name") // InstanceName the name of deployed or will deploy instance InstanceName = newInputFlag("instance", "i", "", "the cloud native service instance name") // FilePath of the instance file FilePath = newInputFlag("file", "f", "", "the custom resource file path") // FileName of the directory name of the kappital package FileName = newInputFlag("name", "", "kappital-demo", "the kappital package name") // PackageVersion of the kappital PackageVersion = newInputFlag("version", "v", "0.1.0", "the kappital package version") // PackageDir of Cloud Native Package PackageDir = newInputFlag("dir", "d", "", "the Cloud Native Package Path") )
Functions ¶
func GetAgeOutput ¶
GetAgeOutput obtains the creation time with the hour, minute, and second.
func IsInputValidate ¶
IsInputValidate does the input arguments is valid or not, such as the max length of string should be 64 bytes.
func OutputYAMLOrJSONString ¶
OutputYAMLOrJSONString output the buf as json or yaml from the format type
Types ¶
type Config ¶
type Config struct { ManagerHTTPSServer string `json:"manager-https-server,omitempty"` ManagerClientCertificateData string `json:"manager-client-certificate-data,omitempty"` ManagerClientKeyData string `json:"manager-client-key-data,omitempty"` ManagerCA string `json:"manager-ca,omitempty"` ManagerSkipVerify bool `json:"manager-skip-verify,omitempty"` }
Config the address and port of the manager
func (Config) BuildManagerURL ¶
BuildManagerURL build the manager http/https request
Click to show internal directories.
Click to hide internal directories.