Documentation ¶
Index ¶
- Constants
- type IMetaDataRequest
- type MetaData
- func (m *MetaData) DNSNameServers() ([]string, error)
- func (m *MetaData) EIPv4() (string, error)
- func (m *MetaData) HostName() (string, error)
- func (m *MetaData) ImageID() (string, error)
- func (m *MetaData) InstanceID() (string, error)
- func (m *MetaData) Mac() (string, error)
- func (m *MetaData) NTPConfigServers() ([]string, error)
- func (m *MetaData) NetworkType() (string, error)
- func (m *MetaData) New() *MetaDataRequest
- func (m *MetaData) OwnerAccountID() (string, error)
- func (m *MetaData) PrivateIPv4() (string, error)
- func (m *MetaData) RamRoleToken(role string) (RoleAuth, error)
- func (m *MetaData) Region() (string, error)
- func (m *MetaData) RoleName() (string, error)
- func (m *MetaData) SerialNumber() (string, error)
- func (m *MetaData) SourceAddress() (string, error)
- func (m *MetaData) VpcCIDRBlock() (string, error)
- func (m *MetaData) VpcID() (string, error)
- func (m *MetaData) VswitchCIDRBlock() (string, error)
- func (m *MetaData) VswitchID() (string, error)
- func (m *MetaData) Zone() (string, error)
- type MetaDataRequest
- func (vpc *MetaDataRequest) Decode(data string, api interface{}) error
- func (vpc *MetaDataRequest) Do(api interface{}) (err error)
- func (vpc *MetaDataRequest) Resource(resource string) IMetaDataRequest
- func (vpc *MetaDataRequest) ResourceType(rtype string) IMetaDataRequest
- func (vpc *MetaDataRequest) SubResource(sub string) IMetaDataRequest
- func (vpc *MetaDataRequest) Url() (string, error)
- func (vpc *MetaDataRequest) Version(version string) IMetaDataRequest
- type ResultList
- type RoleAuth
- type TimeoutError
Constants ¶
View Source
const ( ENDPOINT = "http://100.100.100.200" META_VERSION_LATEST = "latest" RS_TYPE_META_DATA = "meta-data" RS_TYPE_USER_DATA = "user-data" DNS_NAMESERVERS = "dns-conf/nameservers" EIPV4 = "eipv4" HOSTNAME = "hostname" IMAGE_ID = "image-id" INSTANCE_ID = "instance-id" MAC = "mac" NETWORK_TYPE = "network-type" NTP_CONF_SERVERS = "ntp-conf/ntp-servers" OWNER_ACCOUNT_ID = "owner-account-id" PRIVATE_IPV4 = "private-ipv4" REGION = "region-id" SERIAL_NUMBER = "serial-number" SOURCE_ADDRESS = "source-address" VPC_CIDR_BLOCK = "vpc-cidr-block" VPC_ID = "vpc-id" VSWITCH_CIDR_BLOCK = "vswitch-cidr-block" VSWITCH_ID = "vswitch-id" ZONE = "zone-id" RAM_SECURITY = "Ram/security-credentials" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IMetaDataRequest ¶
type IMetaDataRequest interface { Version(version string) IMetaDataRequest ResourceType(rtype string) IMetaDataRequest Resource(resource string) IMetaDataRequest SubResource(sub string) IMetaDataRequest Url() (string, error) Do(api interface{}) error }
type MetaData ¶
type MetaData struct {
// contains filtered or unexported fields
}
func NewMetaData ¶
func NewMockMetaData ¶
func (*MetaData) DNSNameServers ¶
func (*MetaData) InstanceID ¶
func (*MetaData) NTPConfigServers ¶
func (*MetaData) NetworkType ¶
func (*MetaData) New ¶
func (m *MetaData) New() *MetaDataRequest
func (*MetaData) OwnerAccountID ¶
func (*MetaData) PrivateIPv4 ¶
func (*MetaData) SerialNumber ¶
func (*MetaData) SourceAddress ¶
func (*MetaData) VpcCIDRBlock ¶
func (*MetaData) VswitchCIDRBlock ¶
type MetaDataRequest ¶
type MetaDataRequest struct {
// contains filtered or unexported fields
}
func (*MetaDataRequest) Decode ¶
func (vpc *MetaDataRequest) Decode(data string, api interface{}) error
func (*MetaDataRequest) Do ¶
func (vpc *MetaDataRequest) Do(api interface{}) (err error)
func (*MetaDataRequest) Resource ¶
func (vpc *MetaDataRequest) Resource(resource string) IMetaDataRequest
func (*MetaDataRequest) ResourceType ¶
func (vpc *MetaDataRequest) ResourceType(rtype string) IMetaDataRequest
func (*MetaDataRequest) SubResource ¶
func (vpc *MetaDataRequest) SubResource(sub string) IMetaDataRequest
func (*MetaDataRequest) Url ¶
func (vpc *MetaDataRequest) Url() (string, error)
func (*MetaDataRequest) Version ¶
func (vpc *MetaDataRequest) Version(version string) IMetaDataRequest
type ResultList ¶
type ResultList struct {
// contains filtered or unexported fields
}
type TimeoutError ¶
Click to show internal directories.
Click to hide internal directories.