Documentation ¶
Index ¶
- func CreateCommunicator(apiKeyID, secretAPIKey, integrator string) (*communicator.Communicator, error)
- func CreateCommunicatorFromConfiguration(conf *configuration.CommunicatorConfiguration) (*communicator.Communicator, error)
- func CreateCommunicatorWithDefaultMarshaller(apiEndpoint *url.URL, connection communicator.Connection, ...) (*communicator.Communicator, error)
- func CreateV1HMACConfiguration(apiKeyID, secretAPIKey, integrator string) (*configuration.CommunicatorConfiguration, error)
- func NewBool(value bool) *bool
- func NewCallContext(idempotenceKey string) *communicator.CallContext
- func NewInt32(value int32) *int32
- func NewInt64(value int64) *int64
- func NewString(value string) *string
- type Client
- func CreateClient(apiKeyID, secretAPIKey, integrator string) (*Client, error)
- func CreateClientFromCommunicator(communicator *communicator.Communicator) (*Client, error)
- func CreateClientFromConfiguration(config *configuration.CommunicatorConfiguration) (*Client, error)
- func CreateClientWithDefaultMarshaller(apiEndpoint *url.URL, connection communicator.Connection, ...) (*Client, error)
- func NewClient(communicator *communicator.Communicator) (*Client, error)
- func (c *Client) Close() error
- func (c *Client) DisableLogging()
- func (c *Client) EnableLogging(communicatorLogger logging.CommunicatorLogger)
- func (c *Client) SetBodyObfuscator(bodyObfuscator obfuscation.BodyObfuscator)
- func (c *Client) SetHeaderObfuscator(headerObfuscator obfuscation.HeaderObfuscator)
- func (c *Client) V1() *apiv1.Client
- func (c *Client) WithClientMetaInfo(clientMetaInfo string) (*Client, error)
- type CommunicatorBuilder
- func (c *CommunicatorBuilder) Build() (*communicator.Communicator, error)
- func (c *CommunicatorBuilder) WithAPIEndpoint(endpoint *url.URL) *CommunicatorBuilder
- func (c *CommunicatorBuilder) WithAuthenticator(auth authentication.Authenticator) *CommunicatorBuilder
- func (c *CommunicatorBuilder) WithConnection(connection communicator.Connection) *CommunicatorBuilder
- func (c *CommunicatorBuilder) WithMarshaller(marshaller json.Marshaller) *CommunicatorBuilder
- func (c *CommunicatorBuilder) WithMetadataProvider(provider *communicator.MetadataProvider) *CommunicatorBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCommunicator ¶
func CreateCommunicator(apiKeyID, secretAPIKey, integrator string) (*communicator.Communicator, error)
CreateCommunicator creates a Communicator with default settings and the given apiKeyID and secretAPIKey
func CreateCommunicatorFromConfiguration ¶
func CreateCommunicatorFromConfiguration(conf *configuration.CommunicatorConfiguration) (*communicator.Communicator, error)
CreateCommunicatorFromConfiguration creates a Communicator with the given CommunicatorConfiguration
func CreateCommunicatorWithDefaultMarshaller ¶
func CreateCommunicatorWithDefaultMarshaller(apiEndpoint *url.URL, connection communicator.Connection, authenticator authentication.Authenticator, metadataProvider *communicator.MetadataProvider) (*communicator.Communicator, error)
CreateCommunicatorWithDefaultMarshaller creates a Communicator with the given components and a default marshaller
func CreateV1HMACConfiguration ¶
func CreateV1HMACConfiguration(apiKeyID, secretAPIKey, integrator string) (*configuration.CommunicatorConfiguration, error)
CreateV1HMACConfiguration creates a CommunicatorConfiguration with default v1HMAC settings and the given apiKeyID and secretAPIKey
func NewBool ¶
NewBool returns a pointer for a boolean value. This can be used to assign literals to domain or query parameter objets
func NewCallContext ¶
func NewCallContext(idempotenceKey string) *communicator.CallContext
NewCallContext creates a CallContext using the given idempotenceKey
func NewInt32 ¶
NewInt32 returns a pointer for an int32 value. This can be used to assign literals to domain or query parameter objets
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the Worldline Global Collect platform client. Thread-safe.
This client and all its child clients are bound to one specific value for the X-GCS-ClientMetaInfo header. To get a new client with a different header value, use WithClientMetaInfo.
func CreateClient ¶
CreateClient creates a Client with the given CommunicatorConfiguration
func CreateClientFromCommunicator ¶
func CreateClientFromCommunicator(communicator *communicator.Communicator) (*Client, error)
CreateClientFromCommunicator creates a Client with the given Communicator
func CreateClientFromConfiguration ¶
func CreateClientFromConfiguration(config *configuration.CommunicatorConfiguration) (*Client, error)
CreateClientFromConfiguration creates a Client with the given CommunicatorConfiguration
func CreateClientWithDefaultMarshaller ¶
func CreateClientWithDefaultMarshaller(apiEndpoint *url.URL, connection communicator.Connection, authenticator authentication.Authenticator, metadataProvider *communicator.MetadataProvider) (*Client, error)
CreateClientWithDefaultMarshaller creates a Client with the given components and a default marshaller
func NewClient ¶
func NewClient(communicator *communicator.Communicator) (*Client, error)
NewClient creates a new Client with the given communicator
func (*Client) EnableLogging ¶
func (c *Client) EnableLogging(communicatorLogger logging.CommunicatorLogger)
EnableLogging turns on logging using the given communicator logger.
func (*Client) SetBodyObfuscator ¶
func (c *Client) SetBodyObfuscator(bodyObfuscator obfuscation.BodyObfuscator)
SetBodyObfuscator sets the body obfuscator to use.
func (*Client) SetHeaderObfuscator ¶
func (c *Client) SetHeaderObfuscator(headerObfuscator obfuscation.HeaderObfuscator)
SetHeaderObfuscator sets the header obfuscator to use.
func (*Client) WithClientMetaInfo ¶
WithClientMetaInfo returns a new Client which uses the passed metadata for the X-GCS-ClientMetaInfo header.
- clientMetaInfo is a JSON string containing the metadata for the client
- can give an error if the given clientMetaInfo is not a valid JSON string
type CommunicatorBuilder ¶
type CommunicatorBuilder struct { APIEndpoint *url.URL Connection communicator.Connection MetadataProvider *communicator.MetadataProvider Authenticator authentication.Authenticator Marshaller json.Marshaller }
CommunicatorBuilder is the builder for Communicator objects
func CreateCommunicatorBuilder ¶
func CreateCommunicatorBuilder(apiKeyID, secretAPIKey, integrator string) (*CommunicatorBuilder, error)
CreateCommunicatorBuilder creates a CommunicatorBuilder with the given CommunicatorConfiguration
func CreateCommunicatorBuilderFromConfiguration ¶
func CreateCommunicatorBuilderFromConfiguration(config *configuration.CommunicatorConfiguration) (*CommunicatorBuilder, error)
CreateCommunicatorBuilderFromConfiguration creates a CommunicatorBuilder with the given CommunicatorConfiguration
func NewCommunicatorBuilder ¶
func NewCommunicatorBuilder() *CommunicatorBuilder
NewCommunicatorBuilder creates a CommunicatorBuilder object
func (*CommunicatorBuilder) Build ¶
func (c *CommunicatorBuilder) Build() (*communicator.Communicator, error)
Build creates a Communicator object based on the builder parameters
func (*CommunicatorBuilder) WithAPIEndpoint ¶
func (c *CommunicatorBuilder) WithAPIEndpoint(endpoint *url.URL) *CommunicatorBuilder
WithAPIEndpoint sets the Worldline Global Collect platform API endpoint to be used by the Communicator
func (*CommunicatorBuilder) WithAuthenticator ¶
func (c *CommunicatorBuilder) WithAuthenticator(auth authentication.Authenticator) *CommunicatorBuilder
WithAuthenticator sets the Authenticator to be used by the Communicator
func (*CommunicatorBuilder) WithConnection ¶
func (c *CommunicatorBuilder) WithConnection(connection communicator.Connection) *CommunicatorBuilder
WithConnection sets the Connection to be used by the Communicator
func (*CommunicatorBuilder) WithMarshaller ¶
func (c *CommunicatorBuilder) WithMarshaller(marshaller json.Marshaller) *CommunicatorBuilder
WithMarshaller sets the Marshaller to be used by the Communicator
func (*CommunicatorBuilder) WithMetadataProvider ¶
func (c *CommunicatorBuilder) WithMetadataProvider(provider *communicator.MetadataProvider) *CommunicatorBuilder
WithMetadataProvider sets the MetadataProvider to be used by the Communicator