Documentation
¶
Index ¶
- func CreateCommunicatorFromConfiguration(conf *configuration.CommunicatorConfiguration) (*communicator.Communicator, error)
- func CreateCommunicatorWithDefaultMarshaller(apiEndpoint *url.URL, connection communicator.Connection, ...) (*communicator.Communicator, error)
- func CreateOAuth2Configuration(clientID, clientSecret, tokenURI, integrator string) (*configuration.CommunicatorConfiguration, error)
- func FormatDate(date time.Time) string
- func FormatDateTime(dateTime time.Time) string
- func NewBool(value bool) *bool
- func NewCallContext() *communicator.CallContext
- func NewFloat64(value float64) *float64
- func NewInt32(value int32) *int32
- func NewInt64(value int64) *int64
- func NewString(value string) *string
- func ParseDate(date string) (time.Time, error)
- func ParseDateTime(dateTime string) (time.Time, error)
- type Client
- 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(comm *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
- 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 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 CreateOAuth2Configuration ¶
func CreateOAuth2Configuration(clientID, clientSecret, tokenURI, integrator string) (*configuration.CommunicatorConfiguration, error)
CreateOAuth2Configuration creates a CommunicatorConfiguration with default OAuth2 settings and the given clientID, clientSecret and tokenURI
func FormatDate ¶
FormatDate formats a time.Time instance into an ISO date string
func FormatDateTime ¶
FormatDateTime formats a time.Time instance into an ISO date-time string
func NewBool ¶
NewBool returns a pointer for a boolean value. This can be used to assign literals to domain or query parameter objects
func NewCallContext ¶
func NewCallContext() *communicator.CallContext
NewCallContext creates an empty CallContext
func NewFloat64 ¶
NewFloat64 returns a pointer for a float64 value. This can be used to assign literals to domain or query parameter objects
func NewInt32 ¶
NewInt32 returns a pointer for an int32 value. This can be used to assign literals to domain or query parameter objects
func NewInt64 ¶
NewInt64 returns a pointer for an int64 value. This can be used to assign literals to domain or query parameter objects
func NewString ¶
NewString returns a pointer for a string value. This can be used to assign literals to domain or query parameter objects
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the Worldline Acquiring platform client. Thread-safe.
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(comm *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.
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 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 Acquiring 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