connect

package module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2021 License: MIT Imports: 8 Imported by: 0

README

Kerio Connect API

Go Reference

Overview

Client for Kerio API Connect (JSON-RPC 2.0)

Implemented several Administration API for Kerio Connect methods

Created the basis for easily adding your own methods

Installation

go get github.com/igiant/connect

Example

package main

import (
	"fmt"
	"log"

	"github.com/igiant/connect"
)

func main() {
	config := connect.NewConfig("server_addr")
	conn, err := config.NewConnection()
	if err != nil {
		log.Fatal(err)
	}
	app := &connect.Application{
		Name:    "MyApp",
		Vendor:  "Me",
		Version: "v0.0.1",
	}
	err = conn.Login("user_name", "user_password", app)
	if err != nil {
		log.Fatal(err)
	}
	defer func() {
		err = conn.Logout()
		if err != nil {
			log.Println(err)
		}
	}()
	info, err := conn.ServerGetProductInfo()
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf(
		"ProductName: %s\nVersion: %s\nOsName: %s\n",
		info.ProductName,
		info.Version,
		info.OsName,
	)
}

Documentation

RoadMap

  • Add remaining methods for Kerio Connect

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionAfterDays added in v0.1.0

type ActionAfterDays struct {
	IsEnabled bool `json:"isEnabled"` //is action on/off?
	Days      int  `json:"days"`      //after how many days is an action performed?
}

ActionAfterDays Message clean out setting Note: all fields must be assigned if used in set methods

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 Alias added in v0.0.3

type Alias struct {
	ID          string `json:"id"`
	DomainID    string `json:"domainId"`
	Name        string `json:"name"`
	DeliverToID string `json:"deliverToId"`
	DeliverTo   string `json:"deliverTo"`
	Type        string `json:"type"`
	Description string `json:"description"`
	HomeServer  struct {
		ID   string `json:"id"`
		Name string `json:"name"`
	} `json:"homeServer"`
}

type AliasList added in v0.0.3

type AliasList []Alias

type AliasTarget added in v0.0.3

type AliasTarget struct {
	ID           string     `json:"id"`           //unique identifier
	Type         string     `json:"type"`         //item type discriminator
	Name         string     `json:"name"`         //loginName for the User, name in square brackets for the Group
	FullName     string     `json:"fullName"`     //fullname for the User, empty string for the Group
	Description  string     `json:"description"`  //description of User/Group
	IsEnabled    string     `json:"isEnabled"`    //is the User/Group enabled?
	ItemSource   string     `json:"itemSource"`   //is the User/Group stored internally or by LDAP?
	EmailAddress string     `json:"emailAddress"` //first email address
	HomeServer   HomeServer `json:"homeServer"`   //id of users homeserver if server is in Cluster; groups haven't homeserver
}

type AliasTargetList added in v0.0.3

type AliasTargetList []AliasTarget

type Application

type Application struct {
	Name    string
	Vendor  string
	Version string
}

func NewApplication

func NewApplication(name, vendor, version string) *Application

NewApplication returns a pointer to structure with application data

type CompareOperator added in v0.1.0

type CompareOperator string
const (
	Eq          CompareOperator = "Eq"          // '='  - equal
	NotEq       CompareOperator = "NotEq"       // '!=' - not equal
	LessThan    CompareOperator = "LessThan"    // '<'  - lower that
	GreaterThan CompareOperator = "GreaterThan" // '>'  - greater that
	LessEq      CompareOperator = "LessEq"      // '<=' - lower or equal
	GreaterEq   CompareOperator = "GreaterEq"   // '>=' - greater or equal
	Like        CompareOperator = "NotEq"       // contains substring, % is wild character
)

type Config

type Config struct {
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(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

type Connection struct {
	Config *Config
	Token  *string
	// contains filtered or unexported fields
}

func (*Connection) AliasesCheck added in v0.0.3

func (c *Connection) AliasesCheck(checkString string) ([]string, error)

AliasesCheck obtains a list of mail addresses and/or public folders on which given string will be expanded. Parameters

checkString	- string to be checked

Return

list of expansions

func (*Connection) AliasesCreate added in v0.0.3

func (c *Connection) AliasesCreate(aliases AliasList) (CreateResultList, ErrorList, error)

AliasesCreate - create new aliases. Parameters

aliases	- new alias entities

Return

list of IDs of created aliases
list of error messages for appropriate new aliases

func (*Connection) AliasesGet added in v0.0.3

func (c *Connection) AliasesGet(domainID string, query SearchQuery) (AliasList, error)

AliasesGet obtains a list of aliases. Parameters

query	    - query conditions and limits
domainKId	- domain identification

Return

aliases

func (*Connection) AliasesGetMailPublicFolderList added in v0.0.3

func (c *Connection) AliasesGetMailPublicFolderList(domainID string) (PublicFolderList, error)

AliasesGetMailPublicFolderList obtains a list of mail public folders in the given domain. Parameters

domainId	- global identification of the domain

Return

list of public folders

func (*Connection) AliasesGetTargetList added in v0.0.3

func (c *Connection) AliasesGetTargetList(domainID string, query SearchQuery) (AliasTargetList, error)

AliasesGetTargetList obtains a list of alias targets. Parameters

query	    - query conditions and limits
domainId	- global identification of the domain

Return

alias targets

func (*Connection) AliasesRemove added in v0.0.3

func (c *Connection) AliasesRemove(aliasIDs []string) (ErrorList, error)

AliasesRemove - Delete aliases. Parameters

aliasList	- list of global identifiers of aliases to be deleted

Return

error message list

func (*Connection) AliasesSet added in v0.0.3

func (c *Connection) AliasesSet(aliasIDs []string, pattern Alias) (ErrorList, error)

AliasesSet - Set an existing alias. Parameters

aliasList   - list of alias global identifier(s)
pattern     - pattern to use for new values

Return

error message list

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 "jdoe@company.com"
password - password of the user to be logged in
app      - client application description

func (*Connection) Logout

func (c *Connection) Logout() error

Logout - Log out the callee

func (*Connection) QueueGet added in v0.0.3

func (c *Connection) QueueGet(query SearchQuery)

TODO QueueGet QueueGet obtains a list of queued messages. Parameters

list	- awaiting messages
totalItems	- number of listed messages
volume	- space occupied by messages in the queue
query	- search conditions

func (*Connection) QueueGetProcessed added in v0.0.3

func (c *Connection) QueueGetProcessed(query SearchQuery) ([]string, error)

QueueGetProcessed - list messages that are being processed by the server.

Parameters
    query	- search conditions

func (*Connection) QueueRemove added in v0.0.3

func (c *Connection) QueueRemove(messageIDs []string) (int, error)

QueueRemove - remove selected messages from the message queue.

Parameters
    messageIDs	- identifiers of messages to be deleted

Return number of items deleted from the message queue

func (*Connection) QueueRemoveAll added in v0.0.3

func (c *Connection) QueueRemoveAll() (int, error)

QueueRemoveAll - remove all message from the queue. Return number of items deleted from the message queue

func (*Connection) QueueRemoveMatching added in v0.0.3

func (c *Connection) QueueRemoveMatching(senderPattern, recipientPattern string) (int, error)

QueueRemoveMatching - remove all messages matching a pattern from the message queue.

Parameters
    senderPattern	    - sender pattern with wildcards
    recipientPattern    - recipient pattern with wildcards

Return number of items deleted from the message queue

func (*Connection) QueueRun added in v0.0.3

func (c *Connection) QueueRun() error

QueueRun - try to process message queue immediately.

func (*Connection) QueueTryToSend added in v0.0.3

func (c *Connection) QueueTryToSend(messageIDs []string) error

QueueTryToSend - try to send selected messages.

Parameters
    messageIDs	- identifiers of messages to be sent immediately.

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) ServerKillWebSessions added in v0.0.2

func (c *Connection) ServerKillWebSessions(ids []string) error

ServerKillWebSessions Terminate actual web 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) ServerSendBugReport added in v0.0.2

func (c *Connection) ServerSendBugReport(name, email, language, subject, description string) error

ServerSendBugReport send a bug report to Kerio. Parameters:

name	    - name of sender
email	    - email of sender
language	- language of report
subject     - summary of report
description	- description of problem

func (*Connection) ServerSetClientStatistics added in v0.0.2

func (c *Connection) ServerSetClientStatistics(isEnabled bool) error

ServerSetClientStatistics set client statistics settings.

func (*Connection) ServerSetRemoteAdministration added in v0.0.2

func (c *Connection) ServerSetRemoteAdministration(setting *Administration) error

ServerSetRemoteAdministration obtains a information about remote administration settings.

func (*Connection) ServerUpgrade

func (c *Connection) ServerUpgrade() error

ServerUpgrade - upgrade server to the latest version. The server must run as service.

func (*Connection) ServerValidateRemoteAdministration added in v0.0.2

func (c *Connection) ServerValidateRemoteAdministration(setting *Administration) error

ServerValidateRemoteAdministration obtains a information about remote administration settings.

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 Connections struct {
	Proto       string `json:"proto"`
	Extension   string `json:"extension"`
	IsSecure    bool   `json:"isSecure"`
	Time        string `json:"time"`
	From        string `json:"from"`
	User        string `json:"user"`
	Description string `json:"description"`
}

type Constant

type Constant struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type CreateResult added in v0.0.3

type CreateResult struct {
	InputIndex int    `json:"inputIndex"` //0-based index to input array, e.g. 3 means that the relates to the 4th element of the input parameter array
	ID         string `json:"id"`         //ID of created item
}

Details about a particular item created.

type CreateResultList added in v0.0.3

type CreateResultList []CreateResult

type Credentials

type Credentials struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type DirList

type DirList struct {
	Name            string `json:"name"`
	HasSubdirectory bool   `json:"hasSubdirectory"`
}

type Directories added in v0.1.0

type Directories struct {
	StorePath   string `json:"storePath"`   //Path to the store directory.
	ArchivePath string `json:"archivePath"` //Path to the archive directory.
	BackupPath  string `json:"backupPath"`  //Path to the backup directory.
}

type Distance added in v0.1.0

type Distance struct {
	Days    int `json:"days"`
	Hours   int `json:"hours"`
	Minutes int `json:"minutes"`
}

Distance Note: all fields must be assigned if used in set methods

type DistanceOrNull added in v0.1.0

type DistanceOrNull struct {
	Type     string   `json:"type"`
	TimeSpan Distance `json:"timeSpan"`
}

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              ActionAfterDays `json:"deletedItems"`
	JunkEmail                 ActionAfterDays `json:"junkEmail"`
	SentItems                 ActionAfterDays `json:"sentItems"`
	AutoDelete                ActionAfterDays `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"`
	DomainFooter struct {
		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"`
		IsUsed bool   `json:"isUsed"`
		URL    string `json:"url"`
	} `json:"logo"`
		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 DomainSetting struct {
	Hostname               string `json:"hostname"`
	PublicFoldersPerDomain bool   `json:"publicFoldersPerDomain"`
	ServerID               string `json:"serverId"`
}

type Error added in v0.0.3

type Error struct {
	InputIndex        int                          `json:"inputIndex"`        //0-based index to input array, e.g. 3 means that the relates to the 4th element of the input parameter array
	Code              int                          `json:"code"`              //-32767..-1 (JSON-RPC) or 1..32767 (application)
	Message           string                       `json:"message"`           //text with placeholders %1, %2, etc., e.g. "User %1 cannot be deleted."
	MessageParameters LocalizableMessageParameters `json:"messageParameters"` //strings to replace placeholders in message, and message plurality.
}

type ErrorList added in v0.0.3

type ErrorList []Error

type ErrorReport

type ErrorReport struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Data    struct {
		MessageParameters struct {
			PositionalParameters []string `json:"positionalParameters"`
			Plurality            int      `json:"plurality"`
		} `json:"messageParameters"`
	} `json:"data"`
}

type ExtensionsList

type ExtensionsList []string

type FolderInfo

type FolderInfo struct {
	FolderName     string   `json:"folderName"`
	ReferenceCount int      `json:"referenceCount"`
	IndexLoaded    bool     `json:"indexLoaded"`
	Users          []string `json:"users"`
}

type FolderInfoList

type FolderInfoList []FolderInfo

type ForwardingOptions

type ForwardingOptions struct {
	IsEnabled   bool   `json:"isEnabled"`
	Host        string `json:"host"`
	Port        int    `json:"port"`
	How         string `json:"how"`
	PreventLoop bool   `json:"preventLoop"`
}

type HomeServer added in v0.0.3

type HomeServer struct {
	ID   string `json:"id"`   //server's id
	Name string `json:"name"` //server's Internet hostname
}

HomeServer User's home server in a distributed domain.

type KeepForRecovery

type KeepForRecovery struct {
	IsEnabled bool `json:"isEnabled"`
	Days      int  `json:"days"`
}

type LocalizableMessageParameters added in v0.0.3

type LocalizableMessageParameters struct {
	PositionalParameters []string `json:"positionalParameters"` //additional strings to replace the placeholders in message (first string replaces %1 etc.)
	Plurality            int      `json:"plurality"`            //count of items, used to distinguish among singular/paucal/plural; 1 for messages with no counted items
}

type NamedConstantList

type NamedConstantList []Constant

type NamedMultiValue added in v0.1.0

type NamedMultiValue struct {
	Name  string   `json:"name"`
	Value []string `json:"value"`
}

NamedValue - all fields must be assigned if used in set methods

type NamedValue added in v0.1.0

type NamedValue struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

NamedValue - all fields must be assigned if used in set methods

type OutgoingMessageLimit

type OutgoingMessageLimit struct {
	IsActive bool `json:"isActive"`
	Limit    struct {
		Value int    `json:"value"`
		Units string `json:"units"`
	} `json:"limit"`
}

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 PublicFolder added in v0.0.3

type PublicFolder struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type PublicFolderList added in v0.0.3

type PublicFolderList []PublicFolder

type RenameInfo

type RenameInfo struct {
	IsRenamed bool   `json:"isRenamed"`
	OldName   string `json:"oldName"`
	NewName   string `json:"newName"`
}

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

func NewSearchQuery(fields []string, conditions []string, start, limit int, orderBy map[string]string) SearchQuery

type ServerTimeInfo

type ServerTimeInfo struct {
	TimezoneOffset int `json:"timezoneOffset"`
	StartTime      int `json:"startTime"`
	CurrentTime    int `json:"currentTime"`
}

type ServerVersion

type ServerVersion struct {
	Product  string `json:"product"`
	Version  string `json:"version"`
	Major    int    `json:"major"`
	Minor    int    `json:"minor"`
	Revision int    `json:"revision"`
	Build    int    `json:"build"`
}

type SortOrder added in v0.1.0

type SortOrder struct {
	ColumnName    string `json:"columnName"`
	Direction     string `json:"direction"`
	CaseSensitive bool   `json:"caseSensitive"`
}

SortOrder - Sorting Order

type SubCondition added in v0.1.0

type SubCondition struct {
	FieldName  string `json:"fieldName"`  //left side of condition
	Comparator string `json:"comparator"` //middle of condition
	Value      string `json:"value"`      //right side of condition
}

SubCondition - A Part of a Condition

type TimeHMS added in v0.1.0

type TimeHMS Distance

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"`
}

type WebSessionList

type WebSessionList struct {
	ID             string `json:"id"`
	UserName       string `json:"userName"`
	ClientAddress  string `json:"clientAddress"`
	ExpirationTime string `json:"expirationTime"`
	ComponentType  string `json:"componentType"`
	IsSecure       bool   `json:"isSecure"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL