Documentation
¶
Index ¶
- Variables
- func InsecureSSHKeyfileConfig(username, keyFile string) (ssh.ClientConfig, error)
- type Account
- type CpBool
- type FloatLimit
- type IntLimit
- type Reseller
- type WhmAPI
- func (a *WhmAPI) ActivateTokenUrl(url, token, hostname string) error
- func (a *WhmAPI) Call(method string, endpoint string, args url.Values, out interface{}) error
- func (a *WhmAPI) ListAccounts() ([]string, error)
- func (a *WhmAPI) ListAllResellerNames() ([]string, error)
- func (a *WhmAPI) LocalSessionAuthenticate() error
- func (a *WhmAPI) ResellerUsers(reseller string) (Reseller, error)
- func (a *WhmAPI) SSHSessionAuthenticate(hostname string, port int, config ssh.ClientConfig) error
Constants ¶
This section is empty.
Variables ¶
View Source
var CreateUserSessionCmd = []string{
"/usr/bin/env",
"whmapi1",
"create_user_session",
"--output=json",
"user=root",
"service=whostmgrd",
"preferred_domain=",
}
Functions ¶
func InsecureSSHKeyfileConfig ¶
func InsecureSSHKeyfileConfig(username, keyFile string) (ssh.ClientConfig, error)
Types ¶
type Account ¶
type Account struct {
Username string `json:"user,omitempty"`
PrimaryDomain string `json:"domain,omitempty"`
ContactEmail string
Reseller string
HomePartition string
Shell string
Package string `json:"package"`
Theme string
BackupsEnabled bool
Suspended bool
Locked bool
OutgoingMailSuspended bool
OutgoingMailHold bool
MailboxFormat int8
MaxDeferPrecent string
MinDeferBeforeProtection string
MaxEmailPerHour string
MainIPv4 net.IP
MainIPv6 net.IP
EmailQuotaLimit string
MaxAddons string
MaxFtp string
MaxMailingLists string
MaxParked string
MaxPop string
MaxDatabases string
MaxSubdomains string
BandwidthUsed *FloatLimit `json:"bandwidthused,omitempty"`
BandwidthLimit *FloatLimit `json:"bandwidthlimit,omitempty"`
DiskUsed *FloatLimit `json:"diskused,omitempty"`
DiskLimit *IntLimit `json:"disklimit,omitempty"`
AlternateDiskLimit *IntLimit `json:"diskquota,omitempty"`
InodeUsed *IntLimit `json:"inodeused,omitempty"`
InodeLimit *IntLimit `json:"inodequota,omitempty"`
}
Account represents a cPanel account
type FloatLimit ¶
type FloatLimit struct {
// contains filtered or unexported fields
}
func (*FloatLimit) MarshalJSON ¶
func (l *FloatLimit) MarshalJSON() ([]byte, error)
func (*FloatLimit) String ¶
func (l *FloatLimit) String() string
func (*FloatLimit) UnmarshalJSON ¶
func (l *FloatLimit) UnmarshalJSON(v []byte) error
type IntLimit ¶
type IntLimit struct {
// contains filtered or unexported fields
}
func (*IntLimit) MarshalJSON ¶
func (*IntLimit) UnmarshalJSON ¶
type Reseller ¶
type Reseller struct {
User string `json:"user"`
Accounts []Account `json:"acct"`
BandwidthUsed *IntLimit `json:"totalbwused,omitempty"`
BandwidthAlloc *IntLimit `json:"totalbwalloc,omitempty"`
BandwidthLimit *IntLimit `json:"bandwidthlimit,omitempty"`
BandwidthOverSelling *CpBool `json:"bwoverselling,omitempty"`
DiskUsed *FloatLimit `json:"diskused,omitempty"`
DiskAlloc *IntLimit `json:"totaldiskalloc,omitempty"`
DiskLimit *IntLimit `json:"diskquota,omitempty"`
DiskOverselling *CpBool `json:"diskoverselling,omitempty"`
}
type WhmAPI ¶
type WhmAPI struct {
// contains filtered or unexported fields
}
func (*WhmAPI) ActivateTokenUrl ¶
func (*WhmAPI) ListAccounts ¶
func (*WhmAPI) ListAllResellerNames ¶
func (*WhmAPI) LocalSessionAuthenticate ¶
func (*WhmAPI) SSHSessionAuthenticate ¶
Click to show internal directories.
Click to hide internal directories.