Documentation ¶
Index ¶
- Constants
- func APIInfo(serverURL, urlPath, authOrApiToken string) (http.Header, string, error)
- func ExchangeAPIToken(authToken string) (string, error)
- func GetUsers(serverURL, authOrApiToken string) ([]byte, error)
- func ListTokens(serverURL, authOrApiToken string) ([]string, error)
- func NewClientRingCentralPassword(rcCredentials []byte) (*http.Client, error)
- func NewClientToken(token string) *http.Client
- func RequestAuthToken(username, password string) (*LoginSuccess, *LoginError, *http.Response, error)
- type Account
- type ClientLite
- type EngageCredentials
- type EngageToken
- type LoginError
- type LoginSuccess
- type Role
- type User
Constants ¶
View Source
const ( EngageVoiceServerURL string = "https://portal.vacd.biz" EngageVoiceLoginURL string = "https://portal.vacd.biz/api/v1/auth/login" EngageVoiceTokenURL string = "https://portal.vacd.biz/api/v1/admin/token" EngageVoiceTokenURLPath string = "/api/v1/admin/token" HeaderEngageVoiceToken string = "x-auth-token" )
View Source
const ( EnvEngageVoiceServerURL = "ENGAGE_VOICE_SERVER_URL" EnvEngageVoiceAccountID = "ENGAGE_VOICE_ACCOUNT_ID" EnvEngageVoiceToken = "ENGAGE_VOICE_TOKEN" APIUsersURLPath = "/api/v1/admin/users" APITokensURLPath = "/api/v1/admin/token" )
Variables ¶
This section is empty.
Functions ¶
func ExchangeAPIToken ¶
func ListTokens ¶
func NewClientToken ¶
func RequestAuthToken ¶
func RequestAuthToken(username, password string) (*LoginSuccess, *LoginError, *http.Response, error)
Types ¶
type Account ¶
type Account struct { MainAccountID string `json:"mainAccountId"` AccountID string `json:"accountId"` AccountName string `json:"accountName"` EnableMultiUser bool `json:"enableMultiUser"` EnableSoftphones bool `json:"enableSoftphones"` TcpaSafeMode bool `json:"tcpaSafeMode"` EnableVoiceBroadcast bool `json:"enableVoiceBroadcast"` OutboundPrepay bool `json:"outboundPrepay"` Enable247Dialing bool `json:"enable247Dialing"` EnableFifo bool `json:"enableFifo"` EnableChat bool `json:"enableChat"` EnableInbound bool `json:"enableInbound"` EnableOutbound bool `json:"enableOutbound"` EnableVisualIvr bool `json:"enableVisualIvr"` EnableTracking bool `json:"enableTracking"` EnableCloudRouting bool `json:"enableCloudRouting"` UsePowerBy bool `json:"usePowerBy"` EnableAgentRankRouting bool `json:"enableAgentRankRouting"` EnableHciDialer bool `json:"enableHciDialer"` EnableTcpaSafeMachineDetect bool `json:"enableTcpaSafeMachineDetect"` EmailFromAddress string `json:"emailFromAddress"` DatabaseShardID string `json:"databaseShardId"` DefaultOutdialServerGroupID int64 `json:"defaultOutdialServerGroupId"` DefaultIntellidialServerID int64 `json:"defaultIntellidialServerId"` RcAccountAccess string `json:"rcAccountAccess"` EnableGoodData bool `json:"enableGoodData"` MainAccountName string `json:"mainAccountName"` }
type ClientLite ¶
func NewClientLite ¶
func NewClientLite(serverURL, accountID, token string) ClientLite
func (*ClientLite) LoadHTTPClient ¶
func (lite *ClientLite) LoadHTTPClient(token string)
func (*ClientLite) Tokens ¶
func (lite *ClientLite) Tokens() ([]string, error)
type EngageCredentials ¶
type EngageCredentials struct { Credentials goauth.Credentials EngageToken EngageToken }
func NewEngageCredentialsJSON ¶
func NewEngageCredentialsJSON(rcCredentialsJSON []byte) (EngageCredentials, error)
func (*EngageCredentials) LoadNewTokens ¶
func (ec *EngageCredentials) LoadNewTokens() error
type EngageToken ¶
type EngageToken struct { AccessToken string `json:"accessToken"` TokenType string `json:"tokenType"` }
func RcToEvToken ¶
func RcToEvToken(rctoken string) (EngageToken, error)
type LoginError ¶
type LoginSuccess ¶
type LoginSuccess struct { AuthToken string `json:"authToken"` PlatformHost string `json:"platformHost"` Accounts []Account `json:"accounts"` }
func GenerateAPIToken ¶
func GenerateAPIToken(username, password string) (string, *LoginSuccess, error)
type User ¶
type User struct { UserID int64 `json:"userId"` UserName string `json:"userName"` FirstName string `json:"firstName"` LastName string `json:"lastName"` FullName string `json:"fullName"` CreationDate time.Time `json:"creationDate"` Enabled bool `json:"enabled"` ParentPath string `json:"parentPath"` RcUserID string `json:"rcUserId"` Roles []Role `json:"roles"` RootUser bool `json:"rootUser"` }
Click to show internal directories.
Click to hide internal directories.