Documentation
¶
Index ¶
- Constants
- func MustGetTestKey() string
- func PaginateURL(path string, count, offset int) string
- type Client
- func (c *Client) Call(method, path string, body, v interface{}) error
- func (c *Client) CheckBalance() (response.Response, error)
- func (c *Client) GetSessionTimeout() (response.Response, error)
- func (c *Client) ResolveCardBIN(bin int) (response.Response, error)
- func (c *Client) UpdateSessionTimeout(timeout int) (response.Response, error)
- type DefaultPaystackService
- type Logger
- type Metadata
- type Service
Constants ¶
View Source
const ( // DefaultHTTPTimeout defaultHTTPTimeout is the default timeout on the http Client DefaultHTTPTimeout = 60 * time.Second // base URL for all Paystack API requests BaseURL = "https://api.paystack.co" )
Variables ¶
This section is empty.
Functions ¶
func MustGetTestKey ¶
func MustGetTestKey() string
Types ¶
type Client ¶
type Client struct { Client *http.Client // HTTP Client used to communicate with the API. // the API Key used to authenticate all Paystack API requests Key string BaseURL *url.URL LoggingEnabled bool Log Logger // contains filtered or unexported fields }
Client manages communication with the Paystack API
func (*Client) CheckBalance ¶
CheckBalance docs https://developers.paystack.co/v1.0/reference#resolve-card-bin
func (*Client) GetSessionTimeout ¶
GetSessionTimeout fetches payment session timeout
func (*Client) ResolveCardBIN ¶
ResolveCardBIN docs https://developers.paystack.co/v1.0/reference#resolve-card-bin
type DefaultPaystackService ¶
type DefaultPaystackService struct {
Client *Client
}
type Logger ¶
type Logger interface {
Printf(format string, v ...interface{})
}
Logger interface for custom loggers
type Metadata ¶
type Metadata map[string]interface{}
Metadata is an key-value pairs added to Paystack API requests
type Service ¶
type Service interface { Call(method, path string, body, v interface{}) error ResolveCardBIN(bin int) (response.Response, error) CheckBalance() (response.Response, error) GetSessionTimeout() (response.Response, error) UpdateSessionTimeout(timeout int) (response.Response, error) // contains filtered or unexported methods }
Click to show internal directories.
Click to hide internal directories.