ovh

package
v0.0.0-...-e5adc05 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2017 License: BSD-3-Clause Imports: 17 Imported by: 22

Documentation

Overview

Package ovh provides a HTTP wrapper for the OVH API.

Index

Constants

View Source
const (
	OvhEU        = "https://eu.api.ovh.com/1.0"
	OvhCA        = "https://ca.api.ovh.com/1.0"
	KimsufiEU    = "https://eu.api.kimsufi.com/1.0"
	KimsufiCA    = "https://ca.api.kimsufi.com/1.0"
	SoyoustartEU = "https://eu.api.soyoustart.com/1.0"
	SoyoustartCA = "https://ca.api.soyoustart.com/1.0"
	RunaboveCA   = "https://api.runabove.com/1.0"
)

Endpoints

View Source
const (
	// CustomerInterface is the URL of the customer interface, for error messages
	CustomerInterface = "https://www.ovh.com/manager/cloud/index.html"
)
View Source
const DefaultTimeout = 180 * time.Second

DefaultTimeout api requests after 180s

Variables

View Source
var (
	ReadOnly      = []string{"GET"}
	ReadWrite     = []string{"GET", "POST", "PUT", "DELETE"}
	ReadWriteSafe = []string{"GET", "POST", "PUT"}
)

Map user friendly access level names to corresponding HTTP verbs

View Source
var Endpoints = map[string]string{
	"ovh-eu":        OvhEU,
	"ovh-ca":        OvhCA,
	"kimsufi-eu":    KimsufiEU,
	"kimsufi-ca":    KimsufiCA,
	"soyoustart-eu": SoyoustartEU,
	"soyoustart-ca": SoyoustartCA,
	"runabove-ca":   RunaboveCA,
}

Endpoints conveniently maps endpoints names to their URI for external configuration

View Source
var (
	ErrAPIDown = errors.New("go-vh: the OVH API is down, it does't respond to /time anymore")
)

Errors

Functions

This section is empty.

Types

type APIError

type APIError struct {
	// Error message.
	Message string
	// HTTP code.
	Code int
	// ID of the request
	QueryID string
}

APIError represents an error that can occurred while calling the API.

func (*APIError) Error

func (err *APIError) Error() string

type AccessRule

type AccessRule struct {
	// Allowed HTTP Method for the requested AccessRule.
	// Can be set to GET/POST/PUT/DELETE.
	Method string `json:"method"`
	// Allowed path.
	// Can be an exact string or a string with '*' char.
	// Example :
	// 		/me : only /me is authorized
	//		/* : all calls are authorized
	Path string `json:"path"`
}

AccessRule represents a method allowed for a path

type CkRequest

type CkRequest struct {
	AccessRules []AccessRule `json:"accessRules"`
	Redirection string       `json:"redirection,omitempty"`
	// contains filtered or unexported fields
}

CkRequest represents the parameters to fill in order to ask a new consumerKey.

func (*CkRequest) AddRecursiveRules

func (ck *CkRequest) AddRecursiveRules(methods []string, path string)

AddRecursiveRules adds grant requests on "path" and "path/*", for all methods "ReadOnly", "ReadWrite" and "ReadWriteSafe" should be used for "methods" unless specific access are required.

func (*CkRequest) AddRule

func (ck *CkRequest) AddRule(method, path string)

AddRule adds a new rule to the ckRequest

func (*CkRequest) AddRules

func (ck *CkRequest) AddRules(methods []string, path string)

AddRules adds grant requests on "path" for all methods. "ReadOnly", "ReadWrite" and "ReadWriteSafe" should be used for "methods" unless specific access are required.

func (*CkRequest) Do

func (ck *CkRequest) Do() (*CkValidationState, error)

Do executes the request. On success, set the consumer key in the client and return the URL the user needs to visit to validate the key

type CkValidationState

type CkValidationState struct {
	// Consumer key, which need to be validated by customer.
	ConsumerKey string `json:"consumerKey"`
	// Current status, should be always "pendingValidation".
	State string `json:"state"`
	// URL to redirect user in order to log in.
	ValidationURL string `json:"validationUrl"`
}

CkValidationState represents the response when asking a new consumerKey.

func (*CkValidationState) String

func (ck *CkValidationState) String() string

type Client

type Client struct {
	// Self generated tokens. Create one by visiting
	// https://eu.api.ovh.com/createApp/
	// AppKey holds the Application key
	AppKey string

	// AppSecret holds the Application secret key
	AppSecret string

	// ConsumerKey holds the user/app specific token. It must have been validated before use.
	ConsumerKey string

	// Client is the underlying HTTP client used to run the requests. It may be overloaded but a default one is instanciated in “NewClient“ by default.
	Client *http.Client

	Timeout time.Duration
	// contains filtered or unexported fields
}

Client represents a client to call the OVH API

func NewClient

func NewClient(endpoint, appKey, appSecret, consumerKey string) (*Client, error)

NewClient represents a new client to call the API

func NewDefaultClient

func NewDefaultClient() (*Client, error)

NewDefaultClient will load all it's parameter from environment or configuration files

func NewEndpointClient

func NewEndpointClient(endpoint string) (*Client, error)

NewEndpointClient will create an API client for specified endpoint and load all credentials from environment or configuration files

func (*Client) CallAPI

func (c *Client) CallAPI(method, path string, reqBody, resType interface{}, needAuth bool) error

CallAPI is the lowest level call helper. If needAuth is true, inject authentication headers and sign the request.

Request signature is a sha1 hash on following fields, joined by '+': - applicationSecret (from Client instance) - consumerKey (from Client instance) - capitalized method (from arguments) - full request url, including any query string argument - full serialized request body - server current time (takes time delta into account)

Call will automatically assemble the target url from the endpoint configured in the client instance and the path argument. If the reqBody argument is not nil, it will also serialize it as json and inject the required Content-Type header.

If everyrthing went fine, unmarshall response into resType and return nil otherwise, return the error

func (*Client) CloudCreateInstance

func (c *Client) CloudCreateInstance(projectID, name, pubkeyID, flavorID, imageID, region string) (instance *types.CloudInstance, err error)

CloudCreateInstance start a new public cloud instance and returns resulting object

func (*Client) CloudCreateNetworkPrivate

func (c *Client) CloudCreateNetworkPrivate(projectID, name, regions string, vlanid int64) (net *types.CloudNetwork, err error)

CloudCreateNetworkPrivate create a private network in a vrack func (c *Client) CloudCreateNetworkPrivate(projectID, name string, regions []types.CloudRegionDetail, vlanid int) (net *types.CloudNetwork, err error) {

func (*Client) CloudDeleteInstance

func (c *Client) CloudDeleteInstance(projectID, instanceID string) error

CloudDeleteInstance stops and destroys a public cloud instance

func (*Client) CloudGetInstance

func (c *Client) CloudGetInstance(projectID, instanceID string) (instance *types.CloudInstance, err error)

CloudGetInstance finds a VM instance given a name or an ID

func (*Client) CloudInfoInstance

func (c *Client) CloudInfoInstance(projectID, instanceID string) (*types.CloudInstance, error)

CloudInfoInstance give info about cloud instance

func (*Client) CloudInfoNetworkPrivate

func (c *Client) CloudInfoNetworkPrivate(projectID string) ([]types.CloudNetwork, error)

CloudInfoNetworkPrivate return the list of a private network by given a project id

func (*Client) CloudInfoNetworkPublic

func (c *Client) CloudInfoNetworkPublic(projectID string) ([]types.CloudNetwork, error)

CloudInfoNetworkPublic return the list of a public network by given a project id

func (*Client) CloudInfoRegion

func (c *Client) CloudInfoRegion(projectID, regionName string) (*types.CloudRegionDetail, error)

CloudInfoRegion return services status on a region

func (*Client) CloudListInstance

func (c *Client) CloudListInstance(projectID string) ([]types.CloudInstance, error)

CloudListInstance show cloud instance(s)

func (*Client) CloudListRegions

func (c *Client) CloudListRegions(projectID string) ([]types.CloudRegionDetail, error)

CloudListRegions return a list of network regions

func (*Client) CloudProjectFlavorsList

func (c *Client) CloudProjectFlavorsList(projectID, region string) ([]types.CloudFlavor, error)

CloudProjectFlavorsList returns the list of flavors by given a project id

func (*Client) CloudProjectImagesList

func (c *Client) CloudProjectImagesList(projectID, region string) ([]types.CloudImage, error)

CloudProjectImagesList returns the list of images by given a project id

func (*Client) CloudProjectImagesSearch

func (c *Client) CloudProjectImagesSearch(projectID string, region string, terms ...string) ([]types.CloudImage, error)

CloudProjectImagesSearch returns the list of images matching terms

func (*Client) CloudProjectInfoByID

func (c *Client) CloudProjectInfoByID(projectID string) (*types.CloudProject, error)

CloudProjectInfoByID return the details of a project given a project id

func (*Client) CloudProjectInfoByName

func (c *Client) CloudProjectInfoByName(projectDescription string) (project *types.CloudProject, err error)

CloudProjectInfoByName returns the details of a project given its name.

func (*Client) CloudProjectRegionList

func (c *Client) CloudProjectRegionList(projectID string) ([]string, error)

CloudProjectRegionList return the region by given a project id

func (*Client) CloudProjectSSHKeyCreate

func (c *Client) CloudProjectSSHKeyCreate(projectID, publicKey, name string) (types.CloudSSHKey, error)

CloudProjectSSHKeyCreate return the list of users by given a project id

func (*Client) CloudProjectSSHKeyDelete

func (c *Client) CloudProjectSSHKeyDelete(projectID, sshkeyID string) error

CloudProjectSSHKeyDelete delete a ssh key

func (*Client) CloudProjectSSHKeyInfo

func (c *Client) CloudProjectSSHKeyInfo(projectID, sshkeyID string) (*types.CloudSSHKey, error)

CloudProjectSSHKeyInfo return info about a ssh keys

func (*Client) CloudProjectSSHKeyList

func (c *Client) CloudProjectSSHKeyList(projectID string) ([]types.CloudSSHKey, error)

CloudProjectSSHKeyList return the list of ssh keys by given a project id

func (*Client) CloudProjectSnapshotsList

func (c *Client) CloudProjectSnapshotsList(projectID, region string) ([]types.CloudImage, error)

CloudProjectSnapshotsList returns the list of snapshots by given a project id

func (*Client) CloudProjectUserCreate

func (c *Client) CloudProjectUserCreate(projectID, description string) (types.CloudUser, error)

CloudProjectUserCreate return the list of users by given a project id

func (*Client) CloudProjectUsersList

func (c *Client) CloudProjectUsersList(projectID string) ([]types.CloudUser, error)

CloudProjectUsersList return the list of users by given a project id

func (*Client) CloudProjectsList

func (c *Client) CloudProjectsList() ([]types.CloudProject, error)

CloudProjectsList returns a list of string project ID

func (*Client) ContainersServiceInfo

func (c *Client) ContainersServiceInfo(containersName string) (*types.DockerStack, error)

ContainersServiceInfo retrieve all infos of one of your containers

func (*Client) ContainersServicesList

func (c *Client) ContainersServicesList(withDetails bool) ([]types.DockerStack, error)

ContainersServicesList list all your containers

func (*Client) DBaasQueueAppInfo

func (c *Client) DBaasQueueAppInfo(serviceName string) (*types.DBaasQueueApp, error)

DBaasQueueAppInfo retrieve all infos of one of your apps

func (*Client) DBaasQueueAppInfoByName

func (c *Client) DBaasQueueAppInfoByName(name string) (*types.DBaasQueueApp, error)

DBaasQueueAppInfoByName retrieve all infos of one of your apps

func (*Client) DBaasQueueAppList

func (c *Client) DBaasQueueAppList(withDetails bool) ([]types.DBaasQueueApp, error)

DBaasQueueAppList list all your app

func (*Client) DBaasQueueAppServiceInfo

func (c *Client) DBaasQueueAppServiceInfo(serviceName string) (*types.ServicesService, error)

DBaasQueueAppServiceInfo retrieve all infos of one of your apps

func (*Client) DBaasQueueKeyInfo

func (c *Client) DBaasQueueKeyInfo(serviceName, keyID string) (*types.DBaasQueueKey, error)

DBaasQueueKeyInfo retrieves all infos of one of your apps

func (*Client) DBaasQueueKeyList

func (c *Client) DBaasQueueKeyList(serviceName string, withDetails bool) ([]types.DBaasQueueKey, error)

DBaasQueueKeyList list all key on a service

func (*Client) DBaasQueueMetricsAccount

func (c *Client) DBaasQueueMetricsAccount(serviceName string) (*types.DBaasQueueMetricsAccount, error)

DBaasQueueMetricsAccount retrieve all infos of one of your apps

func (*Client) DBaasQueueRegionInfo

func (c *Client) DBaasQueueRegionInfo(serviceName, regionID string) (*types.DBaasQueueRegion, error)

DBaasQueueRegionInfo retrieves all infos of one region on a service

func (*Client) DBaasQueueRegionList

func (c *Client) DBaasQueueRegionList(serviceName string, withDetails bool) ([]types.DBaasQueueRegion, error)

DBaasQueueRegionList list all region on a service

func (*Client) DBaasQueueRoleInfo

func (c *Client) DBaasQueueRoleInfo(serviceName, roleID string) (*types.DBaasQueueRole, error)

DBaasQueueRoleInfo retrieves all infos of one role on a service

func (*Client) DBaasQueueRoleList

func (c *Client) DBaasQueueRoleList(serviceName string, withDetails bool) ([]types.DBaasQueueRole, error)

DBaasQueueRoleList list all roles on a service

func (*Client) DBaasQueueTopicInfo

func (c *Client) DBaasQueueTopicInfo(serviceName, topicID string) (*types.DBaasQueueTopic, error)

DBaasQueueTopicInfo retrieves all infos of one topic on a service

func (*Client) DBaasQueueTopicList

func (c *Client) DBaasQueueTopicList(serviceName string, withDetails bool) ([]types.DBaasQueueTopic, error)

DBaasQueueTopicList list all topics on a service

func (*Client) DBaasQueueUserChangePassword

func (c *Client) DBaasQueueUserChangePassword(serviceName, userID string) (*types.DBaasQueueUser, error)

DBaasQueueUserChangePassword reset user password

func (*Client) DBaasQueueUserInfo

func (c *Client) DBaasQueueUserInfo(serviceName, userID string) (*types.DBaasQueueUser, error)

DBaasQueueUserInfo retrieve all infos of one user of your apps

func (*Client) DBaasQueueUserList

func (c *Client) DBaasQueueUserList(serviceName string, withDetails bool) ([]types.DBaasQueueUser, error)

DBaasQueueUserList list all users on a service

func (*Client) Delete

func (c *Client) Delete(url string, resType interface{}) error

Delete is a wrapper for the DELETE method

func (*Client) DeleteUnAuth

func (c *Client) DeleteUnAuth(url string, resType interface{}) error

DeleteUnAuth is a wrapper for the unauthenticated DELETE method

func (*Client) DomainInfo

func (c *Client) DomainInfo(domainName string) (*types.Domain, error)

DomainInfo retrieve all infos of one of your domains

func (*Client) DomainList

func (c *Client) DomainList(withDetails bool) ([]types.Domain, error)

DomainList list all your domain

func (*Client) Get

func (c *Client) Get(url string, resType interface{}) error

Get is a wrapper for the GET method

func (*Client) GetUnAuth

func (c *Client) GetUnAuth(url string, resType interface{}) error

GetUnAuth is a wrapper for the unauthenticated GET method

func (*Client) NewCkRequest

func (c *Client) NewCkRequest() *CkRequest

NewCkRequest helps create a new ck request

func (*Client) NewCkRequestWithRedirection

func (c *Client) NewCkRequestWithRedirection(redirection string) *CkRequest

NewCkRequestWithRedirection helps create a new ck request with a redirect URL

func (*Client) OrderAddCartServiceOption

func (c *Client) OrderAddCartServiceOption(domain string, orderCartServiceOptionDomainPost types.OrderCartServiceOptionDomainPost) (*types.OrderCartItem, error)

OrderAddCartServiceOption add a service options on your cart

func (*Client) OrderAddProductDomain

func (c *Client) OrderAddProductDomain(cartID string, orderCartDomainPost types.OrderCartDomainPost) (*types.OrderCartItem, error)

OrderAddProductDomain post a new domain in your cart

func (*Client) OrderAddProductDomainOption

func (c *Client) OrderAddProductDomainOption(cartID string, orderPostDomainOptionReq types.OrderCartDomainOptionsPost) (*types.OrderCartItem, error)

OrderAddProductDomainOption post an option on a domain item

func (*Client) OrderAddProductDomainTransfer

func (c *Client) OrderAddProductDomainTransfer(cartID string, orderCartDomainTransferPost types.OrderCartDomainTransferPost) (*types.OrderCartItem, error)

OrderAddProductDomainTransfer post a new domain transfer in your cart

func (*Client) OrderAddProductDomainTransferOption

func (c *Client) OrderAddProductDomainTransferOption(cartID string, orderCartDomainTransferOptionsPost types.OrderCartDomainTransferOptionsPost) (*types.OrderCartItem, error)

OrderAddProductDomainTransferOption post an option on a domain transfer item

func (*Client) OrderAddProductWebHosting

func (c *Client) OrderAddProductWebHosting(cartID string, orderCartWebHostingPost types.OrderCartWebHostingPost) (*types.OrderCartItem, error)

OrderAddProductWebHosting post a new webHosting product in your cart

func (*Client) OrderAssignCart

func (c *Client) OrderAssignCart(cartID string) error

OrderAssignCart assign to connected user a cart

func (*Client) OrderCartAddConfiguration

func (c *Client) OrderCartAddConfiguration(cartID string, itemID int64, label string, value string) (*types.OrderCartItem, error)

OrderCartAddConfiguration add a configuration on an item

func (*Client) OrderCartConfigurationInfo

func (c *Client) OrderCartConfigurationInfo(cartID string, itemID int64, configID int64) (*types.OrderCartConfigurationItem, error)

OrderCartConfigurationInfo get a configuration for an item

func (*Client) OrderCartConfigurationsList

func (c *Client) OrderCartConfigurationsList(cartID string, itemID int64) ([]types.OrderCartConfigurationItem, error)

OrderCartConfigurationsList list all configurations for an item

func (*Client) OrderCartDeleteConfiguration

func (c *Client) OrderCartDeleteConfiguration(cartID string, itemID int64, configID int64) (*types.OrderCartItem, error)

OrderCartDeleteConfiguration remove a configuration from an item

func (*Client) OrderCartInfo

func (c *Client) OrderCartInfo(cartID string) (*types.OrderCart, error)

OrderCartInfo retrieve all infos of one of your cart

func (*Client) OrderCartItemInfo

func (c *Client) OrderCartItemInfo(cartID string, itemID int64) (*types.OrderCartItem, error)

OrderCartItemInfo retrieve info of a cart item

func (*Client) OrderCartItemList

func (c *Client) OrderCartItemList(cartID string) ([]types.OrderCartItem, error)

OrderCartItemList list all items in your cart

func (*Client) OrderCartList

func (c *Client) OrderCartList() ([]types.OrderCart, error)

OrderCartList list all your cart

func (*Client) OrderCartRequiredConfigurations

func (c *Client) OrderCartRequiredConfigurations(cartID string, itemID int64) ([]types.OrderCartConfigurationRequirements, error)

OrderCartRequiredConfigurations get required configurations for an item

func (*Client) OrderCreateCart

func (c *Client) OrderCreateCart(cartCreateReq types.OrderCartPost) (*types.OrderCart, error)

OrderCreateCart create a new cart

func (*Client) OrderDeleteCart

func (c *Client) OrderDeleteCart(cartID string) error

OrderDeleteCart delete a cart

func (*Client) OrderDeleteCartItem

func (c *Client) OrderDeleteCartItem(cartID string, itemID int64) (*types.OrderCartItem, error)

OrderDeleteCartItem delete a cart item

func (*Client) OrderGetCartServiceOptions

func (c *Client) OrderGetCartServiceOptions(domain string) ([]types.OrderCartGenericOptionDefinition, error)

OrderGetCartServiceOptions get service options on a domain

func (*Client) OrderGetCheckoutCart

func (c *Client) OrderGetCheckoutCart(cartID string) (*types.Order, error)

OrderGetCheckoutCart get prices and contracts information for your cart

func (*Client) OrderGetProductDomainOptions

func (c *Client) OrderGetProductDomainOptions(cartID string, domain string) ([]types.OrderCartGenericOptionDefinition, error)

OrderGetProductDomainOptions get informations about a domain name options

func (*Client) OrderGetProductDomainPacks

func (c *Client) OrderGetProductDomainPacks(cartID string, domain string) ([]types.OrderCartDomainPacksProductInformation, error)

OrderGetProductDomainPacks get informations about domain packs

func (*Client) OrderGetProductDomainRestore

func (c *Client) OrderGetProductDomainRestore(cartID string, domain string) ([]types.OrderCartGenericProductDefinition, error)

OrderGetProductDomainRestore get products for a domain restore

func (*Client) OrderGetProductDomainTransfer

func (c *Client) OrderGetProductDomainTransfer(cartID string, domain string) ([]types.OrderCartProductInformation, error)

OrderGetProductDomainTransfer get informations about a domain transfer

func (*Client) OrderGetProductDomainTransferOptions

func (c *Client) OrderGetProductDomainTransferOptions(cartID string, domain string) ([]types.OrderCartGenericOptionDefinition, error)

OrderGetProductDomainTransferOptions get informations about domain name transfer options

func (*Client) OrderGetProductsDomain

func (c *Client) OrderGetProductsDomain(cartID string, domain string) ([]types.OrderCartProductInformation, error)

OrderGetProductsDomain get products about a domain name

func (*Client) OrderPostCheckoutCart

func (c *Client) OrderPostCheckoutCart(cartID string, waiveRetractationPeriod bool) (*types.Order, error)

OrderPostCheckoutCart validate your shopping and create order

func (*Client) OrderPostProductDomainPacks

func (c *Client) OrderPostProductDomainPacks(cartID string, orderPostDomainPacksReq types.OrderCartDomainPacksPost) (*types.OrderCartItem, error)

OrderPostProductDomainPacks post a new domain packs in your cart

func (*Client) OrderSummaryCart

func (c *Client) OrderSummaryCart(cartID string) (*types.Order, error)

OrderSummaryCart get a summary of your current order

func (*Client) OrderUpdateCart

func (c *Client) OrderUpdateCart(cartID string, cartUpdateReq types.OrderCartPost) (*types.OrderCart, error)

OrderUpdateCart update a cart

func (*Client) OrderUpdateCartItem

func (c *Client) OrderUpdateCartItem(cartID string, itemID int64, duration string, quantity int) (*types.OrderCartItem, error)

OrderUpdateCartItem update a cart item

func (*Client) Ping

func (c *Client) Ping() error

Ping performs a ping to OVH API. In fact, ping is just a /auth/time call, in order to check if API is up.

func (*Client) Post

func (c *Client) Post(url string, reqBody, resType interface{}) error

Post is a wrapper for the POST method

func (*Client) PostUnAuth

func (c *Client) PostUnAuth(url string, reqBody, resType interface{}) error

PostUnAuth is a wrapper for the unauthenticated POST method

func (*Client) Put

func (c *Client) Put(url string, reqBody, resType interface{}) error

Put is a wrapper for the PUT method

func (*Client) PutUnAuth

func (c *Client) PutUnAuth(url string, reqBody, resType interface{}) error

PutUnAuth is a wrapper for the unauthenticated PUT method

func (*Client) TelephonyBillingAccountInfo

func (c *Client) TelephonyBillingAccountInfo(billingAccount string) (*types.TelephonyBillingAccount, error)

TelephonyBillingAccountInfo retrieve all infos of one of your services

func (*Client) TelephonyEasyHuntingInfo

func (c *Client) TelephonyEasyHuntingInfo(billingAccount, serviceName string) (*types.TelephonyEasyHunting, error)

TelephonyEasyHuntingInfo retrieve all infos of one easy hunting service GET /telephony/{billingAccount}/easyHunting/{serviceName}

func (*Client) TelephonyEasyHuntingList

func (c *Client) TelephonyEasyHuntingList(billingAccount string, withDetails bool) ([]types.TelephonyEasyHunting, error)

TelephonyEasyHuntingList list all OVH easy calls queues associated with this billing account GET /telephony/{billingAccount}/easyHunting

func (*Client) TelephonyListBillingAccount

func (c *Client) TelephonyListBillingAccount(withDetails bool) ([]types.TelephonyBillingAccount, error)

TelephonyListBillingAccount list all your telephony services

func (*Client) TelephonyOvhPabxHunting

func (c *Client) TelephonyOvhPabxHunting(billingAccount, serviceName string) (*types.TelephonyOvhPabxHunting, error)

TelephonyOvhPabxHunting retrieves info on OVH Pabx Hunting GET /telephony/{billingAccount}/easyHunting/{serviceName}/hunting

func (*Client) TelephonyOvhPabxHuntingAgentInfo

func (c *Client) TelephonyOvhPabxHuntingAgentInfo(billingAccount, serviceName string, agentID int64) (*types.TelephonyOvhPabxHuntingAgent, error)

TelephonyOvhPabxHuntingAgentInfo gets info from OVH Pabx Hunting Agent GET /telephony/{billingAccount}/easyHunting/{serviceName}/hunting/agent

func (*Client) TelephonyOvhPabxHuntingAgentList

func (c *Client) TelephonyOvhPabxHuntingAgentList(billingAccount, serviceName string, withDetails bool) ([]types.TelephonyOvhPabxHuntingAgent, error)

TelephonyOvhPabxHuntingAgentList list all OVH easy calls queues associated with this billing account GET /telephony/{billingAccount}/easyHunting/{serviceName}/hunting/agent

func (*Client) TelephonyOvhPabxHuntingAgentUpdate

func (c *Client) TelephonyOvhPabxHuntingAgentUpdate(billingAccount, serviceName string, agentID int64, telephonyOvhPabxHuntingAgent types.TelephonyOvhPabxHuntingAgent) (*types.TelephonyOvhPabxHuntingAgent, error)

TelephonyOvhPabxHuntingAgentUpdate update OVH Pabx Hunting Agent PUT /telephony/{billingAccount}/easyHunting/{serviceName}/hunting/agent/{agentId}

func (*Client) Time

func (c *Client) Time() (*time.Time, error)

Time returns time from the OVH API, by asking GET /auth/time.

func (*Client) TimeDelta

func (c *Client) TimeDelta() (time.Duration, error)

TimeDelta represents the delay between the machine that runs the code and the OVH API. The delay shouldn't change, let's do it only once.

func (*Client) VrackInfo

func (c *Client) VrackInfo(vrackName string) (*types.Vrack, error)

VrackInfo ...

func (*Client) VrackList

func (c *Client) VrackList() ([]types.Vrack, error)

VrackList ...

Jump to

Keyboard shortcuts

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