Documentation
¶
Index ¶
- Constants
- type ArrayInfo
- type Auth
- type DNSInfo
- type HardwareInfo
- type NTPServerInfo
- type NetworkInfo
- type PhoneHomeInfo
- type SNMPInfo
- type StorageClient
- func (c *StorageClient) FetchArrayInfo() (ArrayInfo, error)
- func (c *StorageClient) FetchDNSInfo() (DNSInfo, error)
- func (c *StorageClient) FetchHardwareInfo() ([]HardwareInfo, error)
- func (c *StorageClient) FetchNTPInfo() (NTPServerInfo, error)
- func (c *StorageClient) FetchNetworkInfo() ([]NetworkInfo, error)
- func (c *StorageClient) FetchPhoneHomeInfo() (PhoneHomeInfo, error)
- func (c *StorageClient) FetchSNMPInfo() ([]SNMPInfo, error)
- func (c *StorageClient) QueryData(call string, link string, data []byte) ([]byte, http.Header, int, error)
Constants ¶
View Source
const ( StatusInternalServerError = "Server Error" StatusBadRequest = "Bad Request" StatusConflict = "Conflict Already Exists" StatusNotFound = "Not Found" StatusForbidden = "Forbidden" )
Declaring the Constant Values
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayInfo ¶
type ArrayInfo struct { Revision string `json:"revision"` Version string `json:"version"` ArrayName string `json:"array_name"` ID string `json:"id"` }
ArrayInfo
type HardwareInfo ¶
type HardwareInfo struct { Details interface{} `json:"details"` Identify string `json:"identify"` Index int64 `json:"index"` Name string `json:"name"` Slot int64 `json:"slot"` Speed int64 `json:"speed"` Status string `json:"status"` Temperature int64 `json:"temperature"` }
Hardware
type NTPServerInfo ¶
type NTPServerInfo struct {
Ntpserver []string `json:"ntpserver"`
}
NTPServerInfo
type NetworkInfo ¶
type NetworkInfo struct { Address string `json:"address"` Enabled bool `json:"enabled"` Gateway string `json:"gateway"` Hwaddr string `json:"hwaddr"` Mtu int64 `json:"mtu"` Name string `json:"name"` Netmask string `json:"netmask"` Services []string `json:"services"` Slaves []string `json:"slaves"` Speed int64 `json:"speed"` Subnet string `json:"subnet"` }
Network
type PhoneHomeInfo ¶
type PhoneHomeInfo struct {
Phonehome string `json:"phonehome"`
}
PhoneHomeInfo
type SNMPInfo ¶
type SNMPInfo struct { AuthPassphrase interface{} `json:"auth_passphrase"` AuthProtocol interface{} `json:"auth_protocol"` Community interface{} `json:"community"` Host string `json:"host"` Name string `json:"name"` PrivacyPassphrase interface{} `json:"privacy_passphrase"` PrivacyProtocol interface{} `json:"privacy_protocol"` User interface{} `json:"user"` Version string `json:"version"` }
SNMP
type StorageClient ¶
type StorageClient struct { Hostname string Username string Password string APIToken string Version string Client *http.Client }
StorageClient ... Contstructor required Variables
func NewStorageClient ¶
func NewStorageClient(target string, username string, password string, apiToken string, version string) (*StorageClient, error)
NewStorageClient ... Initializes the Constructor with the above variables
func (*StorageClient) FetchArrayInfo ¶
func (c *StorageClient) FetchArrayInfo() (ArrayInfo, error)
FetchArrayInfo
func (*StorageClient) FetchDNSInfo ¶
func (c *StorageClient) FetchDNSInfo() (DNSInfo, error)
FetchDNSInfo
func (*StorageClient) FetchHardwareInfo ¶
func (c *StorageClient) FetchHardwareInfo() ([]HardwareInfo, error)
FetchHardwareInfo
func (*StorageClient) FetchNTPInfo ¶
func (c *StorageClient) FetchNTPInfo() (NTPServerInfo, error)
FetchNTPInfo
func (*StorageClient) FetchNetworkInfo ¶
func (c *StorageClient) FetchNetworkInfo() ([]NetworkInfo, error)
FetchNetworkInfo
func (*StorageClient) FetchPhoneHomeInfo ¶
func (c *StorageClient) FetchPhoneHomeInfo() (PhoneHomeInfo, error)
FetchPhoneHomeInfo
func (*StorageClient) FetchSNMPInfo ¶
func (c *StorageClient) FetchSNMPInfo() ([]SNMPInfo, error)
FetchSNMPInfo
Click to show internal directories.
Click to hide internal directories.