Documentation ¶
Overview ¶
the icws_golib package wraps CIC ICWS fuctionality in a GO library. To get started, call icws_golib.NewIcws() to instansiate a new Icws struct. Then call icws.Login(...) and continue on from there.
Index ¶
- type ConfigRecord
- type Icws
- func (i *Icws) Defaults(configurationType string) (defaults ConfigRecord, err error)
- func (i *Icws) DeleteConfigurationRecord(configurationType, id string) (err error)
- func (i *Icws) GetConfigurationRecord(configurationType, id, properties string) (record ConfigRecord, err error)
- func (i *Icws) GetFeatures() (features []ServerFeature, err error)
- func (i *Icws) GetStatus(userId string) (defaults ConfigRecord, err error)
- func (i *Icws) GetVersion() (version ServerVersion, err error)
- func (i *Icws) InteractionAction(action, interactionId, attribute string) (result ConfigRecord, err error)
- func (i *Icws) Login(applicationName, server, username, password string) (err error)
- func (i *Icws) LoginMarketPlaceApp(applicationName, server, username, password, marketplaceLicense, ... string) (err error)
- func (i *Icws) MakeCall(target string) (result ConfigRecord, err error)
- func (i *Icws) ProxyLogin(applicationName, proxyUrl, serverName, username, password string) (err error)
- func (i *Icws) ProxyLoginMarketPlaceApp(...) (err error)
- func (i *Icws) ProxyLoginWithData(proxyUrl, serverName, username string, loginData map[string]string) (err error)
- func (i *Icws) SelectConfigurationRecords(objectType, selectFields, where string) (records []ConfigRecord, err error)
- func (i *Icws) SetPassword(userId, password string, force bool) error
- func (i *Icws) SetStatus(userId, statusKey string) (err error)
- type ServerFeature
- type ServerVersion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigRecord ¶
type ConfigRecord map[string]interface{}
type Icws ¶
type Icws struct {
CurrentToken, CurrentCookie, CurrentSession, CurrentServer, UserId, HttpScheme string
Port int
}
func (*Icws) Defaults ¶
func (i *Icws) Defaults(configurationType string) (defaults ConfigRecord, err error)
gets the default values for a configuration type
func (*Icws) DeleteConfigurationRecord ¶
Deletes a record for the ID of a specific configuration type.
func (*Icws) GetConfigurationRecord ¶
func (i *Icws) GetConfigurationRecord(configurationType, id, properties string) (record ConfigRecord, err error)
Gets a record for the ID of a specific configuration type.
func (*Icws) GetFeatures ¶
func (i *Icws) GetFeatures() (features []ServerFeature, err error)
Gets a list of features and their version from the server
func (*Icws) GetStatus ¶
func (i *Icws) GetStatus(userId string) (defaults ConfigRecord, err error)
gets the status information for a user
func (*Icws) GetVersion ¶
func (i *Icws) GetVersion() (version ServerVersion, err error)
gets server version details. Does not need to be connected to the server
func (*Icws) InteractionAction ¶
func (i *Icws) InteractionAction(action, interactionId, attribute string) (result ConfigRecord, err error)
Performs an action on a given interaction. e.g. Pickup, Hold, Disconnect, etc
func (*Icws) Login ¶
Logs into a CIC server. Server should be a server name e.g. MyServer.domain.com
func (*Icws) LoginMarketPlaceApp ¶
func (i *Icws) LoginMarketPlaceApp(applicationName, server, username, password, marketplaceLicense, marketplaceAppKey string) (err error)
Logs into a CIC server for a MarketPlace application using the app's custom license. Server should be a url e.g. https://MyServer:8019
func (*Icws) MakeCall ¶
func (i *Icws) MakeCall(target string) (result ConfigRecord, err error)
Creates a new call
func (*Icws) ProxyLogin ¶
func (i *Icws) ProxyLogin(applicationName, proxyUrl, serverName, username, password string) (err error)
logs into a CIC server through a reverse proxy where the url to reach the server would be proxyUrl/serverName
func (*Icws) ProxyLoginMarketPlaceApp ¶
func (i *Icws) ProxyLoginMarketPlaceApp(applicationName, proxyUrl, serverName, username, password, marketplaceLicense, marketplaceAppKey string) (err error)
Logs into a CIC server for a MarketPlace application using the app's custom license. Server should be a url e.g. https://MyServer:8019
func (*Icws) ProxyLoginWithData ¶
func (i *Icws) ProxyLoginWithData(proxyUrl, serverName, username string, loginData map[string]string) (err error)
logs into CIC through a reverse proxy
func (*Icws) SelectConfigurationRecords ¶
func (i *Icws) SelectConfigurationRecords(objectType, selectFields, where string) (records []ConfigRecord, err error)
Returns a list of matching records for the given object type.
func (*Icws) SetPassword ¶
changes the password for the given user
type ServerFeature ¶
type ServerFeature struct { //Id of the features FeatureId string //version of the feature Version int }
Definition of a server feature
type ServerVersion ¶
type ServerVersion struct { //The product's two-digit release year. For the release "CIC 2015 R1" this value will be "15" MajorVersion string //The product's release number. For the release "CIC 2015 R1" this value will be "1". MinorVersion string //The patch number of the release. The value "0" indicates the release without any patches. For the release "CIC 2015 R1" this value will be "0", and for the release "CIC 2015 R1 Patch2" this value will be "2". Su string //The product line identifier. ProductId string //The codebase identifier. CodeBaseId string //The build number. Build string //The display string for the release. This does not include patch information. ProductReleaseDisplayString string //The display string for the release including patch information. This string is recommended for use on application "About" screens. ProductPatchDisplayString string }
Version information for the server