Documentation ¶
Index ¶
- Constants
- Variables
- func Bool(v bool) *bool
- func BoolSlice(v []bool) []*bool
- func BoolValue(v *bool) bool
- func Float64(v float64) *float64
- func Float64Slice(v []float64) []*float64
- func Float64Value(v *float64) float64
- func NewIdempotencyKey() string
- func String(v string) *string
- func StringSlice(v []string) []*string
- func StringValue(v *string) string
- type Config
- type HTTPClient
- type Headers
- type StatusResponse
Constants ¶
View Source
const ClientVersion = "0.0.1"
ClientVersion ...
Variables ¶
View Source
var DefaultConfig = Config{
URI: sandboxURI,
}
DefaultConfig ...
Functions ¶
func BoolValue ¶
BoolValue returns the value of the bool pointer passed in or false if the pointer is nil.
func Float64Slice ¶
Float64Slice returns a slice of float64 pointers given a slice of float64s.
func Float64Value ¶
Float64Value returns the value of the float64 pointer passed in or 0 if the pointer is nil.
func StringSlice ¶
StringSlice returns a slice of string pointers given a slice of strings.
func StringValue ¶
StringValue returns the value of the string pointer passed in or "" if the pointer is nil.
Types ¶
type Config ¶
type Config struct { PublicKey string SecretKey string URI string IdempotencyKey *string CancellationToken string }
Config ...
type HTTPClient ¶
type HTTPClient interface { Get(param string) (*StatusResponse, error) Post(param string, request interface{}) (*StatusResponse, error) Put(param string, request interface{}) (*StatusResponse, error) Patch(param string, request interface{}) (*StatusResponse, error) Delete(param string) (*StatusResponse, error) Upload(param, boundary string, body *bytes.Buffer) (*StatusResponse, error) Download(path string) (*StatusResponse, error) }
HTTPClient ...
type Headers ¶
type Headers struct { CKORequestID *string `json:"cko-request-id,omitempty"` CKOVersion *string `json:"cko-version,omitempty"` }
Headers ...
type StatusResponse ¶
type StatusResponse struct { Status string `json:"status,omitempty"` StatusCode int `json:"status_code,omitempty"` ResponseBody []byte `json:"response_body,omitempty"` ResponseCSV [][]string `json:"response_csv,omitempty"` Headers *Headers `json:"headers,omitempty"` }
StatusResponse ...
Click to show internal directories.
Click to hide internal directories.