Documentation
¶
Index ¶
- type Administration
- type Application
- type Config
- type Connection
- func (c *Connection) CallRaw(method string, params interface{}) ([]byte, error)
- func (c *Connection) DomainsCheckPublicFoldersIntegrity() error
- func (c *Connection) DomainsGet(query SearchQuery) (DomainList, error)
- func (c *Connection) DomainsGetDomainFooterPlaceholders() (PlaceHolderList, error)
- func (c *Connection) DomainsGetSettings() (*DomainSetting, error)
- func (c *Connection) DomainsSaveFooterImage(fileID string) (*string, error)
- func (c *Connection) Login(user, password string, app *Application) error
- func (c *Connection) Logout() error
- func (c *Connection) ServerGetBrowserLanguages() ([]string, error)
- func (c *Connection) ServerGetClientStatistics() (*bool, error)
- func (c *Connection) ServerGetColumnList(objectName, methodName string) ([]string, error)
- func (c *Connection) ServerGetConnections(query SearchQuery) (ConnectionList, error)
- func (c *Connection) ServerGetDirs(path string) ([]DirList, error)
- func (c *Connection) ServerGetDownloadProgress() (*int, error)
- func (c *Connection) ServerGetLicenseExtensionsList() (ExtensionsList, error)
- func (c *Connection) ServerGetNamedConstantList() (NamedConstantList, error)
- func (c *Connection) ServerGetOpenedFoldersInfo(query SearchQuery) (FolderInfoList, error)
- func (c *Connection) ServerGetProductInfo() (*ProductInfo, error)
- func (c *Connection) ServerGetRemoteAdministration() (*Administration, error)
- func (c *Connection) ServerGetServerHash() (string, error)
- func (c *Connection) ServerGetServerIpAddresses() ([]string, error)
- func (c *Connection) ServerGetServerTime() (*ServerTimeInfo, error)
- func (c *Connection) ServerGetVersion() (*ServerVersion, error)
- func (c *Connection) ServerGetWebSessions(query SearchQuery) ([]WebSessionList, error)
- func (c *Connection) ServerPathExists(username, password, path string) (*string, error)
- func (c *Connection) ServerReboot() error
- func (c *Connection) ServerRestart() error
- func (c *Connection) ServerUpgrade() error
- func (c *Connection) SessionGetDomain() (*Domain, error)
- func (c *Connection) SessionWhoAmI() (*UserDetails, error)
- type ConnectionList
- type Connections
- type Constant
- type Credentials
- type Destination
- type DirList
- type Domain
- type DomainInfo
- type DomainList
- type DomainSetting
- type ErrorReport
- type ExtensionsList
- type FolderInfo
- type FolderInfoList
- type ForwardingOptions
- type KeepForRecovery
- type NamedConstantList
- type OutgoingMessageLimit
- type PlaceHolderList
- type ProductInfo
- type RenameInfo
- type SearchQuery
- type ServerTimeInfo
- type ServerVersion
- type UserDetails
- type WebSessionList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Administration ¶
type Administration struct {
IsEnabled bool `json:"isEnabled"`
IsLimited bool `json:"isLimited"`
GroupID string `json:"groupId"`
GroupName string `json:"groupName"`
BuiltInAdminEnabled bool `json:"builtInAdminEnabled"`
BuiltInAdminUsername string `json:"builtInAdminUsername"`
BuiltInAdminPassword string `json:"builtInAdminPassword"`
BuiltInAdminPasswordIsEmpty bool `json:"builtInAdminPasswordIsEmpty"`
BuiltInAdminUsernameCollide bool `json:"builtInAdminUsernameCollide"`
}
type Application ¶
func NewApplication ¶
func NewApplication(name, vendor, version string) *Application
NewApplication returns a pointer to structure with application data
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func NewConfig ¶
func NewConfig(dest Destination, server string) *Config
NewConfig returns a pointer to structure with the configuration for connecting to the API server Parameters:
dest - control destination (Admin - for server control, Client - for mail client control) server - address without schema and port
func (*Config) NewConnection ¶
func (c *Config) NewConnection() (*Connection, error)
type Connection ¶
func (*Connection) CallRaw ¶
func (c *Connection) CallRaw(method string, params interface{}) ([]byte, error)
func (*Connection) DomainsCheckPublicFoldersIntegrity ¶
func (c *Connection) DomainsCheckPublicFoldersIntegrity() error
DomainsCheckPublicFoldersIntegrity checks integrity of all public folders. If corrupted folder is found, try to fix it.
func (*Connection) DomainsGet ¶
func (c *Connection) DomainsGet(query SearchQuery) (DomainList, error)
DomainsGet obtains a list of domains.
func (*Connection) DomainsGetDomainFooterPlaceholders ¶
func (c *Connection) DomainsGetDomainFooterPlaceholders() (PlaceHolderList, error)
DomainsGetDomainFooterPlaceholders returns all supported placeholders for domain footer.
func (*Connection) DomainsGetSettings ¶
func (c *Connection) DomainsGetSettings() (*DomainSetting, error)
DomainsGetSettings obtains settings common in all domains.
func (*Connection) DomainsSaveFooterImage ¶
func (c *Connection) DomainsSaveFooterImage(fileID string) (*string, error)
DomainsSaveFooterImage - save a new footer's image.
func (*Connection) Login ¶
func (c *Connection) Login(user, password string, app *Application) error
Login - log in a given user. Please note that with a session to one module you cannot use another one (eg. with admin session you cannot use webmail). Parameters:
user - login name + domain name (can be omitted if primary) of the user to be logged in,
e.g. "jdoe" or "[email protected]"
password - password of the user to be logged in
app - client application description
func (*Connection) ServerGetBrowserLanguages ¶
func (c *Connection) ServerGetBrowserLanguages() ([]string, error)
ServerGetBrowserLanguages returns a list of user-preferred languages set in browser.
func (*Connection) ServerGetClientStatistics ¶
func (c *Connection) ServerGetClientStatistics() (*bool, error)
ServerGetClientStatistics obtains client statistics settings.
func (*Connection) ServerGetColumnList ¶
func (c *Connection) ServerGetColumnList(objectName, methodName string) ([]string, error)
ServerGetColumnList obtains a list of columns dependent on callee role.
func (*Connection) ServerGetConnections ¶
func (c *Connection) ServerGetConnections(query SearchQuery) (ConnectionList, error)
ServerGetConnections obtains a information about active connections.
func (*Connection) ServerGetDirs ¶
func (c *Connection) ServerGetDirs(path string) ([]DirList, error)
ServerGetDirs obtains a list of directories in a particular path.
func (*Connection) ServerGetDownloadProgress ¶
func (c *Connection) ServerGetDownloadProgress() (*int, error)
ServerGetDownloadProgress obtains a progress of installation package downloading.
func (*Connection) ServerGetLicenseExtensionsList ¶
func (c *Connection) ServerGetLicenseExtensionsList() (ExtensionsList, error)
ServerGetLicenseExtensionsList obtains a list of license extensionsList, caller must be authenticated.
func (*Connection) ServerGetNamedConstantList ¶
func (c *Connection) ServerGetNamedConstantList() (NamedConstantList, error)
ServerGetNamedConstantList obtains server side list of constants.
func (*Connection) ServerGetOpenedFoldersInfo ¶
func (c *Connection) ServerGetOpenedFoldersInfo(query SearchQuery) (FolderInfoList, error)
ServerGetOpenedFoldersInfo obtains a information about folders opened on server.
func (*Connection) ServerGetProductInfo ¶
func (c *Connection) ServerGetProductInfo() (*ProductInfo, error)
ServerGetProductInfo gets basic information about product and its version.
func (*Connection) ServerGetRemoteAdministration ¶
func (c *Connection) ServerGetRemoteAdministration() (*Administration, error)
ServerGetRemoteAdministration obtains a information about remote administration settings.
func (*Connection) ServerGetServerHash ¶
func (c *Connection) ServerGetServerHash() (string, error)
ServerGetServerHash obtains a hash string created from product name, version, and installation time.
func (*Connection) ServerGetServerIpAddresses ¶
func (c *Connection) ServerGetServerIpAddresses() ([]string, error)
ServerGetServerIpAddresses obtains a list all server IP addresses.
func (*Connection) ServerGetServerTime ¶
func (c *Connection) ServerGetServerTime() (*ServerTimeInfo, error)
ServerGetServerTime obtains server time information.
func (*Connection) ServerGetVersion ¶
func (c *Connection) ServerGetVersion() (*ServerVersion, error)
ServerGetVersion obtains a information about server version.
func (*Connection) ServerGetWebSessions ¶
func (c *Connection) ServerGetWebSessions(query SearchQuery) ([]WebSessionList, error)
ServerGetWebSessions obtains a information about web component sessions.
func (*Connection) ServerPathExists ¶
func (c *Connection) ServerPathExists(username, password, path string) (*string, error)
ServerPathExists checks if the selected path exists and is accessible from the server. Parameters:
path - directory name credentials - (optional) user name and password required to access network disk result - result of check
func (*Connection) ServerReboot ¶
func (c *Connection) ServerReboot() error
ServerReboot - reboot the host system
func (*Connection) ServerRestart ¶
func (c *Connection) ServerRestart() error
ServerRestart - restart server. The server must run as service.
func (*Connection) ServerUpgrade ¶
func (c *Connection) ServerUpgrade() error
ServerUpgrade - upgrade server to the latest version. The server must run as service.
func (*Connection) SessionGetDomain ¶
func (c *Connection) SessionGetDomain() (*Domain, error)
SessionGetDomain gets domain information of the currently logged user. Only name, displayName, ID, description and password policy related fields are filled.
func (*Connection) SessionWhoAmI ¶
func (c *Connection) SessionWhoAmI() (*UserDetails, error)
SessionWhoAmI determines the currently logged user (caller, e.g. administrator). Fields id and domainId can be empty if built-in administrator is logged-in.
type ConnectionList ¶
type ConnectionList []Connections
type Connections ¶
type Credentials ¶
type Domain ¶
type Domain struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
IsPrimary bool `json:"isPrimary"`
UserMaxCount int `json:"userMaxCount"`
PasswordExpirationEnabled bool `json:"passwordExpirationEnabled"`
PasswordExpirationDays int `json:"passwordExpirationDays"`
PasswordHistoryCount int `json:"passwordHistoryCount"`
PasswordComplexityEnabled bool `json:"passwordComplexityEnabled"`
PasswordMinimumLength int `json:"passwordMinimumLength"`
OutgoingMessageLimit `json:"outgoingMessageLimit"`
DeletedItems struct {
IsEnabled bool `json:"isEnabled"`
Days int `json:"days"`
} `json:"deletedItems"`
JunkEmail struct {
IsEnabled bool `json:"isEnabled"`
Days int `json:"days"`
} `json:"junkEmail"`
SentItems struct {
IsEnabled bool `json:"isEnabled"`
Days int `json:"days"`
} `json:"sentItems"`
AutoDelete struct {
IsEnabled bool `json:"isEnabled"`
Days int `json:"days"`
} `json:"autoDelete"`
KeepForRecovery `json:"keepForRecovery"`
AliasList []interface{} `json:"aliasList"`
ForwardingOptions `json:"forwardingOptions"`
Service struct {
IsEnabled bool `json:"isEnabled"`
ServiceType string `json:"serviceType"`
CustomMapFile string `json:"customMapFile"`
Authentication struct {
Username string `json:"username"`
Password string `json:"password"`
IsSecure bool `json:"isSecure"`
} `json:"authentication"`
Hostname string `json:"hostname"`
BackupHostname string `json:"backupHostname"`
DirectoryName string `json:"directoryName"`
LdapSuffix string `json:"ldapSuffix"`
} `json:"service"`
IsUsed bool `json:"isUsed"`
Text string `json:"text"`
IsHTML bool `json:"isHtml"`
IsUsedInDomain bool `json:"isUsedInDomain"`
} `json:"domainFooter"`
KerberosRealm string `json:"kerberosRealm"`
WinNtName string `json:"winNtName"`
PamRealm string `json:"pamRealm"`
IPAddressBind struct {
Enabled bool `json:"enabled"`
Value string `json:"value"`
} `json:"ipAddressBind"`
Logo struct {
IsUsed bool `json:"isUsed"`
URL string `json:"url"`
} `json:"logo"`
CustomClientLogo struct {
IsEnabled bool `json:"isEnabled"`
URL string `json:"url"`
ID string `json:"id"`
} `json:"customClientLogo"`
CheckSpoofedSender bool `json:"checkSpoofedSender"`
RenameInfo `json:"renameInfo"`
DomainQuota struct {
DiskSizeLimit struct {
IsActive bool `json:"isActive"`
Limit struct {
Value int `json:"value"`
Units string `json:"units"`
} `json:"limit"`
} `json:"diskSizeLimit"`
ConsumedSize struct {
Value int `json:"value"`
Units string `json:"units"`
} `json:"consumedSize"`
Notification struct {
Type string `json:"type"`
Period struct {
Value int `json:"value"`
Units string `json:"units"`
} `json:"period"`
} `json:"notification"`
WarningLimit int `json:"warningLimit"`
Email string `json:"email"`
Blocks bool `json:"blocks"`
} `json:"domainQuota"`
IsDistributed bool `json:"isDistributed"`
IsDkimEnabled bool `json:"isDkimEnabled"`
IsLdapManagementAllowed bool `json:"isLdapManagementAllowed"`
IsInstantMessagingEnabled bool `json:"isInstantMessagingEnabled"`
UseRemoteArchiveAddress bool `json:"useRemoteArchiveAddress"`
RemoteArchiveAddress string `json:"remoteArchiveAddress"`
ArchiveLocalMessages bool `json:"archiveLocalMessages"`
ArchiveIncomingMessages bool `json:"archiveIncomingMessages"`
ArchiveOutgoingMessages bool `json:"archiveOutgoingMessages"`
ArchiveBeforeFilter bool `json:"archiveBeforeFilter"`
}
type DomainInfo ¶
type DomainInfo struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
IsPrimary bool `json:"isPrimary"`
UserMaxCount int `json:"userMaxCount"`
OutgoingMessageLimit `json:"outgoingMessageLimit"`
KeepForRecovery `json:"keepForRecovery"`
AliasList []interface{} `json:"aliasList"`
ForwardingOptions `json:"forwardingOptions"`
KerberosRealm string `json:"kerberosRealm"`
WinNtName string `json:"winNtName"`
PamRealm string `json:"pamRealm"`
IPAddressBind struct {
Enabled bool `json:"enabled"`
Value string `json:"value"`
} `json:"ipAddressBind"`
RenameInfo `json:"renameInfo"`
IsDistributed bool `json:"isDistributed"`
}
type DomainList ¶
type DomainList []DomainInfo
type DomainSetting ¶
type ErrorReport ¶
type ExtensionsList ¶
type ExtensionsList []string
type FolderInfo ¶
type FolderInfoList ¶
type FolderInfoList []FolderInfo
type ForwardingOptions ¶
type KeepForRecovery ¶
type NamedConstantList ¶
type NamedConstantList []Constant
type OutgoingMessageLimit ¶
type PlaceHolderList ¶
type PlaceHolderList []Constant
type ProductInfo ¶
type ProductInfo struct {
ProductName string `json:"productName"`
Version string `json:"version"`
BuildNumber string `json:"buildNumber"`
OsName string `json:"osName"`
Os string `json:"os"`
ReleaseType string `json:"releaseType"`
DeployedType string `json:"deployedType"`
IsDockerImage bool `json:"isDockerImage"`
UpdateInfo struct {
Result string `json:"result"`
Description string `json:"description"`
DownloadURL string `json:"downloadUrl"`
InfoURL string `json:"infoUrl"`
} `json:"updateInfo"`
CentralManagementSet bool `json:"centralManagementSet"`
}
type RenameInfo ¶
type SearchQuery ¶
type SearchQuery struct {
Fields []string `json:"fields"`
Conditions []string `json:"conditions"`
Start int `json:"start"`
Limit int `json:"limit"`
OrderBy map[string]string `json:"orderBy,omitempty"`
}
func NewSearchQuery ¶
type ServerTimeInfo ¶
type ServerVersion ¶
type UserDetails ¶
type UserDetails struct {
ID string `json:"id"`
DomainID string `json:"domainId"`
LoginName string `json:"loginName"`
FullName string `json:"fullName"`
EffectiveRole struct {
UserRole string `json:"userRole"`
PublicFolderRight bool `json:"publicFolderRight"`
ArchiveFolderRight bool `json:"archiveFolderRight"`
} `json:"effectiveRole"`
}