icdv4

package
v0.0.0-...-a3be206 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: Apache-2.0 Imports: 10 Imported by: 41

Documentation

Index

Constants

View Source
const ErrCodeAPICreation = "APICreationError"

ErrCodeAPICreation ...

Variables

This section is empty.

Functions

This section is empty.

Types

type ASGBody

type ASGBody struct {
	Scalers ScalersBody `json:"scalers,omitempty"`
	Rate    RateBody    `json:"rate,omitempty"`
}

ASGBody ...

type ASGGet

type ASGGet struct {
	Scalers ScalersBody `json:"scalers,omitempty"`
	Rate    Rate        `json:"rate,omitempty"`
}

ASGGet ...

type AutoScaling

type AutoScaling interface {
	GetAutoScaling(icdID string, groupID string) (AutoscalingGetGroup, error)
	SetAutoScaling(icdID string, groupID string, AutoScaleReq AutoscalingSetGroup) (Task, error)
}

AutoScaling ...

type AutoscalingGet

type AutoscalingGet struct {
	Memory ASGGet `json:"memory,omitempty"`
	CPU    ASGGet `json:"cpu,omitempty"`
	Disk   ASGGet `json:"disk,omitempty"`
}

AutoscalingGet ...

type AutoscalingGetGroup

type AutoscalingGetGroup struct {
	Autoscaling AutoscalingGet `json:"autoscaling,omitempty"`
}

AutoscalingGetGroup ...

type AutoscalingGroup

type AutoscalingGroup struct {
	Memory *ASGBody `json:"memory,omitempty"`
	CPU    *ASGBody `json:"cpu,omitempty"`
	Disk   *ASGBody `json:"disk,omitempty"`
}

AutoscalingGroup ...

type AutoscalingSetGroup

type AutoscalingSetGroup struct {
	Autoscaling AutoscalingGroup `json:"autoscaling,omitempty"`
}

AutoscalingSetGroup ...

type CapacityBody

type CapacityBody struct {
	Enabled                   bool `json:"enabled"`
	FreeSpaceRemainingPercent int  `json:"free_space_remaining_percent,omitempty"`
	FreeSpaceLessThanPercent  int  `json:"free_space_less_than_percent,omitempty"`
}

CapacityBody ...

type CassandraUri

type CassandraUri struct {
	Hosts []struct {
		HostName string `json:"hostname"`
		Port     int    `json:"port"`
	} `json:"hosts"`
	Authentication struct {
		Method   string `json:"method"`
		UserName string `json:"username"`
		Password string `json:"password"`
	}
	Bundle struct {
		Name         string `json:"name"`
		BundleBase64 string `json:"bundle_base64"`
	} `json:"bundle"`
}

type Cdb

type Cdb struct {
	Id              string          `json:"id"`
	Name            string          `json:"name"`
	Type            string          `json:"type"`
	PlatformOptions PlatformOptions `json:"platform_options"`
	Version         string          `json:"version"`
	AdminUser       string          `json:"admin_username"`
}

type CdbResult

type CdbResult struct {
	Cdb Cdb `json:"deployment"`
}

type Cdbs

type Cdbs interface {
	GetCdb(icdId string) (Cdb, error)
}

type CliConn

type CliConn struct {
	Type        string      `json:"type"`
	Composed    []string    `json:"composed"`
	Environment interface{} `json:"environment"`
	Bin         string      `json:"bin"`
	Arguments   [][]string  `json:"arguments"`
	Certificate struct {
		Name              string `json:"name"`
		CertificateBase64 string `json:"certificate_base64"`
	} `json:"certificate"`
}

type ConfigurationReq

type ConfigurationReq struct {
	Configuration interface{} `json:"configuration"`
}

type Configurations

type Configurations interface {
	UpdateConfiguration(icdId string, configurationReq ConfigurationReq) (Task, error)
	GetConfiguration(icdId string) (interface{}, error)
}

type Connection

type Connection struct {
	Rediss   Uri          `json:"rediss"`
	Grpc     Uri          `json:"grpc"`
	Postgres Uri          `json:"postgres"`
	Https    Uri          `json:"https"`
	Amqps    Uri          `json:"amqps"`
	Cli      CliConn      `json:"cli"`
	Mongo    Uri          `json:"mongodb"`
	Secure   CassandraUri `json:"secure"`
	Mysql    Uri          `json:"mysql"`
}

type ConnectionReq

type ConnectionReq struct {
	Password        string `json:"password,omitempty"`
	CertificateRoot string `json:"certificate_root,omitempty"`
}

type ConnectionRes

type ConnectionRes struct {
	Connection Connection `json:"connection"`
}

type Connections

type Connections interface {
	GetConnection(icdId string, userId string, endpoint ...string) (Connection, error)
	GetConnectionSubstitution(icdId string, userID string, connectionReq ConnectionReq) (Connection, error)
}

type Cpu

type Cpu struct {
	Units           string `json:"units"`
	AllocationCount int    `json:"allocation_count"`
	MinimumCount    int    `json:"minimum_count"`
	MaximumCount    int    `json:"maximum_count"`
	StepSizeCount   int    `json:"step_size_count"`
	IsAdjustable    bool   `json:"is_adjustable"`
	IsOptional      bool   `json:"is_optional"`
	CanScaleDown    bool   `json:"can_scale_down"`
}

type CpuReq

type CpuReq struct {
	AllocationCount int `json:"allocation_count"`
}

type Disk

type Disk struct {
	Units        string `json:"units"`
	AllocationMb int    `json:"allocation_mb"`
	MinimumMb    int    `json:"minimum_mb"`
	MaximumMb    int    `json:"maximum_mb"`
	StepSizeMb   int    `json:"step_size_mb"`
	IsAdjustable bool   `json:"is_adjustable"`
	IsOptional   bool   `json:"is_optional"`
	CanScaleDown bool   `json:"can_scale_down"`
}

type DiskReq

type DiskReq struct {
	AllocationMb int `json:"allocation_mb,omitempty"`
}

type Group

type Group struct {
	Id      string  `json:"id"`
	Count   int     `json:"count"`
	Members Members `json:"members"`
	Memory  Memory  `json:"memory"`
	Cpu     Cpu     `json:"cpu"`
	Disk    Disk    `json:"disk"`
}

type GroupBdy

type GroupBdy struct {
	Members *MembersReq `json:"members,omitempty"`
	Memory  *MemoryReq  `json:"memory,omitempty"`
	Cpu     *CpuReq     `json:"cpu,omitempty"`
	Disk    *DiskReq    `json:"disk,omitempty"`
}

type GroupList

type GroupList struct {
	Groups []Group `json:"groups"`
}

type GroupReq

type GroupReq struct {
	GroupBdy GroupBdy `json:"group"`
}

type Groups

type Groups interface {
	GetDefaultGroups(groupType string) (GroupList, error)
	GetGroups(icdId string) (GroupList, error)
	UpdateGroup(icdId string, groupId string, groupReq GroupReq) (Task, error)
}

type ICDServiceAPI

type ICDServiceAPI interface {
	Cdbs() Cdbs
	Users() Users
	Whitelists() Whitelists
	Groups() Groups
	Tasks() Tasks
	Connections() Connections
	AutoScaling() AutoScaling
	Configurations() Configurations
}

ICDServiceAPI is the Cloud Internet Services API ...

func New

func New(sess *session.Session) (ICDServiceAPI, error)

New ...

type IOBody

type IOBody struct {
	Enabled      bool   `json:"enabled"`
	AbovePercent int    `json:"above_percent,omitempty"`
	OverPeriod   string `json:"over_period,omitempty"`
}

IOBody ...

type Members

type Members struct {
	Units           string `json:"units"`
	AllocationCount int    `json:"allocation_count"`
	MinimumCount    int    `json:"minimum_count"`
	MaximumCount    int    `json:"maximum_count"`
	StepSizeCount   int    `json:"step_size_count"`
	IsAdjustable    bool   `json:"is_adjustable"`
	IsOptional      bool   `json:"is_optional"`
	CanScaleDown    bool   `json:"can_scale_down"`
}

type MembersReq

type MembersReq struct {
	AllocationCount int `json:"allocation_count,omitempty"`
}

type Memory

type Memory struct {
	Units        string `json:"units"`
	AllocationMb int    `json:"allocation_mb"`
	MinimumMb    int    `json:"minimum_mb"`
	MaximumMb    int    `json:"maximum_mb"`
	StepSizeMb   int    `json:"step_size_mb"`
	IsAdjustable bool   `json:"is_adjustable"`
	IsOptional   bool   `json:"is_optional"`
	CanScaleDown bool   `json:"can_scale_down"`
}

type MemoryReq

type MemoryReq struct {
	AllocationMb int `json:"allocation_mb,omitempty"`
}

type PlatformOptions

type PlatformOptions struct {
	KeyProtectKey          string `json:"key_protect_key_id"`
	DiskENcryptionKeyCrn   string `json:"disk_encryption_key_crn"`
	BackUpEncryptionKeyCrn string `json:"backup_encryption_key_crn"`
}

type Rate

type Rate struct {
	IncreasePercent     json.Number `json:"increase_percent,omitempty"`
	PeriodSeconds       int         `json:"period_seconds,omitempty"`
	LimitCountPerMember int         `json:"limit_count_per_member,omitempty"`
	LimitMBPerMember    json.Number `json:"limit_mb_per_member,omitempty"`
	Units               string      `json:"units,omitempty"`
}

Rate ...

type RateBody

type RateBody struct {
	IncreasePercent     int    `json:"increase_percent,omitempty"`
	PeriodSeconds       int    `json:"period_seconds,omitempty"`
	LimitCountPerMember int    `json:"limit_count_per_member,omitempty"`
	LimitMBPerMember    int    `json:"limit_mb_per_member,omitempty"`
	Units               string `json:"units,omitempty"`
}

RateBody ...

type ScalersBody

type ScalersBody struct {
	Capacity *CapacityBody `json:"capacity,omitempty"`
	IO       *IOBody       `json:"io_utilization,omitempty"`
}

ScalersBody ...

type Task

type Task struct {
	Id              string `json:"id"`
	Description     string `json:"description"`
	Status          string `json:"status"`
	DeploymentId    string `json:"deployment_id"`
	ProgressPercent int    `json:"progress_percent"`
	CreatedAt       string `json:"created_at"`
}

type TaskResult

type TaskResult struct {
	Task Task `json:"task"`
}

type Tasks

type Tasks interface {
	GetTask(taskId string) (Task, error)
}

type Uri

type Uri struct {
	Type     string   `json:"type"`
	Composed []string `json:"composed"`
	Scheme   string   `json:"scheme"`
	Hosts    []struct {
		HostName string `json:"hostname"`
		Port     int    `json:"port"`
	} `json:"hosts"`
	Path           string      `json:"path"`
	QueryOptions   interface{} `json:"query_options"`
	Authentication struct {
		Method   string `json:"method"`
		UserName string `json:"username"`
		Password string `json:"password"`
	}
	Certificate struct {
		Name              string `json:"name"`
		CertificateBase64 string `json:"certificate_base64"`
	} `json:"certificate"`
	Database interface{} `json:"database"`
}

type User

type User struct {
	UserName string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

type UserReq

type UserReq struct {
	User User `json:"user"`
}

type Users

type Users interface {
	CreateUser(icdId string, userReq UserReq) (Task, error)
	UpdateUser(icdId string, userName string, userReq UserReq) (Task, error)
	DeleteUser(icdId string, userName string) (Task, error)
}

type Whitelist

type Whitelist struct {
	WhitelistEntrys []WhitelistEntry `json:"ip_addresses"`
}

type WhitelistEntry

type WhitelistEntry struct {
	Address     string `json:"address,omitempty"`
	Description string `json:"description,omitempty"`
}

type WhitelistReq

type WhitelistReq struct {
	WhitelistEntry WhitelistEntry `json:"ip_address"`
}

type Whitelists

type Whitelists interface {
	CreateWhitelist(icdId string, whitelistReq WhitelistReq) (Task, error)
	GetWhitelist(icdId string) (Whitelist, error)
	DeleteWhitelist(icdId string, ipAddress string) (Task, error)
}

Jump to

Keyboard shortcuts

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