resources

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NCP VPC Cloud LB type code : 'APPLICATION' | 'NETWORK' | 'NETWORK_PROXY'
	NcpLbType string = "NETWORK"

	// NCP VPC Cloud NLB network type code : 'PUBLIC' | 'PRIVATE' (Default: 'PUBLIC')
	NcpPublicNlBType   string = "PUBLIC"
	NcpInternalNlBType string = "PRIVATE"

	// NCP LB performance(throughput) type code : 'SMALL' | 'MEDIUM' | 'LARGE' (Default: 'SMALL')
	// You can only select 'SMALL' if the LB type is 'NETWORK' and the LB network type is 'PRIVATE'.
	DefaultThroughputType string = "SMALL"

	// NCP VPC Cloud default value for Listener and Health Monitor
	DefaultConnectionLimit        int32 = 60 // Min : 1, Max : 3600 sec(Dedicated LB : 1 ~ 480000). Default : 60 sec
	DefaultHealthCheckerInterval  int32 = 30 // Min: 5, Max: 300 (seconds). Default: 30 seconds
	DefaultHealthCheckerThreshold int32 = 2  // Min: 2, Max: 10. Default: 2

	LbTypeSubnetDefaultCidr string = ".240/28"
	LbTypeSubnetDefaultName string = "ncpvpc-subnet-for-nlb"
)
View Source
const (
	BaseURL             string = "https://billingapi.apigw.ntruss.com/billing/v1"
	ProductListURL      string = "/product/getProductList"
	ProductPriceListURL string = "/product/getProductPriceList"
)
View Source
const (
	LnxTypeOs string = "LNX" // LNX (LINUX)
	WinTypeOS string = "WND" // WND (WINDOWS)
)
View Source
const (
	DefaultDiskSize string = "10"
)
View Source
const (
	// NCP VPC Snapshop Options : FULL | INCREMENTAL, Default : FULL
	NcpDefaultSnapshotTypeCode string = "FULL"
)

Variables

This section is empty.

Functions

func ConvertJsonString

func ConvertJsonString(v interface{}) (string, error)

Convert Cloud Object to JSON String type

func GetCallLogScheme

func GetCallLogScheme(zoneInfo string, resourceType call.RES_TYPE, resourceName string, apiName string) call.CLOUDLOGSCHEMA

func InitLog

func InitLog()

func LoggingError

func LoggingError(hiscallInfo call.CLOUDLOGSCHEMA, err error)

func LoggingInfo

func LoggingInfo(hiscallInfo call.CLOUDLOGSCHEMA, start time.Time)

func MappingKeyPairInfo

func MappingKeyPairInfo(ncpKeyPair *vserver.LoginKey) irs.KeyPairInfo

KeyPair 정보를 추출함

func String

func String(n int32) string

int32 to string 변환 : String(), int64 to string 변환 : strconv.Itoa()

Types

type Code added in v0.8.2

type Code struct {
	Code     string `json:"code"`
	CodeName string `json:"codeName"`
}

=========================== For PriceList ============================

type ErrorResponse added in v0.8.2

type ErrorResponse struct {
	Code    string `json:"errorCode,omitempty"`
	Message string `json:"message,omitempty"`
	Details string `json:"details,omitempty"`
}

=========================== Common ============================

type NcpRegionZoneHandler

type NcpRegionZoneHandler struct {
	RegionInfo idrv.RegionInfo
	VMClient   *vserver.APIClient
}

func (NcpRegionZoneHandler) GetRegionZone

func (regionZoneHandler NcpRegionZoneHandler) GetRegionZone(regionCode string) (irs.RegionZoneInfo, error)

func (*NcpRegionZoneHandler) ListOrgRegion

func (regionZoneHandler *NcpRegionZoneHandler) ListOrgRegion() (string, error)

func (*NcpRegionZoneHandler) ListOrgZone

func (regionZoneHandler *NcpRegionZoneHandler) ListOrgZone() (string, error)

func (*NcpRegionZoneHandler) ListRegionZone

func (regionZoneHandler *NcpRegionZoneHandler) ListRegionZone() ([]*irs.RegionZoneInfo, error)

type NcpVpcDiskHandler

type NcpVpcDiskHandler struct {
	RegionInfo idrv.RegionInfo
	VMClient   *vserver.APIClient
}

func (*NcpVpcDiskHandler) AttachDisk

func (diskHandler *NcpVpcDiskHandler) AttachDisk(diskIID irs.IID, vmIID irs.IID) (irs.DiskInfo, error)

func (*NcpVpcDiskHandler) ChangeDiskSize

func (diskHandler *NcpVpcDiskHandler) ChangeDiskSize(diskIID irs.IID, size string) (bool, error)

func (*NcpVpcDiskHandler) CreateDisk

func (diskHandler *NcpVpcDiskHandler) CreateDisk(diskReqInfo irs.DiskInfo) (irs.DiskInfo, error)

Caution : Incase of NCP VPC, there must be a created VM to create a new disk volume.

func (*NcpVpcDiskHandler) DeleteDisk

func (diskHandler *NcpVpcDiskHandler) DeleteDisk(diskIID irs.IID) (bool, error)

func (*NcpVpcDiskHandler) DetachDisk

func (diskHandler *NcpVpcDiskHandler) DetachDisk(diskIID irs.IID, ownerVM irs.IID) (bool, error)

func (*NcpVpcDiskHandler) GetDisk

func (diskHandler *NcpVpcDiskHandler) GetDisk(diskIID irs.IID) (irs.DiskInfo, error)

func (*NcpVpcDiskHandler) GetDiskStatus

func (diskHandler *NcpVpcDiskHandler) GetDiskStatus(diskIID irs.IID) (irs.DiskStatus, error)

func (*NcpVpcDiskHandler) ListDisk

func (diskHandler *NcpVpcDiskHandler) ListDisk() ([]*irs.DiskInfo, error)

func (*NcpVpcDiskHandler) ListIID added in v0.9.6

func (diskHandler *NcpVpcDiskHandler) ListIID() ([]*irs.IID, error)

type NcpVpcImageHandler

type NcpVpcImageHandler struct {
	CredentialInfo idrv.CredentialInfo
	RegionInfo     idrv.RegionInfo
	VMClient       *vserver.APIClient
}

func (*NcpVpcImageHandler) CheckWindowsImage

func (imageHandler *NcpVpcImageHandler) CheckWindowsImage(imageIID irs.IID) (bool, error)

func (*NcpVpcImageHandler) CreateImage

func (imageHandler *NcpVpcImageHandler) CreateImage(imageReqInfo irs.ImageReqInfo) (irs.ImageInfo, error)

func (*NcpVpcImageHandler) DeleteImage

func (imageHandler *NcpVpcImageHandler) DeleteImage(imageIID irs.IID) (bool, error)

func (*NcpVpcImageHandler) GetImage

func (imageHandler *NcpVpcImageHandler) GetImage(imageIID irs.IID) (irs.ImageInfo, error)

func (*NcpVpcImageHandler) ListImage

func (imageHandler *NcpVpcImageHandler) ListImage() ([]*irs.ImageInfo, error)

type NcpVpcKeyPairHandler

type NcpVpcKeyPairHandler struct {
	CredentialInfo idrv.CredentialInfo
	RegionInfo     idrv.RegionInfo
	VMClient       *vserver.APIClient
}

func (*NcpVpcKeyPairHandler) CreateKey

func (keyPairHandler *NcpVpcKeyPairHandler) CreateKey(keyPairReqInfo irs.KeyPairReqInfo) (irs.KeyPairInfo, error)

func (*NcpVpcKeyPairHandler) DeleteKey

func (keyPairHandler *NcpVpcKeyPairHandler) DeleteKey(keyIID irs.IID) (bool, error)

func (*NcpVpcKeyPairHandler) GetKey

func (keyPairHandler *NcpVpcKeyPairHandler) GetKey(keyIID irs.IID) (irs.KeyPairInfo, error)

func (*NcpVpcKeyPairHandler) ListIID added in v0.9.6

func (keyPairHandler *NcpVpcKeyPairHandler) ListIID() ([]*irs.IID, error)

func (*NcpVpcKeyPairHandler) ListKey

func (keyPairHandler *NcpVpcKeyPairHandler) ListKey() ([]*irs.KeyPairInfo, error)

type NcpVpcMyImageHandler

type NcpVpcMyImageHandler struct {
	RegionInfo idrv.RegionInfo
	VMClient   *vserver.APIClient
}

func (*NcpVpcMyImageHandler) CheckWindowsImage

func (myImageHandler *NcpVpcMyImageHandler) CheckWindowsImage(myImageIID irs.IID) (bool, error)

func (*NcpVpcMyImageHandler) DeleteMyImage

func (myImageHandler *NcpVpcMyImageHandler) DeleteMyImage(myImageIID irs.IID) (bool, error)

func (*NcpVpcMyImageHandler) GetImageStatus

func (myImageHandler *NcpVpcMyImageHandler) GetImageStatus(myImageIID irs.IID) (irs.MyImageStatus, error)

func (*NcpVpcMyImageHandler) GetMyImage

func (myImageHandler *NcpVpcMyImageHandler) GetMyImage(myImageIID irs.IID) (irs.MyImageInfo, error)

func (*NcpVpcMyImageHandler) ListIID added in v0.9.6

func (myImageHandler *NcpVpcMyImageHandler) ListIID() ([]*irs.IID, error)

func (*NcpVpcMyImageHandler) ListMyImage

func (myImageHandler *NcpVpcMyImageHandler) ListMyImage() ([]*irs.MyImageInfo, error)

To Manage My Images

func (*NcpVpcMyImageHandler) SnapshotVM

func (myImageHandler *NcpVpcMyImageHandler) SnapshotVM(snapshotReqInfo irs.MyImageInfo) (irs.MyImageInfo, error)

To Take a Snapshot with VM ID (To Create My Image)

type NcpVpcNLBHandler

type NcpVpcNLBHandler struct {
	CredentialInfo idrv.CredentialInfo
	RegionInfo     idrv.RegionInfo
	VMClient       *vserver.APIClient
	VPCClient      *vpc.APIClient
	VLBClient      *vlb.APIClient
}

func (*NcpVpcNLBHandler) AddVMs

func (nlbHandler *NcpVpcNLBHandler) AddVMs(nlbIID irs.IID, vmIIDs *[]irs.IID) (irs.VMGroupInfo, error)

func (*NcpVpcNLBHandler) ChangeHealthCheckerInfo

func (nlbHandler *NcpVpcNLBHandler) ChangeHealthCheckerInfo(nlbIID irs.IID, healthChecker irs.HealthCheckerInfo) (irs.HealthCheckerInfo, error)

func (*NcpVpcNLBHandler) ChangeListener

func (nlbHandler *NcpVpcNLBHandler) ChangeListener(nlbIID irs.IID, listener irs.ListenerInfo) (irs.ListenerInfo, error)

Note!! : Will be decided later if we would support bellow methoeds or not. ------ Frontend Control

func (*NcpVpcNLBHandler) ChangeVMGroupInfo

func (nlbHandler *NcpVpcNLBHandler) ChangeVMGroupInfo(nlbIID irs.IID, vmGroup irs.VMGroupInfo) (irs.VMGroupInfo, error)

------ Backend Control

func (*NcpVpcNLBHandler) CleanUpNLB

func (nlbHandler *NcpVpcNLBHandler) CleanUpNLB(vpcId *string) (bool, error)

Clean up the VMGroup and LB Type subnet

func (*NcpVpcNLBHandler) CreateListener

func (nlbHandler *NcpVpcNLBHandler) CreateListener(nlbId string, nlbReqInfo irs.NLBInfo, vmGroupNo string) (*vlb.LoadBalancerListener, error)

func (*NcpVpcNLBHandler) CreateNLB

func (nlbHandler *NcpVpcNLBHandler) CreateNLB(nlbReqInfo irs.NLBInfo) (createNLB irs.NLBInfo, newErr error)

Note : Cloud-Barista supports only this case => [ LB : Listener : VMGroup : Health Checker = 1 : 1 : 1 : 1 ] ------ NLB Management

func (*NcpVpcNLBHandler) CreateVMGroup

func (nlbHandler *NcpVpcNLBHandler) CreateVMGroup(vpcId string, nlbReqInfo irs.NLBInfo) (*vlb.TargetGroup, error)

func (*NcpVpcNLBHandler) DeleteNLB

func (nlbHandler *NcpVpcNLBHandler) DeleteNLB(nlbIID irs.IID) (bool, error)

func (*NcpVpcNLBHandler) DeleteVMGroup

func (nlbHandler *NcpVpcNLBHandler) DeleteVMGroup(vmGroupId string) (bool, error)

func (*NcpVpcNLBHandler) GetHealthCheckerInfo

func (nlbHandler *NcpVpcNLBHandler) GetHealthCheckerInfo(nlb vlb.LoadBalancerInstance) (irs.HealthCheckerInfo, error)

func (*NcpVpcNLBHandler) GetListenerInfo

func (nlbHandler *NcpVpcNLBHandler) GetListenerInfo(listenerId string, loadBalancerId string) (*irs.ListenerInfo, error)

func (*NcpVpcNLBHandler) GetNLB

func (nlbHandler *NcpVpcNLBHandler) GetNLB(nlbIID irs.IID) (irs.NLBInfo, error)

func (*NcpVpcNLBHandler) GetVMGroupHealthInfo

func (nlbHandler *NcpVpcNLBHandler) GetVMGroupHealthInfo(nlbIID irs.IID) (irs.HealthInfo, error)

func (*NcpVpcNLBHandler) GetVMGroupInfo

func (nlbHandler *NcpVpcNLBHandler) GetVMGroupInfo(nlb vlb.LoadBalancerInstance) (irs.VMGroupInfo, error)

func (*NcpVpcNLBHandler) ListIID added in v0.9.6

func (nlbHandler *NcpVpcNLBHandler) ListIID() ([]*irs.IID, error)

func (*NcpVpcNLBHandler) ListNLB

func (nlbHandler *NcpVpcNLBHandler) ListNLB() ([]*irs.NLBInfo, error)

func (*NcpVpcNLBHandler) RemoveVMs

func (nlbHandler *NcpVpcNLBHandler) RemoveVMs(nlbIID irs.IID, vmIIDs *[]irs.IID) (bool, error)

type NcpVpcPriceInfoHandler added in v0.8.2

type NcpVpcPriceInfoHandler struct {
	CredentialInfo idrv.CredentialInfo
	RegionInfo     idrv.RegionInfo
	VMClient       *vserver.APIClient
}

func (*NcpVpcPriceInfoHandler) GetPriceInfo added in v0.8.2

func (priceInfoHandler *NcpVpcPriceInfoHandler) GetPriceInfo(productFamily string, regionName string, filterList []irs.KeyValue) (string, error)

func (*NcpVpcPriceInfoHandler) ListProductFamily added in v0.8.2

func (priceInfoHandler *NcpVpcPriceInfoHandler) ListProductFamily(regionName string) ([]string, error)

Get Product 'Name' of all Products instead of Product 'Code'

type NcpVpcSecurityHandler

type NcpVpcSecurityHandler struct {
	CredentialInfo idrv.CredentialInfo
	RegionInfo     idrv.RegionInfo
	VMClient       *vserver.APIClient
}

func (*NcpVpcSecurityHandler) AddRules

func (securityHandler *NcpVpcSecurityHandler) AddRules(sgIID irs.IID, securityRules *[]irs.SecurityRuleInfo) (irs.SecurityInfo, error)

func (*NcpVpcSecurityHandler) CreateSecurity

func (securityHandler *NcpVpcSecurityHandler) CreateSecurity(securityReqInfo irs.SecurityReqInfo) (irs.SecurityInfo, error)

func (*NcpVpcSecurityHandler) DeleteSecurity

func (securityHandler *NcpVpcSecurityHandler) DeleteSecurity(securityIID irs.IID) (bool, error)

func (*NcpVpcSecurityHandler) ExtractSecurityRuleInfo

func (securityHandler *NcpVpcSecurityHandler) ExtractSecurityRuleInfo(ncpVpcSGId string) ([]irs.SecurityRuleInfo, error)

Search NCP VPC SecurityGroup Rule List

func (*NcpVpcSecurityHandler) GetSecurity

func (securityHandler *NcpVpcSecurityHandler) GetSecurity(securityIID irs.IID) (irs.SecurityInfo, error)

func (*NcpVpcSecurityHandler) ListIID added in v0.9.6

func (securityHandler *NcpVpcSecurityHandler) ListIID() ([]*irs.IID, error)

func (*NcpVpcSecurityHandler) ListSecurity

func (securityHandler *NcpVpcSecurityHandler) ListSecurity() ([]*irs.SecurityInfo, error)

func (*NcpVpcSecurityHandler) MappingSecurityInfo

func (securityHandler *NcpVpcSecurityHandler) MappingSecurityInfo(ncpVpcSG vserver.AccessControlGroup) (irs.SecurityInfo, error)

func (*NcpVpcSecurityHandler) OpenOutboundAllProtocol

func (securityHandler *NcpVpcSecurityHandler) OpenOutboundAllProtocol(sgIID irs.IID) error

func (*NcpVpcSecurityHandler) RemoveRules

func (securityHandler *NcpVpcSecurityHandler) RemoveRules(sgIID irs.IID, securityRules *[]irs.SecurityRuleInfo) (bool, error)

type NcpVpcVMHandler

type NcpVpcVMHandler struct {
	CredentialInfo idrv.CredentialInfo
	RegionInfo     idrv.RegionInfo
	VMClient       *vserver.APIClient
}

func (*NcpVpcVMHandler) DeletePublicIP

func (vmHandler *NcpVpcVMHandler) DeletePublicIP(vmInfo irs.VMInfo) (irs.VMStatus, error)

Whenever a VM is terminated, Delete the public IP that the VM has

func (*NcpVpcVMHandler) GetRootPassword

func (vmHandler *NcpVpcVMHandler) GetRootPassword(vmId *string, privateKey *string) (*string, error)

func (*NcpVpcVMHandler) GetVM

func (vmHandler *NcpVpcVMHandler) GetVM(vmIID irs.IID) (irs.VMInfo, error)

func (*NcpVpcVMHandler) GetVMStatus

func (vmHandler *NcpVpcVMHandler) GetVMStatus(vmIID irs.IID) (irs.VMStatus, error)

func (*NcpVpcVMHandler) ListIID added in v0.9.6

func (vmHandler *NcpVpcVMHandler) ListIID() ([]*irs.IID, error)

func (*NcpVpcVMHandler) ListVM

func (vmHandler *NcpVpcVMHandler) ListVM() ([]*irs.VMInfo, error)

func (*NcpVpcVMHandler) ListVMStatus

func (vmHandler *NcpVpcVMHandler) ListVMStatus() ([]*irs.VMStatusInfo, error)

func (*NcpVpcVMHandler) RebootVM

func (vmHandler *NcpVpcVMHandler) RebootVM(vmIID irs.IID) (irs.VMStatus, error)

func (*NcpVpcVMHandler) ResumeVM

func (vmHandler *NcpVpcVMHandler) ResumeVM(vmIID irs.IID) (irs.VMStatus, error)

func (*NcpVpcVMHandler) StartVM

func (vmHandler *NcpVpcVMHandler) StartVM(vmReqInfo irs.VMReqInfo) (irs.VMInfo, error)

func (*NcpVpcVMHandler) SuspendVM

func (vmHandler *NcpVpcVMHandler) SuspendVM(vmIID irs.IID) (irs.VMStatus, error)

func (*NcpVpcVMHandler) TerminateVM

func (vmHandler *NcpVpcVMHandler) TerminateVM(vmIID irs.IID) (irs.VMStatus, error)

func (*NcpVpcVMHandler) WaitToDelPublicIp

func (vmHandler *NcpVpcVMHandler) WaitToDelPublicIp(vmIID irs.IID) (irs.VMStatus, error)

Waiting for up to 600 seconds until Public IP can be Deleted.

func (*NcpVpcVMHandler) WaitToGetInfo

func (vmHandler *NcpVpcVMHandler) WaitToGetInfo(vmIID irs.IID) (irs.VMStatus, error)

Waiting for up to 500 seconds until VM info. can be Get

type NcpVpcVMSpecHandler

type NcpVpcVMSpecHandler struct {
	CredentialInfo idrv.CredentialInfo
	RegionInfo     idrv.RegionInfo
	VMClient       *vserver.APIClient
}

func (*NcpVpcVMSpecHandler) GetOrgVMSpec

func (vmSpecHandler *NcpVpcVMSpecHandler) GetOrgVMSpec(specName string) (string, error)

func (*NcpVpcVMSpecHandler) GetVMSpec

func (vmSpecHandler *NcpVpcVMSpecHandler) GetVMSpec(specName string) (irs.VMSpecInfo, error)

func (*NcpVpcVMSpecHandler) ListOrgVMSpec

func (vmSpecHandler *NcpVpcVMSpecHandler) ListOrgVMSpec() (string, error)

func (*NcpVpcVMSpecHandler) ListVMSpec

func (vmSpecHandler *NcpVpcVMSpecHandler) ListVMSpec() ([]*irs.VMSpecInfo, error)

type NcpVpcVPCHandler

type NcpVpcVPCHandler struct {
	CredentialInfo idrv.CredentialInfo
	RegionInfo     idrv.RegionInfo
	VPCClient      *vpc.APIClient
}

func (*NcpVpcVPCHandler) AddSubnet

func (vpcHandler *NcpVpcVPCHandler) AddSubnet(vpcIID irs.IID, subnetReqInfo irs.SubnetInfo) (irs.VPCInfo, error)

Only When any Subnet exists already(because of NetworkACLNo)

func (*NcpVpcVPCHandler) CreateSubnet

func (vpcHandler *NcpVpcVPCHandler) CreateSubnet(vpcIID irs.IID, netAclNo *string, subnetUsageType *string, subnetReqInfo irs.SubnetInfo) (*vpc.Subnet, error)

func (*NcpVpcVPCHandler) CreateVPC

func (vpcHandler *NcpVpcVPCHandler) CreateVPC(vpcReqInfo irs.VPCReqInfo) (irs.VPCInfo, error)

func (*NcpVpcVPCHandler) DeleteVPC

func (vpcHandler *NcpVpcVPCHandler) DeleteVPC(vpcIID irs.IID) (bool, error)

func (*NcpVpcVPCHandler) GetSubnet

func (vpcHandler *NcpVpcVPCHandler) GetSubnet(sunbnetIID irs.IID) (irs.SubnetInfo, error)

func (*NcpVpcVPCHandler) GetVPC

func (vpcHandler *NcpVpcVPCHandler) GetVPC(vpcIID irs.IID) (irs.VPCInfo, error)

func (*NcpVpcVPCHandler) ListIID added in v0.9.6

func (vpcHandler *NcpVpcVPCHandler) ListIID() ([]*irs.IID, error)

func (*NcpVpcVPCHandler) ListSubnet

func (vpcHandler *NcpVpcVPCHandler) ListSubnet(vpcNo *string) ([]*irs.SubnetInfo, error)

func (*NcpVpcVPCHandler) ListVPC

func (vpcHandler *NcpVpcVPCHandler) ListVPC() ([]*irs.VPCInfo, error)

func (*NcpVpcVPCHandler) RemoveSubnet

func (vpcHandler *NcpVpcVPCHandler) RemoveSubnet(vpcIID irs.IID, subnetIID irs.IID) (bool, error)

type Price added in v0.8.2

type Price struct {
	PriceNo                string  `json:"priceNo"` // Not int
	PriceType              Code    `json:"priceType"`
	Region                 Region  `json:"region"`
	ChargingUnitType       Code    `json:"chargingUnitType"`
	RatingUnitType         Code    `json:"ratingUnitType"`
	ChargingUnitBasicValue string  `json:"chargingUnitBasicValue"` // Not int
	Unit                   Code    `json:"unit"`
	PriceValue             float32 `json:"price"` // Not float64
	ConditionType          Code    `json:"conditionType"`
	ConditionPrice         float32 `json:"conditionPrice"` // Not float64
	PriceDescription       string  `json:"priceDescription"`
	MeteringUnit           Code    `json:"meteringUnit"`
	StartDate              string  `json:"startDate"`
	PayCurrency            Code    `json:"payCurrency"`
}

type PriceListAPIResponse added in v0.8.2

type PriceListAPIResponse struct {
	GetProductPriceListResponse struct {
		RequestID        string         `json:"request_id"`
		ReturnCode       int            `json:"return_code"`
		ReturnMessage    string         `returnMessage`
		TotalRows        int            `json:"totalRows"`
		ProductPriceList []ProductPrice `json:"productPriceList"`
	} `json:"getProductPriceListResponse"`

	Error *ErrorResponse `json:"error,omitempty"`
}

type Product added in v0.8.2

type Product struct {
	ItemKind       ProductItemKind       `json:"productItemKind"`
	ItemKindDetail ProductItemKindDetail `json:"productItemKindDetail"`
	ProductCode    string                `json:"productCode"`
	ProductName    string                `json:"productName"`
	Description    string                `json:"productDescription"`
	// contains filtered or unexported fields
}

type ProductItemKind added in v0.8.2

type ProductItemKind struct {
	Code     string `json:"code"`
	CodeName string `json:"code_name"`
}

=========================== For ProductList ============================

type ProductItemKindDetail added in v0.8.2

type ProductItemKindDetail struct {
	Code     string `json:"code"`
	CodeName string `json:"code_name"`
}

type ProductListAPIResponse added in v0.8.2

type ProductListAPIResponse struct {
	GetProductListResponse struct {
		RequestID     string    `json:"request_id"`
		ReturnCode    int       `json:"return_code"`
		ReturnMessage string    `returnMessage`
		TotalRows     int       `json:"totalRows"`
		ProductList   []Product `json:"productList"`
	} `json:"getProductListResponse"`

	Error *ErrorResponse `json:"error,omitempty"`
}

type ProductPrice added in v0.8.2

type ProductPrice struct {
	ProductItemKind       Code   `json:"productItemKind"`
	ProductItemKindDetail Code   `json:"productItemKindDetail"`
	ProductCode           string `json:"productCode"`
	ProductName           string `json:"productName"`
	ProductDescription    string `json:"productDescription"`
	ProductType           Code   `json:"productType"`
	GpuCount              int    `json:"gpuCount"`
	CpuCount              int    `json:"cpuCount"`
	MemorySize            int64  `json:"memorySize"`
	BaseBlockStorageSize  int64  `json:"baseBlockStorageSize"`
	DiskType              Code   `json:"diskType"`
	DiskDetailType        Code   `json:"diskDetailType"`
	GenerationCode        string `json:"generationCode"`

	PriceList []Price `json:"priceList"`
	// contains filtered or unexported fields
}

type Region added in v0.8.2

type Region struct {
	RegionNo   int    `json:"regionNo"` // Not string
	RegionCode string `json:"regionCode"`
	RegionName string `json:"regionName"`
}

Directories

Path Synopsis
info_manager

Jump to

Keyboard shortcuts

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