common

package
v1.1.518 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTimeout = 60 * time.Second

DefaultTimeout for HTTP Requests

View Source
const LibraryVersion = "0.0.1"

LibraryVersion lists current sleet version following Semantic Versioning

Variables

This section is empty.

Functions

func DefaultHttpClient

func DefaultHttpClient() *http.Client

DefaultHttpClient returns an http client with defaultTimeout specified above

func SPtr added in v1.0.252

func SPtr(s string) *string

SPtr returns a pointer to the string value s

func SafeStr

func SafeStr(s *string) string

SafeStr safely dereferences a string pointer and returns its value if it is non-nil, or the empty string if it is nil.

func UserAgent

func UserAgent() string

UserAgent specifies the Sleet library and version for PsPs that require this header

Types

type Environment added in v1.0.317

type Environment string

Environment provides a common way of interacting with Sleet's PsP Sandbox refers to non-live, typically test accounts and Production to live accounts Done at the Sleet level to avoid clients having to import Payment specific data

const (
	Sandbox    Environment = "sandbox"
	Production Environment = "production"
)

Only sandbox and production environments are supported

Jump to

Keyboard shortcuts

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