Documentation ¶
Index ¶
Constants ¶
const ( // ECX declare ECX API type ECX = iota )
Variables ¶
This section is empty.
Functions ¶
func ReflectStructField ¶
Reflect if an interface is either a struct or a pointer to a struct and has the defined member field, if error is nil, the given FieldName exists and is accessible with reflect.
func ResponseFilter ¶
func ResponseFilter(response ECXAPIResponse, filters map[string]string)
ResponseFilter applies a set of map string filters to a Response and sets the new value to Response items
Types ¶
type APIHandler ¶
type APIHandler interface { Authenticate() error GetToken() (runtime.ClientAuthInfoWriter, error) }
APIHandler implements common Equinix API handlers commands
type ECXAPIPayload ¶
type ECXAPIPayload interface { Get() []interface{} Count() int64 }
type ECXAPIResponse ¶
type EquinixAPIClient ¶
type EquinixAPIClient struct { Buyer *apibuyerclient.GoEcxfabricBuyer Seller *apisellerclient.GoEcxfabricSeller Params *EquinixAPIParams Debug bool // contains filtered or unexported fields }
EquinixAPIClient containing structure for Client, params and apitoken TODO: Implement token refresh
func NewEcxAPIClient ¶
func NewEcxAPIClient(params *EquinixAPIParams, endpoint string, ignoreSSL bool) *EquinixAPIClient
NewEcxAPIClient returns an instantiated ECX client with token
func (*EquinixAPIClient) Authenticate ¶
func (ec *EquinixAPIClient) Authenticate() error
Authenticate tries to authenticate and stores token from remote endpoint
func (*EquinixAPIClient) GetToken ¶
func (ec *EquinixAPIClient) GetToken() (runtime.ClientAuthInfoWriter, error)
GetToken returns local token, if token doesn't exists tries to authenticate and retrieve token