model

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountInfo

type AccountInfo struct {
	ContainerCount int   `json:"container_count" yaml:"container_count"`
	ObjectCount    int   `json:"object_count" yaml:"object_count"`
	BytesUsed      int64 `json:"bytes_used" yaml:"bytes_used"`
}

type Address

type Address struct {
	Addr    string `json:"addr" yaml:"addr"`
	Version int    `json:"version" yaml:"version"`
	Type    string `json:"OS-EXT-IPS:type" yaml:"type"`
}

type Backup

type Backup struct {
	ID        string   `json:"id" yaml:"id"`
	Name      string   `json:"name" yaml:"name"`
	Status    string   `json:"status" yaml:"status"`
	VolumeID  string   `json:"volume_id" yaml:"volume_id"`
	Size      int      `json:"size" yaml:"size"`
	CreatedAt FlexTime `json:"created_at" yaml:"created_at"`
}

type BackupsResponse

type BackupsResponse struct {
	Backups []Backup `json:"backups"`
}

type BlockDeviceMapping

type BlockDeviceMapping struct {
	UUID                string `json:"uuid,omitempty"`
	SourceType          string `json:"source_type"`
	DestinationType     string `json:"destination_type"`
	VolumeSize          int    `json:"volume_size,omitempty"`
	BootIndex           int    `json:"boot_index"`
	DeleteOnTermination bool   `json:"delete_on_termination"`
}

type ConsoleResponse

type ConsoleResponse struct {
	Console struct {
		Type string `json:"type"`
		URL  string `json:"url"`
	} `json:"console"`
}

type Container

type Container struct {
	Name  string `json:"name" yaml:"name"`
	Count int    `json:"count" yaml:"count"`
	Bytes int64  `json:"bytes" yaml:"bytes"`
}

type Credential

type Credential struct {
	ID     string `json:"id" yaml:"id"`
	Type   string `json:"type" yaml:"type"`
	UserID string `json:"user_id" yaml:"user_id"`
	Blob   string `json:"blob" yaml:"blob"`
}

type CredentialsResponse

type CredentialsResponse struct {
	Credentials []Credential `json:"credentials"`
}

type Domain

type Domain struct {
	ID          string `json:"id" yaml:"id"`
	Name        string `json:"name" yaml:"name"`
	Email       string `json:"email" yaml:"email"`
	TTL         int    `json:"ttl" yaml:"ttl"`
	Serial      int    `json:"serial" yaml:"serial"`
	Status      string `json:"status" yaml:"status"`
	Description string `json:"description" yaml:"description"`
}

type DomainsResponse

type DomainsResponse struct {
	Domains []Domain `json:"domains"`
}

type FixedIP

type FixedIP struct {
	SubnetID  string `json:"subnet_id" yaml:"subnet_id"`
	IPAddress string `json:"ip_address" yaml:"ip_address"`
}

type Flavor

type Flavor struct {
	ID    string `json:"id" yaml:"id"`
	Name  string `json:"name" yaml:"name"`
	RAM   int    `json:"ram" yaml:"ram"`
	VCPUs int    `json:"vcpus" yaml:"vcpus"`
	Disk  int    `json:"disk" yaml:"disk"`
}

type FlavorDetail

type FlavorDetail struct {
	Flavor Flavor `json:"flavor"`
}

type FlavorRef added in v0.1.2

type FlavorRef struct {
	ID string `json:"id"`
}

type FlavorsResponse

type FlavorsResponse struct {
	Flavors []Flavor `json:"flavors"`
}

type FlexTime added in v0.1.2

type FlexTime struct{ time.Time }

FlexTime is a time.Time wrapper that handles multiple timestamp formats. ConoHa APIs return timestamps in varying formats (with/without timezone).

func (FlexTime) MarshalJSON added in v0.1.2

func (t FlexTime) MarshalJSON() ([]byte, error)

func (*FlexTime) UnmarshalJSON added in v0.1.2

func (t *FlexTime) UnmarshalJSON(b []byte) error

type HealthMonitor

type HealthMonitor struct {
	ID                 string  `json:"id" yaml:"id"`
	Name               string  `json:"name" yaml:"name"`
	Type               string  `json:"type" yaml:"type"`
	Delay              int     `json:"delay" yaml:"delay"`
	Timeout            int     `json:"timeout" yaml:"timeout"`
	MaxRetries         int     `json:"max_retries" yaml:"max_retries"`
	URLPath            string  `json:"url_path" yaml:"url_path"`
	ExpectedCodes      string  `json:"expected_codes" yaml:"expected_codes"`
	AdminStateUp       bool    `json:"admin_state_up" yaml:"admin_state_up"`
	Pools              []IDRef `json:"pools" yaml:"pools"`
	ProvisioningStatus string  `json:"provisioning_status" yaml:"provisioning_status"`
	OperatingStatus    string  `json:"operating_status" yaml:"operating_status"`
	ProjectID          string  `json:"project_id" yaml:"project_id"`
	TenantID           string  `json:"tenant_id" yaml:"tenant_id"`
}

type HealthMonitorsResponse

type HealthMonitorsResponse struct {
	HealthMonitors []HealthMonitor `json:"healthmonitors"`
}

type IDRef added in v0.3.3

type IDRef struct {
	ID string `json:"id" yaml:"id"`
}

IDRef represents an association reference with just an ID (used in loadbalancers, listeners, pools arrays).

type Image

type Image struct {
	ID              string    `json:"id" yaml:"id"`
	Name            string    `json:"name" yaml:"name"`
	Status          string    `json:"status" yaml:"status"`
	DiskFormat      string    `json:"disk_format" yaml:"disk_format"`
	ContainerFormat string    `json:"container_format" yaml:"container_format"`
	MinDisk         int       `json:"min_disk" yaml:"min_disk"`
	MinRAM          int       `json:"min_ram" yaml:"min_ram"`
	Size            int64     `json:"size" yaml:"size"`
	Checksum        string    `json:"checksum" yaml:"checksum"`
	Visibility      string    `json:"visibility" yaml:"visibility"`
	Owner           string    `json:"owner" yaml:"owner"`
	CreatedAt       time.Time `json:"created_at" yaml:"created_at"`
}

type ImageCreateRequest added in v0.3.3

type ImageCreateRequest struct {
	Name            string `json:"name"`
	DiskFormat      string `json:"disk_format"`
	ContainerFormat string `json:"container_format,omitempty"`
}

type ImageQuota

type ImageQuota struct {
	ImageCount    int `json:"image_count" yaml:"image_count"`
	ImageMaxCount int `json:"image_max_count" yaml:"image_max_count"`
}

type ImagesResponse

type ImagesResponse struct {
	Images []Image `json:"images"`
}

type Keypair

type Keypair struct {
	Name        string `json:"name" yaml:"name"`
	PublicKey   string `json:"public_key" yaml:"public_key"`
	Fingerprint string `json:"fingerprint" yaml:"fingerprint"`
	PrivateKey  string `json:"private_key,omitempty" yaml:"private_key,omitempty"`
}

type KeypairCreateRequest

type KeypairCreateRequest struct {
	Keypair struct {
		Name      string `json:"name"`
		PublicKey string `json:"public_key,omitempty"`
	} `json:"keypair"`
}

type KeypairWrapper

type KeypairWrapper struct {
	Keypair Keypair `json:"keypair"`
}

type KeypairsResponse

type KeypairsResponse struct {
	Keypairs []KeypairWrapper `json:"keypairs"`
}

type Listener

type Listener struct {
	ID                 string  `json:"id" yaml:"id"`
	Name               string  `json:"name" yaml:"name"`
	Description        string  `json:"description" yaml:"description"`
	ProvisioningStatus string  `json:"provisioning_status" yaml:"provisioning_status"`
	OperatingStatus    string  `json:"operating_status" yaml:"operating_status"`
	AdminStateUp       bool    `json:"admin_state_up" yaml:"admin_state_up"`
	Protocol           string  `json:"protocol" yaml:"protocol"`
	ProtocolPort       int     `json:"protocol_port" yaml:"protocol_port"`
	ConnectionLimit    int     `json:"connection_limit" yaml:"connection_limit"`
	DefaultPoolID      string  `json:"default_pool_id" yaml:"default_pool_id"`
	Loadbalancers      []IDRef `json:"loadbalancers" yaml:"loadbalancers"`
	ProjectID          string  `json:"project_id" yaml:"project_id"`
	TenantID           string  `json:"tenant_id" yaml:"tenant_id"`
}

type ListenersResponse

type ListenersResponse struct {
	Listeners []Listener `json:"listeners"`
}

type LoadBalancer

type LoadBalancer struct {
	ID                 string `json:"id" yaml:"id"`
	Name               string `json:"name" yaml:"name"`
	Description        string `json:"description" yaml:"description"`
	ProvisioningStatus string `json:"provisioning_status" yaml:"provisioning_status"`
	OperatingStatus    string `json:"operating_status" yaml:"operating_status"`
	VipAddress         string `json:"vip_address" yaml:"vip_address"`
}

type LoadBalancersResponse

type LoadBalancersResponse struct {
	LoadBalancers []LoadBalancer `json:"loadbalancers"`
}

type Member

type Member struct {
	ID                 string `json:"id" yaml:"id"`
	Name               string `json:"name" yaml:"name"`
	Address            string `json:"address" yaml:"address"`
	ProtocolPort       int    `json:"protocol_port" yaml:"protocol_port"`
	Weight             int    `json:"weight" yaml:"weight"`
	OperatingStatus    string `json:"operating_status" yaml:"operating_status"`
	ProvisioningStatus string `json:"provisioning_status" yaml:"provisioning_status"`
	AdminStateUp       bool   `json:"admin_state_up" yaml:"admin_state_up"`
	ProjectID          string `json:"project_id" yaml:"project_id"`
	TenantID           string `json:"tenant_id" yaml:"tenant_id"`
}

type MembersResponse

type MembersResponse struct {
	Members []Member `json:"members"`
}

type Network

type Network struct {
	ID      string   `json:"id" yaml:"id"`
	Name    string   `json:"name" yaml:"name"`
	Status  string   `json:"status" yaml:"status"`
	Subnets []string `json:"subnets" yaml:"subnets"`
}

type NetworksResponse

type NetworksResponse struct {
	Networks []Network `json:"networks"`
}

type Permission

type Permission struct {
	ID   string `json:"id" yaml:"id"`
	Name string `json:"name" yaml:"name"`
}

type PermissionsResponse

type PermissionsResponse struct {
	Permissions []Permission `json:"permissions"`
}

type Pool

type Pool struct {
	ID                 string   `json:"id" yaml:"id"`
	Name               string   `json:"name" yaml:"name"`
	Description        string   `json:"description" yaml:"description"`
	ProvisioningStatus string   `json:"provisioning_status" yaml:"provisioning_status"`
	OperatingStatus    string   `json:"operating_status" yaml:"operating_status"`
	AdminStateUp       bool     `json:"admin_state_up" yaml:"admin_state_up"`
	Protocol           string   `json:"protocol" yaml:"protocol"`
	LBMethod           string   `json:"lb_algorithm" yaml:"lb_algorithm"`
	Loadbalancers      []IDRef  `json:"loadbalancers" yaml:"loadbalancers"`
	Listeners          []IDRef  `json:"listeners" yaml:"listeners"`
	Members            []string `json:"members" yaml:"members"`
	ProjectID          string   `json:"project_id" yaml:"project_id"`
	TenantID           string   `json:"tenant_id" yaml:"tenant_id"`
}

type PoolsResponse

type PoolsResponse struct {
	Pools []Pool `json:"pools"`
}

type Port

type Port struct {
	ID             string    `json:"id" yaml:"id"`
	Name           string    `json:"name" yaml:"name"`
	NetworkID      string    `json:"network_id" yaml:"network_id"`
	DeviceID       string    `json:"device_id" yaml:"device_id"`
	Status         string    `json:"status" yaml:"status"`
	MACAddress     string    `json:"mac_address" yaml:"mac_address"`
	FixedIPs       []FixedIP `json:"fixed_ips" yaml:"fixed_ips"`
	SecurityGroups []string  `json:"security_groups" yaml:"security_groups"`
}

type PortsResponse

type PortsResponse struct {
	Ports []Port `json:"ports"`
}

type QoSPoliciesResponse

type QoSPoliciesResponse struct {
	Policies []QoSPolicy `json:"policies"`
}

type QoSPolicy

type QoSPolicy struct {
	ID   string `json:"id" yaml:"id"`
	Name string `json:"name" yaml:"name"`
}

type Record

type Record struct {
	ID       string `json:"id" yaml:"id"`
	Name     string `json:"name" yaml:"name"`
	Type     string `json:"type" yaml:"type"`
	Data     string `json:"data" yaml:"data"`
	TTL      int    `json:"ttl" yaml:"ttl"`
	Priority *int   `json:"priority" yaml:"priority"`
}

type RecordsResponse

type RecordsResponse struct {
	Records []Record `json:"records"`
}

type RemoteConsoleResponse added in v0.1.2

type RemoteConsoleResponse struct {
	RemoteConsole struct {
		Protocol string `json:"protocol"`
		Type     string `json:"type"`
		URL      string `json:"url"`
	} `json:"remote_console"`
}

type Role

type Role struct {
	ID   string `json:"id" yaml:"id"`
	Name string `json:"name" yaml:"name"`
}

type RolesResponse

type RolesResponse struct {
	Roles []Role `json:"roles"`
}

type SecurityGroup

type SecurityGroup struct {
	ID          string              `json:"id" yaml:"id"`
	Name        string              `json:"name" yaml:"name"`
	Description string              `json:"description" yaml:"description"`
	Rules       []SecurityGroupRule `json:"security_group_rules" yaml:"rules"`
}

type SecurityGroupRef

type SecurityGroupRef struct {
	Name string `json:"name"`
}

type SecurityGroupRule

type SecurityGroupRule struct {
	ID             string `json:"id" yaml:"id"`
	Direction      string `json:"direction" yaml:"direction"`
	Protocol       string `json:"protocol" yaml:"protocol"`
	PortRangeMin   *int   `json:"port_range_min" yaml:"port_range_min"`
	PortRangeMax   *int   `json:"port_range_max" yaml:"port_range_max"`
	RemoteIPPrefix string `json:"remote_ip_prefix" yaml:"remote_ip_prefix"`
	EtherType      string `json:"ethertype" yaml:"ethertype"`
}

type SecurityGroupRulesResponse

type SecurityGroupRulesResponse struct {
	SecurityGroupRules []SecurityGroupRule `json:"security_group_rules"`
}

type SecurityGroupsResponse

type SecurityGroupsResponse struct {
	SecurityGroups []SecurityGroup `json:"security_groups"`
}

type Server

type Server struct {
	ID        string               `json:"id" yaml:"id"`
	Name      string               `json:"name" yaml:"name"`
	Status    string               `json:"status" yaml:"status"`
	Flavor    FlavorRef            `json:"flavor" yaml:"flavor"`
	ImageID   string               `json:"image_id" yaml:"image_id"`
	TenantID  string               `json:"tenant_id" yaml:"tenant_id"`
	KeyName   string               `json:"key_name" yaml:"key_name"`
	Created   FlexTime             `json:"created" yaml:"created"`
	Updated   FlexTime             `json:"updated" yaml:"updated"`
	Addresses map[string][]Address `json:"addresses" yaml:"addresses"`
	Metadata  map[string]string    `json:"metadata" yaml:"metadata"`
}

type ServerAction

type ServerAction struct {
	Action string `json:"action,omitempty"`
}

type ServerCreateRequest

type ServerCreateRequest struct {
	Server struct {
		Name               string               `json:"name"`
		FlavorRef          string               `json:"flavorRef"`
		ImageRef           string               `json:"imageRef,omitempty"`
		KeyName            string               `json:"key_name,omitempty"`
		SecurityGroups     []SecurityGroupRef   `json:"security_groups,omitempty"`
		BlockDeviceMapping []BlockDeviceMapping `json:"block_device_mapping_v2,omitempty"`
		AdminPass          string               `json:"adminPass,omitempty"`
		UserData           string               `json:"user_data,omitempty"`
		Metadata           map[string]string    `json:"metadata,omitempty"`
	} `json:"server"`
}

type ServerDetail

type ServerDetail struct {
	Server Server `json:"server"`
}

type ServersResponse

type ServersResponse struct {
	Servers []Server `json:"servers"`
}

type StorageObject

type StorageObject struct {
	Name         string `json:"name" yaml:"name"`
	ContentType  string `json:"content_type" yaml:"content_type"`
	Bytes        int64  `json:"bytes" yaml:"bytes"`
	LastModified string `json:"last_modified" yaml:"last_modified"`
	Hash         string `json:"hash" yaml:"hash"`
}

type SubUser

type SubUser struct {
	ID       string `json:"id" yaml:"id"`
	Name     string `json:"name" yaml:"name"`
	Enabled  bool   `json:"enabled" yaml:"enabled"`
	DomainID string `json:"domain_id" yaml:"domain_id"`
}

type SubUsersResponse

type SubUsersResponse struct {
	Users []SubUser `json:"users"`
}

type Subnet

type Subnet struct {
	ID        string `json:"id" yaml:"id"`
	Name      string `json:"name" yaml:"name"`
	NetworkID string `json:"network_id" yaml:"network_id"`
	CIDR      string `json:"cidr" yaml:"cidr"`
	IPVersion int    `json:"ip_version" yaml:"ip_version"`
	GatewayIP string `json:"gateway_ip" yaml:"gateway_ip"`
}

type SubnetsResponse

type SubnetsResponse struct {
	Subnets []Subnet `json:"subnets"`
}

type Volume

type Volume struct {
	ID          string   `json:"id" yaml:"id"`
	Name        string   `json:"name" yaml:"name"`
	Status      string   `json:"status" yaml:"status"`
	Size        int      `json:"size" yaml:"size"`
	VolumeType  string   `json:"volume_type" yaml:"volume_type"`
	Description string   `json:"description" yaml:"description"`
	CreatedAt   FlexTime `json:"created_at" yaml:"created_at"`
	Bootable    string   `json:"bootable" yaml:"bootable"`
}

type VolumeAttachment added in v0.1.4

type VolumeAttachment struct {
	ID       string `json:"id" yaml:"id"`
	VolumeID string `json:"volumeId" yaml:"volume_id"`
	Device   string `json:"device" yaml:"device"`
	ServerID string `json:"serverId" yaml:"server_id"`
}

type VolumeAttachmentsResponse added in v0.3.3

type VolumeAttachmentsResponse struct {
	VolumeAttachments []VolumeAttachment `json:"volumeAttachments"`
}

type VolumeCreateRequest

type VolumeCreateRequest struct {
	Volume struct {
		Size        int    `json:"size"`
		Name        string `json:"name,omitempty"`
		Description string `json:"description,omitempty"`
		VolumeType  string `json:"volume_type,omitempty"`
		SnapshotID  string `json:"snapshot_id,omitempty"`
		ImageRef    string `json:"imageRef,omitempty"`
	} `json:"volume"`
}

type VolumeDetail

type VolumeDetail struct {
	Volume Volume `json:"volume"`
}

type VolumeType

type VolumeType struct {
	ID   string `json:"id" yaml:"id"`
	Name string `json:"name" yaml:"name"`
}

type VolumeTypesResponse

type VolumeTypesResponse struct {
	VolumeTypes []VolumeType `json:"volume_types"`
}

type VolumesResponse

type VolumesResponse struct {
	Volumes []Volume `json:"volumes"`
}

Jump to

Keyboard shortcuts

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