Documentation ¶
Index ¶
- func CacheExpires(r *http.Response) time.Time
- func NewConfiguration(region string, apiKeys ...*ncloud.APIKey) *ncloud.Configuration
- type APIClient
- type APIResponse
- type AutoscaleOption
- type AutoscalerUpdate
- type Cluster
- type ClusterInputBody
- type ClusterLogInput
- type ClusterRes
- type ClustersRes
- type CreateClusterRes
- type DefaultNodePoolParam
- type KubeconfigRes
- type NodePool
- type NodePoolCreationBody
- type NodePoolRes
- type NodePoolUpdateBody
- type NodePoolsRes
- type OptionRes
- type OptionsRes
- type V2ApiService
- func (a *V2ApiService) ClustersGet(ctx context.Context) (*ClustersRes, error)
- func (a *V2ApiService) ClustersPost(ctx context.Context, clusterInputBody *ClusterInputBody) (*CreateClusterRes, error)
- func (a *V2ApiService) ClustersUuidDelete(ctx context.Context, uuid *string) error
- func (a *V2ApiService) ClustersUuidGet(ctx context.Context, uuid *string) (*ClusterRes, error)
- func (a *V2ApiService) ClustersUuidKubeconfigGet(ctx context.Context, uuid *string) (*KubeconfigRes, error)
- func (a *V2ApiService) ClustersUuidKubeconfigResetPatch(ctx context.Context, uuid *string) error
- func (a *V2ApiService) ClustersUuidNodePoolGet(ctx context.Context, uuid *string) (*NodePoolsRes, error)
- func (a *V2ApiService) ClustersUuidNodePoolInstanceNoDelete(ctx context.Context, uuid *string, instanceNo *string) error
- func (a *V2ApiService) ClustersUuidNodePoolInstanceNoPatch(ctx context.Context, nodePoolUpdateBody *NodePoolUpdateBody, uuid *string, ...) error
- func (a *V2ApiService) ClustersUuidNodePoolPost(ctx context.Context, nodePoolCreationBody *NodePoolCreationBody, uuid *string) error
- func (a *V2ApiService) ClustersUuidNodesGet(ctx context.Context, uuid *string) (*WorkerNodeRes, error)
- func (a *V2ApiService) ClustersUuidNodesInstanceNoDelete(ctx context.Context, uuid *string, instanceNo *string, nodePoolId *string) error
- func (a *V2ApiService) OptionVersionGet(ctx context.Context) (*OptionsRes, error)
- func (a *V2ApiService) RootGet(ctx context.Context) error
- type WorkerNode
- type WorkerNodeRes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheExpires ¶
CacheExpires helper function to determine remaining time before repeating a request.
func NewConfiguration ¶
func NewConfiguration(region string, apiKeys ...*ncloud.APIKey) *ncloud.Configuration
Types ¶
type APIClient ¶
type APIClient struct { // API Services V2Api *V2ApiService // contains filtered or unexported fields }
APIClient manages communication with the vnks API v2021-11-25T15:22:25Z In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *ncloud.Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
Change base path to allow switching to mocks
type APIResponse ¶
type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the swagger operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` }
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
type AutoscaleOption ¶
type AutoscalerUpdate ¶
type Cluster ¶
type Cluster struct { // 클러스터 uuid Uuid *string `json:"uuid"` // 클러스터 acg 이름 AcgName *string `json:"acgName"` // 클러스터 이름 Name *string `json:"name"` // 클러스터 용량 Capacity *string `json:"capacity"` // 클러스터 타입 ClusterType *string `json:"clusterType"` // 등록된 노드 총 개수 NodeCount *int32 `json:"nodeCount"` // 사용할 수 있는 노드의 최대 개수 NodeMaxCount *int32 `json:"nodeMaxCount"` // cpu 개수 CpuCount *int32 `json:"cpuCount"` // 메모리 용량 MemorySize *int32 `json:"memorySize"` // 생성 일자 CreatedAt *string `json:"createdAt"` // Control Plane API 주소 Endpoint *string `json:"endpoint"` // 쿠버네티스 버전 K8sVersion *string `json:"k8sVersion"` // region의 코드 RegionCode *string `json:"regionCode"` // 클러스터의 상태 Status *string `json:"status"` // CNI Plugin Code KubeNetworkPlugin *string `json:"kubeNetworkPlugin"` // 로드밸런서 전용 서브넷 이름 SubnetLbName *string `json:"subnetLbName"` // 로드밸런서 전용 서브넷 No SubnetLbNo *int32 `json:"subnetLbNo"` // 로드밸런서 전용 Public Subnet No LbPublicSubnetNo *int32 `json:"lbPublicSubnetNo,omitempty"` // 서브넷 이름 SubnetName *string `json:"subnetName"` // 서브넷 No 목록 SubnetNoList []*int32 `json:"subnetNoList"` // 최근 업데이트 일자 UpdatedAt *string `json:"updatedAt"` // vpc 이름 VpcName *string `json:"vpcName"` // vpc 번호 VpcNo *int32 `json:"vpcNo"` // zone 코드 ZoneCode *string `json:"zoneCode,omitempty"` // zone 번호 ZoneNo *int32 `json:"zoneNo,omitempty"` // 로그인 키 이름 LoginKeyName *string `json:"loginKeyName"` // log Log *ClusterLogInput `json:"log"` // Public Network PublicNetwork *bool `json:"publicNetwork"` // 노드풀 NodePool []*NodePoolRes `json:"nodePool"` }
type ClusterInputBody ¶
type ClusterInputBody struct { // 클러스터 이름 Name *string `json:"name"` // 클러스터 타입 ClusterType *string `json:"clusterType"` // 로그인 키 이름 LoginKeyName *string `json:"loginKeyName"` // 쿠버네티스 버전 K8sVersion *string `json:"k8sVersion,omitempty"` // Region의 코드 RegionCode *string `json:"regionCode"` // zone 코드 ZoneCode *string `json:"zoneCode,omitempty"` // Zone 번호 ZoneNo *int32 `json:"zoneNo,omitempty"` // Public network PublicNetwork *bool `json:"publicNetwork,omitempty"` // CNI Plugin Code (ncloud-vpc-cni or cilium) KubeNetworkPlugin *string `json:"kubeNetworkPlugin,omitempty"` // vpc의 No VpcNo *int32 `json:"vpcNo"` // 서브넷 No 목록 SubnetNoList []*int32 `json:"subnetNoList"` // 로드밸런서 전용 서브넷 No SubnetLbNo *int32 `json:"subnetLbNo"` // 로드밸런서 전용 Public Subnet No LbPublicSubnetNo *int32 `json:"lbPublicSubnetNo,omitempty"` // log Log *ClusterLogInput `json:"log,omitempty"` // 기본 노드풀 DefaultNodePool *DefaultNodePoolParam `json:"defaultNodePool,omitempty"` // 추가 노드풀 NodePool []*NodePool `json:"nodePool,omitempty"` // InitScript 번호 InitScriptNo *int32 `json:"initScriptNo,omitempty"` // Pod Security Policy 설정 여부 PodSecurityPolicyEnabled *bool `json:"podSecurityPolicyEnabled,omitempty"` }
type ClusterLogInput ¶
type ClusterLogInput struct { // audit log 설정 Audit *bool `json:"audit,omitempty"` }
type ClusterRes ¶
type ClusterRes struct { // 클러스터 Cluster *Cluster `json:"cluster"` }
type ClustersRes ¶
type ClustersRes struct { // 클러스터 목록 Clusters []*Cluster `json:"clusters"` }
type CreateClusterRes ¶
type CreateClusterRes struct { // 클러스터 UUID Uuid *string `json:"uuid"` }
type DefaultNodePoolParam ¶
type KubeconfigRes ¶
type KubeconfigRes struct { // Kubeconfig Kubeconfig *string `json:"kubeconfig"` }
type NodePoolCreationBody ¶
type NodePoolCreationBody struct { // 노드풀 이름 Name *string `json:"name"` // 등록 될 노드 개수 NodeCount *int32 `json:"nodeCount"` // Subnet 번호 SubnetNo *int32 `json:"subnetNo,omitempty"` // 상품 코드 ProductCode *string `json:"productCode"` // 오토스케일 Autoscale *AutoscalerUpdate `json:"autoscale,omitempty"` }
type NodePoolRes ¶
type NodePoolRes struct { // 인스턴스 No InstanceNo *int32 `json:"instanceNo"` // default pool 여부 IsDefault *bool `json:"isDefault"` // 노드풀 이름 Name *string `json:"name"` // 노드 개수 NodeCount *int32 `json:"nodeCount"` // Subnet no list SubnetNoList []*int32 `json:"subnetNoList,omitempty"` // Subnet name list SubnetNameList []*string `json:"subnetNameList,omitempty"` // 상품 코드 ProductCode *string `json:"productCode"` // 노드풀 상태 Status *string `json:"status"` // k8s version K8sVersion *string `json:"k8sVersion,omitempty"` // 오토스케일 Autoscale *AutoscaleOption `json:"autoscale"` }
type NodePoolUpdateBody ¶
type NodePoolUpdateBody struct { // 노드 개수 NodeCount *int32 `json:"nodeCount"` // 오토스케일 Autoscale *AutoscalerUpdate `json:"autoscale,omitempty"` }
type NodePoolsRes ¶
type NodePoolsRes struct { // 노드풀 목록 NodePool []*NodePoolRes `json:"nodePool"` }
type V2ApiService ¶
type V2ApiService service
func (*V2ApiService) ClustersGet ¶
func (a *V2ApiService) ClustersGet(ctx context.Context) (*ClustersRes, error)
V2ApiService
@return *ClustersRes
func (*V2ApiService) ClustersPost ¶
func (a *V2ApiService) ClustersPost(ctx context.Context, clusterInputBody *ClusterInputBody) (*CreateClusterRes, error)
V2ApiService
@param clusterInputBody @return *CreateClusterRes
func (*V2ApiService) ClustersUuidDelete ¶
func (a *V2ApiService) ClustersUuidDelete(ctx context.Context, uuid *string) error
V2ApiService
@param uuid uuid @return
func (*V2ApiService) ClustersUuidGet ¶
func (a *V2ApiService) ClustersUuidGet(ctx context.Context, uuid *string) (*ClusterRes, error)
V2ApiService
@param uuid uuid @return *ClusterRes
func (*V2ApiService) ClustersUuidKubeconfigGet ¶
func (a *V2ApiService) ClustersUuidKubeconfigGet(ctx context.Context, uuid *string) (*KubeconfigRes, error)
V2ApiService
@param uuid uuid @return *KubeconfigRes
func (*V2ApiService) ClustersUuidKubeconfigResetPatch ¶
func (a *V2ApiService) ClustersUuidKubeconfigResetPatch(ctx context.Context, uuid *string) error
V2ApiService
@param uuid uuid @return
func (*V2ApiService) ClustersUuidNodePoolGet ¶
func (a *V2ApiService) ClustersUuidNodePoolGet(ctx context.Context, uuid *string) (*NodePoolsRes, error)
V2ApiService
@param uuid uuid @return *NodePoolsRes
func (*V2ApiService) ClustersUuidNodePoolInstanceNoDelete ¶
func (a *V2ApiService) ClustersUuidNodePoolInstanceNoDelete(ctx context.Context, uuid *string, instanceNo *string) error
V2ApiService
@param uuid uuid @param instanceNo instanceNo @return
func (*V2ApiService) ClustersUuidNodePoolInstanceNoPatch ¶
func (a *V2ApiService) ClustersUuidNodePoolInstanceNoPatch(ctx context.Context, nodePoolUpdateBody *NodePoolUpdateBody, uuid *string, instanceNo *string) error
V2ApiService
@param nodePoolUpdateBody @param uuid uuid @param instanceNo instanceNo @return
func (*V2ApiService) ClustersUuidNodePoolPost ¶
func (a *V2ApiService) ClustersUuidNodePoolPost(ctx context.Context, nodePoolCreationBody *NodePoolCreationBody, uuid *string) error
V2ApiService
@param nodePoolCreationBody @param uuid uuid @return
func (*V2ApiService) ClustersUuidNodesGet ¶
func (a *V2ApiService) ClustersUuidNodesGet(ctx context.Context, uuid *string) (*WorkerNodeRes, error)
V2ApiService
@param uuid uuid @return *WorkerNodeRes
func (*V2ApiService) ClustersUuidNodesInstanceNoDelete ¶ added in v1.4.5
func (a *V2ApiService) ClustersUuidNodesInstanceNoDelete(ctx context.Context, uuid *string, instanceNo *string, nodePoolId *string) error
V2ApiService
@param uuid uuid @param instanceNo instanceNo @param nodePoolId nodePoolId @return
func (*V2ApiService) OptionVersionGet ¶
func (a *V2ApiService) OptionVersionGet(ctx context.Context) (*OptionsRes, error)
V2ApiService
@return *OptionsRes
type WorkerNode ¶
type WorkerNode struct { // 워커노드 id Id *string `json:"id"` // 워커노드 이름 Name *string `json:"name"` // 워커노드 서버이름 ServerName *string `json:"serverName"` // 워커노드 서버 스펙 ServerSpec *string `json:"serverSpec"` // 비 공인 IP PrivateIp *string `json:"privateIp"` // 공인 IP PublicIp *string `json:"publicIp"` // 반납 보호 설정 ReturnProtectionYn *string `json:"returnProtectionYn"` // 워커노드 현재 상태 Status *string `json:"status"` // 상태 코드 StatusCode *string `json:"statusCode"` // 상태 아이콘 StatusIcon *string `json:"statusIcon"` // 상태 색깔 StatusColor *string `json:"statusColor"` // 상태 이름 StatusName *string `json:"statusName"` // 서버 이미지 이름 ServerImageName *string `json:"serverImageName"` // cpu 수 CpuCount *int32 `json:"cpuCount"` // 총 메모리 용량 MemorySize *int32 `json:"memorySize"` // 스펙 코드 SpecCode *string `json:"specCode"` // 로그인 키 이름 LoginKeyName *string `json:"loginKeyName"` // 쿠버네티스 상태 K8sStatus *string `json:"k8sStatus"` // 도커 버전 DockerVersion *string `json:"dockerVersion"` // 커널 버전 KernelVersion *string `json:"kernelVersion"` // 노드풀 이름 NodePoolName *string `json:"nodePoolName"` }
type WorkerNodeRes ¶
type WorkerNodeRes struct { // 워커노드 목록 Nodes []*WorkerNode `json:"nodes"` }
Source Files ¶
- api_client.go
- api_response.go
- autoscale_option.go
- autoscaler_update.go
- cluster.go
- cluster_input_body.go
- cluster_log_input.go
- cluster_res.go
- clusters_res.go
- configuration.go
- create_cluster_res.go
- default_node_pool_param.go
- kubeconfig_res.go
- node_pool.go
- node_pool_creation_body.go
- node_pool_res.go
- node_pool_update_body.go
- node_pools_res.go
- option_res.go
- options_res.go
- v2_api.go
- worker_node.go
- worker_node_res.go