Documentation
¶
Index ¶
- Constants
- Variables
- func GetIPAddressFromRef(ref string) string
- type Bool
- type CapacityReport
- type Connector
- func (c *Connector) CreateObject(obj IBObject) (ref string, err error)
- func (c *Connector) DeleteObject(ref string) (refRes string, err error)
- func (c *Connector) GetObject(obj IBObject, ref string, res interface{}) (err error)
- func (c *Connector) Logout() (err error)
- func (c *Connector) UpdateObject(obj IBObject, ref string) (refRes string, err error)
- type EA
- type EADefListValue
- type EADefinition
- type EASearch
- type FixedAddress
- type Grid
- type HostConfig
- type HostRecord
- type HostRecordIpv4Addr
- type HttpRequestBuilder
- type HttpRequestor
- type IBBase
- type IBConnector
- type IBObject
- type IBObjectManager
- type Ipv6Setting
- type LanHaPortSetting
- type License
- type Lock
- type Member
- type MultiRequest
- type NTPSetting
- type NTPserver
- type Network
- type NetworkContainer
- type NetworkSetting
- type NetworkView
- type NetworkViewLock
- type NodeInfo
- type ObjectManager
- func (objMgr *ObjectManager) AllocateIP(netview string, cidr string, ipAddr string, macAddress string, name string, ...) (*FixedAddress, error)
- func (objMgr *ObjectManager) AllocateNetwork(netview string, cidr string, prefixLen uint, name string) (network *Network, err error)
- func (objMgr *ObjectManager) CreateDefaultNetviews(globalNetview string, localNetview string) (globalNetviewRef string, localNetviewRef string, err error)
- func (objMgr *ObjectManager) CreateEADefinition(eadef EADefinition) (*EADefinition, error)
- func (objMgr *ObjectManager) CreateHostRecordWithoutDNS(recordName string, netview string, cidr string, ipAddr string, ...) (*HostRecord, error)
- func (objMgr *ObjectManager) CreateMultiObject(req *MultiRequest) ([]map[string]interface{}, error)
- func (objMgr *ObjectManager) CreateNetwork(netview string, cidr string, name string) (*Network, error)
- func (objMgr *ObjectManager) CreateNetworkContainer(netview string, cidr string) (*NetworkContainer, error)
- func (objMgr *ObjectManager) CreateNetworkView(name string) (*NetworkView, error)
- func (objMgr *ObjectManager) DeleteHostRecord(ref string) (string, error)
- func (objMgr *ObjectManager) DeleteNetwork(ref string, netview string) (string, error)
- func (objMgr *ObjectManager) GetAllMembers() ([]Member, error)
- func (objMgr *ObjectManager) GetCapacityReport(name string) ([]CapacityReport, error)
- func (objMgr *ObjectManager) GetEADefinition(name string) (*EADefinition, error)
- func (objMgr *ObjectManager) GetFixedAddress(netview string, cidr string, ipAddr string, macAddr string) (*FixedAddress, error)
- func (objMgr *ObjectManager) GetGridInfo() ([]Grid, error)
- func (objMgr *ObjectManager) GetGridLicense() ([]License, error)
- func (objMgr *ObjectManager) GetHostRecord(ref string) (*HostRecord, error)
- func (objMgr *ObjectManager) GetHostRecordWithoutDNS(recordName string, netview string, cidr string, ipAddr string) (*HostRecord, error)
- func (objMgr *ObjectManager) GetIpAddressFromHostRecord(host HostRecord) (string, error)
- func (objMgr *ObjectManager) GetLicense() ([]License, error)
- func (objMgr *ObjectManager) GetNetwork(netview string, cidr string, ea EA) (*Network, error)
- func (objMgr *ObjectManager) GetNetworkContainer(netview string, cidr string) (*NetworkContainer, error)
- func (objMgr *ObjectManager) GetNetworkView(name string) (*NetworkView, error)
- func (objMgr *ObjectManager) GetNetworkwithref(ref string) (*Network, error)
- func (objMgr *ObjectManager) GetUpgradeStatus(statusType string) ([]UpgradeStatus, error)
- func (objMgr *ObjectManager) ReleaseIP(netview string, cidr string, ipAddr string, macAddr string) (string, error)
- func (objMgr *ObjectManager) UpdateFixedAddress(fixedAddrRef string, macAddress string, name string, vmID string) (*FixedAddress, error)
- func (objMgr *ObjectManager) UpdateHostRecordWithoutDNS(hostRref string, ipAddr string, macAddress string, vmID string) (string, error)
- func (objMgr *ObjectManager) UpdateNetworkViewEA(ref string, addEA EA, removeEA EA) error
- type PhysicalPortSetting
- type QueryParams
- type RecordA
- type RecordCNAME
- type RecordTXT
- type RequestBody
- type RequestType
- type ServiceStatus
- type SingleRequest
- type SubElementsStatus
- type TransportConfig
- type UpgradeStatus
- type UserProfile
- type WapiHttpRequestor
- type WapiRequestBuilder
- func (wrb *WapiRequestBuilder) BuildBody(t RequestType, obj IBObject) []byte
- func (wrb *WapiRequestBuilder) BuildRequest(t RequestType, obj IBObject, ref string, queryParams QueryParams) (req *http.Request, err error)
- func (wrb *WapiRequestBuilder) BuildUrl(t RequestType, objType string, ref string, returnFields []string, ...) (urlStr string)
- func (wrb *WapiRequestBuilder) Init(cfg HostConfig)
- type ZoneAuth
Constants ¶
View Source
const MACADDR_ZERO = "00:00:00:00:00:00"
Variables ¶
View Source
var ValidateConnector = validateConnector
Functions ¶
func GetIPAddressFromRef ¶
Types ¶
type CapacityReport ¶ added in v0.2.0
type CapacityReport struct {
IBBase `json:"-"`
Ref string `json:"_ref,omitempty"`
Name string `json:"name,omitempty"`
HardwareType string `json:"hardware_type,omitempty"`
MaxCapacity int `json:"max_capacity,omitempty"`
ObjectCount []map[string]interface{} `json:"object_counts,omitempty"`
PercentUsed int `json:"percent_used,omitempty"`
Role string `json:"role,omitempty"`
TotalObjects int `json:"total_objects,omitempty"`
}
CapacityReport represents capacityreport object
func NewCapcityReport ¶ added in v0.2.0
func NewCapcityReport(capReport CapacityReport) *CapacityReport
type Connector ¶
type Connector struct {
HostConfig HostConfig
TransportConfig TransportConfig
RequestBuilder HttpRequestBuilder
Requestor HttpRequestor
}
func NewConnector ¶
func NewConnector(hostConfig HostConfig, transportConfig TransportConfig, requestBuilder HttpRequestBuilder, requestor HttpRequestor) (res *Connector, err error)
func (*Connector) CreateObject ¶
func (*Connector) DeleteObject ¶
type EADefListValue ¶
type EADefListValue string
func (EADefListValue) MarshalJSON ¶
func (v EADefListValue) MarshalJSON() ([]byte, error)
func (*EADefListValue) UnmarshalJSON ¶
func (v *EADefListValue) UnmarshalJSON(b []byte) (err error)
type EADefinition ¶
type EADefinition struct {
IBBase `json:"-"`
Ref string `json:"_ref,omitempty"`
Comment string `json:"comment,omitempty"`
Flags string `json:"flags,omitempty"`
ListValues []EADefListValue `json:"list_values,omitempty"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
AllowedObjectTypes []string `json:"allowed_object_types,omitempty"`
}
func NewEADefinition ¶
func NewEADefinition(eadef EADefinition) *EADefinition
type EASearch ¶ added in v0.2.0
type EASearch map[string]interface{}
func (EASearch) MarshalJSON ¶ added in v0.2.0
type FixedAddress ¶
type FixedAddress struct {
IBBase `json:"-"`
Ref string `json:"_ref,omitempty"`
NetviewName string `json:"network_view,omitempty"`
Cidr string `json:"network,omitempty"`
IPAddress string `json:"ipv4addr,omitempty"`
Mac string `json:"mac,omitempty"`
Name string `json:"name,omitempty"`
Ea EA `json:"extattrs,omitempty"`
}
func NewFixedAddress ¶
func NewFixedAddress(fixedAddr FixedAddress) *FixedAddress
type Grid ¶ added in v0.2.0
type Grid struct {
IBBase `json:"-"`
Ref string `json:"_ref,omitempty"`
Name string `json:"name,omitempty"`
NTPSetting *NTPSetting `json:"ntp_setting,omitempty"`
}
type HostConfig ¶ added in v0.2.0
type HostRecord ¶ added in v0.6.0
type HostRecord struct {
IBBase `json:"-"`
Ref string `json:"_ref,omitempty"`
Ipv4Addr string `json:"ipv4addr,omitempty"`
Ipv4Addrs []HostRecordIpv4Addr `json:"ipv4addrs,omitempty"`
Name string `json:"name,omitempty"`
View string `json:"view,omitempty"`
Zone string `json:"zone,omitempty"`
EnableDns *bool `json:"configure_for_dns,omitempty"`
NetworkView string `json:"network_view,omitempty"`
Ea EA `json:"extattrs,omitempty"`
}
func NewHostRecord ¶ added in v0.6.0
func NewHostRecord(rh HostRecord) *HostRecord
type HostRecordIpv4Addr ¶ added in v0.6.0
type HostRecordIpv4Addr struct {
IBBase `json:"-"`
Ipv4Addr string `json:"ipv4addr,omitempty"`
Ref string `json:"_ref,omitempty"`
Mac string `json:"mac,omitempty"`
View string `json:"view,omitempty"`
Cidr string `json:"network,omitempty"`
}
func NewHostRecordIpv4Addr ¶ added in v0.6.0
func NewHostRecordIpv4Addr(hostAddr HostRecordIpv4Addr) *HostRecordIpv4Addr
type HttpRequestBuilder ¶ added in v0.2.0
type HttpRequestBuilder interface {
Init(HostConfig)
BuildUrl(r RequestType, objType string, ref string, returnFields []string, queryParams QueryParams) (urlStr string)
BuildBody(r RequestType, obj IBObject) (jsonStr []byte)
BuildRequest(r RequestType, obj IBObject, ref string, queryParams QueryParams) (req *http.Request, err error)
}
type HttpRequestor ¶ added in v0.2.0
type HttpRequestor interface {
Init(TransportConfig)
SendRequest(*http.Request) ([]byte, error)
}
type IBBase ¶
type IBBase struct {
// contains filtered or unexported fields
}
func (*IBBase) ObjectType ¶
func (*IBBase) ReturnFields ¶
type IBConnector ¶ added in v0.2.0
type IBObjectManager ¶ added in v0.2.0
type IBObjectManager interface {
CreateNetworkView(name string) (*NetworkView, error)
CreateDefaultNetviews(globalNetview string, localNetview string) (globalNetviewRef string, localNetviewRef string, err error)
CreateNetwork(netview string, cidr string, name string) (*Network, error)
CreateNetworkContainer(netview string, cidr string) (*NetworkContainer, error)
GetNetworkView(name string) (*NetworkView, error)
GetNetwork(netview string, cidr string, ea EA) (*Network, error)
GetNetworkContainer(netview string, cidr string) (*NetworkContainer, error)
AllocateIP(netview string, cidr string, ipAddr string, macAddress string, name string, vmID string) (*FixedAddress, error)
AllocateNetwork(netview string, cidr string, prefixLen uint, name string) (network *Network, err error)
UpdateFixedAddress(fixedAddrRef string, macAddress string, name string, vmID string) (*FixedAddress, error)
GetFixedAddress(netview string, cidr string, ipAddr string, macAddr string) (*FixedAddress, error)
ReleaseIP(netview string, cidr string, ipAddr string, macAddr string) (string, error)
DeleteNetwork(ref string, netview string) (string, error)
GetEADefinition(name string) (*EADefinition, error)
CreateEADefinition(eadef EADefinition) (*EADefinition, error)
UpdateNetworkViewEA(ref string, addEA EA, removeEA EA) error
}
type Ipv6Setting ¶ added in v0.2.0
type Ipv6Setting struct {
AutoRouterConfigEnabled bool `json:"auto_router_config_enabled"`
CidrPrefix uint `json:"cidr_prefix,omitempty"`
Dscp uint `json:"dscp,omitempty"`
Enabled bool `json:"enabled,omitempty"`
Gateway string `json:"gateway"`
Primary string `json:"primary,omitempty"`
VirtualIp string `json:"virtual_ip"`
VlanId uint `json:"vlan_id,emitempty"`
UseDscp bool `json:"use_dscp,omitempty"`
}
type LanHaPortSetting ¶ added in v0.2.0
type LanHaPortSetting struct {
HAIpAddress string `json:"ha_ip_address,omitempty"`
HaPortSetting PhysicalPortSetting `json:"ha_port_setting,omitempty"`
LanPortSetting PhysicalPortSetting `json:"lan_port_setting,omitempty"`
MgmtIpv6addr string `json:"mgmt_ipv6addr,omitempty"`
MgmtLan string `json:"mgmt_lan,omitempty"`
}
type License ¶ added in v0.2.0
type License struct {
IBBase `json:"-"`
Ref string `json:"_ref,omitempty"`
ExpirationStatus string `json:"expiration_status,omitempty"`
ExpiryDate int `json:"expiry_date,omitempty"`
HwID string `json:"hwid,omitempty"`
Key string `json:"key,omitempty"`
Kind string `json:"kind,omitempty"`
Limit string `json:"limit,omitempty"`
LimitContext string `json:"limit_context,omitempty"`
Licensetype string `json:"type,omitempty"`
}
License represents license wapi object
func NewGridLicense ¶ added in v0.2.0
func NewLicense ¶ added in v0.2.0
type Member ¶ added in v0.2.0
type Member struct {
IBBase `json:"-"`
Ref string `json:"_ref,omitempty"`
HostName string `json:"host_name,omitempty"`
ConfigAddrType string `json:"config_addr_type,omitempty"`
PLATFORM string `json:"platform,omitempty"`
ServiceTypeConfiguration string `json:"service_type_configuration,omitempty"`
Nodeinfo []NodeInfo `json:"node_info,omitempty"`
TimeZone string `json:"time_zone,omitempty"`
}
Member represents NIOS member
type MultiRequest ¶ added in v0.2.0
type MultiRequest struct {
IBBase `json:"-"`
Body []*RequestBody
}
func NewMultiRequest ¶ added in v0.2.0
func NewMultiRequest(body []*RequestBody) *MultiRequest
func (*MultiRequest) MarshalJSON ¶ added in v0.2.0
func (r *MultiRequest) MarshalJSON() ([]byte, error)
type NTPSetting ¶ added in v0.2.0
type NTPserver ¶ added in v0.2.0
type NTPserver struct {
Address string `json:"address,omitempty"`
Burst bool `json:"burst,omitempty"`
EnableAuthentication bool `json:"enable_authentication,omitempty"`
IBurst bool `json:"iburst,omitempty"`
NTPKeyNumber uint `json:"ntp_key_number,omitempty"`
Preffered bool `json:"preffered,omitempty"`
}
type Network ¶
type Network struct {
IBBase
Ref string `json:"_ref,omitempty"`
NetviewName string `json:"network_view,omitempty"`
Cidr string `json:"network,omitempty"`
Ea EA `json:"extattrs,omitempty"`
}
func BuildNetworkFromRef ¶
func NewNetwork ¶
type NetworkContainer ¶
type NetworkContainer struct {
IBBase `json:"-"`
Ref string `json:"_ref,omitempty"`
NetviewName string `json:"network_view,omitempty"`
Cidr string `json:"network,omitempty"`
Ea EA `json:"extattrs,omitempty"`
}
func NewNetworkContainer ¶
func NewNetworkContainer(nc NetworkContainer) *NetworkContainer
type NetworkSetting ¶ added in v0.2.0
type NetworkView ¶
type NetworkView struct {
IBBase `json:"-"`
Ref string `json:"_ref,omitempty"`
Name string `json:"name,omitempty"`
Ea EA `json:"extattrs,omitempty"`
}
func BuildNetworkViewFromRef ¶
func BuildNetworkViewFromRef(ref string) *NetworkView
func NewNetworkView ¶
func NewNetworkView(nv NetworkView) *NetworkView
type NetworkViewLock ¶ added in v0.2.0
type NetworkViewLock struct {
Name string
ObjMgr *ObjectManager
LockEA string
LockTimeoutEA string
}
func (*NetworkViewLock) Lock ¶ added in v0.2.0
func (l *NetworkViewLock) Lock() error
func (*NetworkViewLock) UnLock ¶ added in v0.2.0
func (l *NetworkViewLock) UnLock(force bool) error
type NodeInfo ¶ added in v0.2.0
type NodeInfo struct {
HaStatus string `json:"ha_status,omitempty"`
HwId string `json:"hwid,omitempty"`
HwModel string `json:"hwmodel,omitempty"`
HwPlatform string `json:"hwplatform,omitempty"`
HwType string `json:"hwtype,omitempty"`
Lan2PhysicalSetting PhysicalPortSetting `json:"lan2_physical_setting,omitempty"`
LanHaPortSetting LanHaPortSetting `json:"lan_ha_Port_Setting,omitempty"`
MgmtNetworkSetting NetworkSetting `json:"mgmt_network_setting,omitempty"`
MgmtPhysicalSetting PhysicalPortSetting `json:"mgmt_physical_setting,omitempty"`
PaidNios bool `json:"paid_nios,omitempty"`
PhysicalOid string `json:"physical_oid,omitempty"`
ServiceStatus []ServiceStatus `json:"service_status,omitempty"`
V6MgmtNetworkSetting Ipv6Setting `json:"v6_mgmt_network_setting,omitempty"`
}
type ObjectManager ¶
type ObjectManager struct {
// contains filtered or unexported fields
}
func NewObjectManager ¶
func NewObjectManager(connector IBConnector, cmpType string, tenantID string) *ObjectManager
func (*ObjectManager) AllocateIP ¶
func (objMgr *ObjectManager) AllocateIP(netview string, cidr string, ipAddr string, macAddress string, name string, vmID string) (*FixedAddress, error)
func (*ObjectManager) AllocateNetwork ¶
func (*ObjectManager) CreateDefaultNetviews ¶
func (*ObjectManager) CreateEADefinition ¶
func (objMgr *ObjectManager) CreateEADefinition(eadef EADefinition) (*EADefinition, error)
func (*ObjectManager) CreateHostRecordWithoutDNS ¶ added in v0.6.0
func (objMgr *ObjectManager) CreateHostRecordWithoutDNS(recordName string, netview string, cidr string, ipAddr string, macAddress string, vmID string) (*HostRecord, error)
func (*ObjectManager) CreateMultiObject ¶ added in v0.2.0
func (objMgr *ObjectManager) CreateMultiObject(req *MultiRequest) ([]map[string]interface{}, error)
CreateMultiObject unmarshals the result into slice of maps
func (*ObjectManager) CreateNetwork ¶
func (*ObjectManager) CreateNetworkContainer ¶
func (objMgr *ObjectManager) CreateNetworkContainer(netview string, cidr string) (*NetworkContainer, error)
func (*ObjectManager) CreateNetworkView ¶
func (objMgr *ObjectManager) CreateNetworkView(name string) (*NetworkView, error)
func (*ObjectManager) DeleteHostRecord ¶ added in v0.6.0
func (objMgr *ObjectManager) DeleteHostRecord(ref string) (string, error)
func (*ObjectManager) DeleteNetwork ¶
func (objMgr *ObjectManager) DeleteNetwork(ref string, netview string) (string, error)
func (*ObjectManager) GetAllMembers ¶ added in v0.2.0
func (objMgr *ObjectManager) GetAllMembers() ([]Member, error)
GetAllMembers returns all members information
func (*ObjectManager) GetCapacityReport ¶ added in v0.2.0
func (objMgr *ObjectManager) GetCapacityReport(name string) ([]CapacityReport, error)
GetCapacityReport returns all capacity for members
func (*ObjectManager) GetEADefinition ¶
func (objMgr *ObjectManager) GetEADefinition(name string) (*EADefinition, error)
func (*ObjectManager) GetFixedAddress ¶
func (objMgr *ObjectManager) GetFixedAddress(netview string, cidr string, ipAddr string, macAddr string) (*FixedAddress, error)
func (*ObjectManager) GetGridInfo ¶ added in v0.2.0
func (objMgr *ObjectManager) GetGridInfo() ([]Grid, error)
GetGridInfo returns the details for grid
func (*ObjectManager) GetGridLicense ¶ added in v0.2.0
func (objMgr *ObjectManager) GetGridLicense() ([]License, error)
GetLicense returns the license details for grid
func (*ObjectManager) GetHostRecord ¶ added in v0.6.0
func (objMgr *ObjectManager) GetHostRecord(ref string) (*HostRecord, error)
func (*ObjectManager) GetHostRecordWithoutDNS ¶ added in v0.6.0
func (objMgr *ObjectManager) GetHostRecordWithoutDNS(recordName string, netview string, cidr string, ipAddr string) (*HostRecord, error)
func (*ObjectManager) GetIpAddressFromHostRecord ¶ added in v0.6.0
func (objMgr *ObjectManager) GetIpAddressFromHostRecord(host HostRecord) (string, error)
func (*ObjectManager) GetLicense ¶ added in v0.2.0
func (objMgr *ObjectManager) GetLicense() ([]License, error)
GetLicense returns the license details for member
func (*ObjectManager) GetNetwork ¶
func (*ObjectManager) GetNetworkContainer ¶
func (objMgr *ObjectManager) GetNetworkContainer(netview string, cidr string) (*NetworkContainer, error)
func (*ObjectManager) GetNetworkView ¶
func (objMgr *ObjectManager) GetNetworkView(name string) (*NetworkView, error)
func (*ObjectManager) GetNetworkwithref ¶ added in v0.6.0
func (objMgr *ObjectManager) GetNetworkwithref(ref string) (*Network, error)
func (*ObjectManager) GetUpgradeStatus ¶ added in v0.2.0
func (objMgr *ObjectManager) GetUpgradeStatus(statusType string) ([]UpgradeStatus, error)
GetUpgradeStatus returns the grid upgrade information
func (*ObjectManager) UpdateFixedAddress ¶ added in v0.2.0
func (objMgr *ObjectManager) UpdateFixedAddress(fixedAddrRef string, macAddress string, name string, vmID string) (*FixedAddress, error)
func (*ObjectManager) UpdateHostRecordWithoutDNS ¶ added in v0.6.0
func (*ObjectManager) UpdateNetworkViewEA ¶ added in v0.2.0
func (objMgr *ObjectManager) UpdateNetworkViewEA(ref string, addEA EA, removeEA EA) error
type PhysicalPortSetting ¶ added in v0.2.0
type QueryParams ¶ added in v0.8.0
type QueryParams struct {
// contains filtered or unexported fields
}
This is a general struct to add query params used in makeRequest
type RecordA ¶ added in v0.2.0
type RecordA struct {
IBBase `json:"-"`
Ref string `json:"_ref,omitempty"`
Ipv4Addr string `json:"ipv4addr,omitempty"`
Name string `json:"name,omitempty"`
View string `json:"view,omitempty"`
Zone string `json:"zone,omitempty"`
Ea EA `json:"extattrs,omitempty"`
}
func NewRecordA ¶ added in v0.2.0
type RecordCNAME ¶ added in v0.2.0
type RecordCNAME struct {
IBBase `json:"-"`
Ref string `json:"_ref,omitempty"`
Canonical string `json:"canonical,omitempty"`
Name string `json:"name,omitempty"`
View string `json:"view,omitempty"`
Zone string `json:"zone,omitempty"`
Ea EA `json:"extattrs,omitempty"`
}
func NewRecordCNAME ¶ added in v0.2.0
func NewRecordCNAME(rc RecordCNAME) *RecordCNAME
type RecordTXT ¶ added in v0.2.0
type RecordTXT struct {
IBBase `json:"-"`
Ref string `json:"_ref,omitempty"`
Name string `json:"name,omitempty"`
Text string `json:"text,omitempty"`
View string `json:"view,omitempty"`
Zone string `json:"zone,omitempty"`
Ea EA `json:"extattrs,omitempty"`
}
func NewRecordTXT ¶ added in v0.2.0
type RequestBody ¶ added in v0.2.0
type RequestBody struct {
Data map[string]interface{} `json:"data,omitempty"`
Args map[string]string `json:"args,omitempty"`
Method string `json:"method"`
Object string `json:"object,omitempty"`
EnableSubstitution bool `json:"enable_substitution,omitempty"`
AssignState map[string]string `json:"assign_state,omitempty"`
Discard bool `json:"discard,omitempty"`
}
type ServiceStatus ¶ added in v0.2.0
type SingleRequest ¶ added in v0.2.0
type SingleRequest struct {
IBBase `json:"-"`
Body *RequestBody
}
func NewRequest ¶ added in v0.2.0
func NewRequest(body *RequestBody) *SingleRequest
type SubElementsStatus ¶ added in v0.2.0
type SubElementsStatus struct {
Ref string `json:"_ref,omitempty"`
CurrentVersion string `json:"current_version"`
ElementStatus string `json:"element_status"`
Ipv4Address string `json:"ipv4_address"`
Ipv6Address string `json:"ipv6_address"`
StatusValue string `json:"status_value"`
StepsTotal int `json:"steps_total"`
StepsCompleted int `json:"steps_completed"`
NodeType string `json:"type"`
Member string `json:"member"`
}
SubElementsStatus object representation
type TransportConfig ¶ added in v0.2.0
type TransportConfig struct {
SslVerify bool
HttpRequestTimeout time.Duration // in seconds
HttpPoolConnections int
// contains filtered or unexported fields
}
func NewTransportConfig ¶ added in v0.2.0
func NewTransportConfig(sslVerify string, httpRequestTimeout int, httpPoolConnections int) (cfg TransportConfig)
type UpgradeStatus ¶ added in v0.2.0
type UpgradeStatus struct {
IBBase `json:"-"`
Ref string `json:"_ref,omitempty"`
Type string `json:"type"`
SubElementStatus []SubElementsStatus `json:"subelements_status,omitempty"`
UpgradeGroup string `json:"upgrade_group,omitempty"`
}
UpgradeStatus object representation
func NewUpgradeStatus ¶ added in v0.2.0
func NewUpgradeStatus(upgradeStatus UpgradeStatus) *UpgradeStatus
type UserProfile ¶ added in v0.2.0
type UserProfile struct {
IBBase `json:"-"`
Ref string `json:"_ref,omitempty"`
Name string `json:"name,omitempty"`
}
func NewUserProfile ¶ added in v0.2.0
func NewUserProfile(userprofile UserProfile) *UserProfile
type WapiHttpRequestor ¶ added in v0.2.0
type WapiHttpRequestor struct {
// contains filtered or unexported fields
}
func (*WapiHttpRequestor) Init ¶ added in v0.2.0
func (whr *WapiHttpRequestor) Init(cfg TransportConfig)
func (*WapiHttpRequestor) SendRequest ¶ added in v0.2.0
func (whr *WapiHttpRequestor) SendRequest(req *http.Request) (res []byte, err error)
type WapiRequestBuilder ¶ added in v0.2.0
type WapiRequestBuilder struct {
HostConfig HostConfig
}
func (*WapiRequestBuilder) BuildBody ¶ added in v0.2.0
func (wrb *WapiRequestBuilder) BuildBody(t RequestType, obj IBObject) []byte
func (*WapiRequestBuilder) BuildRequest ¶ added in v0.2.0
func (wrb *WapiRequestBuilder) BuildRequest(t RequestType, obj IBObject, ref string, queryParams QueryParams) (req *http.Request, err error)
func (*WapiRequestBuilder) BuildUrl ¶ added in v0.2.0
func (wrb *WapiRequestBuilder) BuildUrl(t RequestType, objType string, ref string, returnFields []string, queryParams QueryParams) (urlStr string)
func (*WapiRequestBuilder) Init ¶ added in v0.2.0
func (wrb *WapiRequestBuilder) Init(cfg HostConfig)
Click to show internal directories.
Click to hide internal directories.