Documentation ¶
Index ¶
- Constants
- func Bool(v bool) *bool
- func BoolMap(src map[string]bool) map[string]*bool
- func BoolSlice(src []bool) []*bool
- func BoolValue(v *bool) bool
- func BoolValueMap(src map[string]*bool) map[string]bool
- func BoolValueSlice(src []*bool) []bool
- func DefaultBaseURL() *url.URL
- func DefaultContentType() string
- func DefaultHTTPClient() *http.Client
- func DefaultTransport() *http.Transport
- func DefaultUserAgent() string
- func Float64(v float64) *float64
- func Float64Map(src map[string]float64) map[string]*float64
- func Float64Slice(src []float64) []*float64
- func Float64Value(v *float64) float64
- func Float64ValueMap(src map[string]*float64) map[string]float64
- func Float64ValueSlice(src []*float64) []float64
- func Int(v int) *int
- func Int64(v int64) *int64
- func Int64Map(src map[string]int64) map[string]*int64
- func Int64Slice(src []int64) []*int64
- func Int64Value(v *int64) int64
- func Int64ValueMap(src map[string]*int64) map[string]int64
- func Int64ValueSlice(src []*int64) []int64
- func IntMap(src map[string]int) map[string]*int
- func IntSlice(src []int) []*int
- func IntValue(v *int) int
- func IntValueMap(src map[string]*int) map[string]int
- func IntValueSlice(src []*int) []int
- func String(v string) *string
- func StringMap(src map[string]string) map[string]*string
- func StringSlice(src []string) []*string
- func StringValue(v *string) string
- func StringValueMap(src map[string]*string) map[string]string
- func StringValueSlice(src []*string) []string
- func Time(v time.Time) *time.Time
- func TimeMap(src map[string]time.Time) map[string]*time.Time
- func TimeSlice(src []time.Time) []*time.Time
- func TimeValue(v *time.Time) time.Time
- func TimeValueMap(src map[string]*time.Time) map[string]time.Time
- func TimeValueSlice(src []*time.Time) []time.Time
- type Config
- func (c *Config) Merge(cfgs ...*Config)
- func (c *Config) WithBaseURL(rawurl string) *Config
- func (c *Config) WithContentType(ct string) *Config
- func (c *Config) WithCredentials(creds *credentials.Credentials) *Config
- func (c *Config) WithHTTPClient(client *http.Client) *Config
- func (c *Config) WithLogger(logger log.Logger) *Config
- func (c *Config) WithUserAgent(ua string) *Config
Constants ¶
const SDKName = "spotinst-sdk-go"
SDKName is the name of the SDK.
const SDKVersion = "1.363.0"
SDKVersion is the current version of the SDK.
Variables ¶
This section is empty.
Functions ¶
func BoolValue ¶
BoolValue returns the value of the bool pointer passed in or false if the pointer is nil.
func BoolValueMap ¶
BoolValueMap converts a string map of bool pointers into a string map of bool values
func BoolValueSlice ¶
BoolValueSlice converts a slice of bool pointers into a slice of bool values
func DefaultContentType ¶ added in v1.39.1
func DefaultContentType() string
DefaultContentType returns the default Content-Type header.
func DefaultHTTPClient ¶
DefaultHTTPClient returns a new http.Client with similar default values to http.Client, but with a non-shared Transport, idle connections disabled, and KeepAlives disabled.
func DefaultTransport ¶
DefaultTransport returns a new http.Transport with similar default values to http.DefaultTransport. Do not use this for transient transports as it can leak file descriptors over time. Only use this for transports that will be re-used for the same host(s).
func DefaultUserAgent ¶ added in v1.39.0
func DefaultUserAgent() string
DefaultUserAgent returns the default User-Agent header.
func Float64Map ¶
Float64Map converts a string map of float64 values into a string map of float64 pointers.
func Float64Slice ¶
Float64Slice converts a slice of float64 values into a slice of float64 pointers.
func Float64Value ¶
Float64Value returns the value of the float64 pointer passed in or 0 if the pointer is nil.
func Float64ValueMap ¶
Float64ValueMap converts a string map of float64 pointers into a string map of float64 values.
func Float64ValueSlice ¶
Float64ValueSlice converts a slice of float64 pointers into a slice of float64 values.
func Int64Slice ¶
Int64Slice converts a slice of int64 values into a slice of int64 pointers.
func Int64Value ¶
Int64Value returns the value of the int64 pointer passed in or 0 if the pointer is nil.
func Int64ValueMap ¶
Int64ValueMap converts a string map of int64 pointers into a string map of int64 values.
func Int64ValueSlice ¶
Int64ValueSlice converts a slice of int64 pointers into a slice of int64 values.
func IntValueMap ¶
IntValueMap converts a string map of int pointers into a string map of int values.
func IntValueSlice ¶
IntValueSlice converts a slice of int pointers into a slice of int values.
func StringMap ¶
StringMap converts a string map of string values into a string map of string pointers
func StringSlice ¶
StringSlice converts a slice of string values into a slice of string pointers
func StringValue ¶
StringValue returns the value of the string pointer passed in or "" if the pointer is nil.
func StringValueMap ¶
StringValueMap converts a string map of string pointers into a string map of string values
func StringValueSlice ¶
StringValueSlice converts a slice of string pointers into a slice of string values
func TimeMap ¶
TimeMap converts a string map of time.Time values into a string map of time.Time pointers.
func TimeValue ¶
TimeValue returns the value of the time.Time pointer passed in or time.Time{} if the pointer is nil.
func TimeValueMap ¶
TimeValueMap converts a string map of time.Time pointers into a string map of time.Time values.
Types ¶
type Config ¶
type Config struct { // The base URL the SDK's HTTP client will use when invoking HTTP requests. BaseURL *url.URL // The HTTP Client the SDK's API clients will use to invoke HTTP requests. // // Defaults to a DefaultHTTPClient allowing API clients to create copies of // the HTTP client for service specific customizations. HTTPClient *http.Client // The credentials object to use when signing requests. // // Defaults to a chain of credential providers to search for credentials in // environment variables and shared credential file. Credentials *credentials.Credentials // The logger writer interface to write logging messages to. // // Defaults to standard out. Logger log.Logger // The User-Agent and Content-Type HTTP headers to set when invoking HTTP // requests. UserAgent, ContentType string }
A Config provides Configuration to a service client instance.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns a default configuration for the client. By default this will pool and reuse idle connections to API. If you have a long-lived client object, this is the desired behavior and should make the most efficient use of the connections to API.
func (*Config) WithBaseURL ¶
WithBaseURL defines the base URL of the Spotinst API.
func (*Config) WithContentType ¶
WithContentType defines the content type.
func (*Config) WithCredentials ¶
func (c *Config) WithCredentials(creds *credentials.Credentials) *Config
WithCredentials defines the credentials.
func (*Config) WithHTTPClient ¶
WithHTTPClient defines the HTTP client.
func (*Config) WithLogger ¶
WithLogger defines the logger for informational messages, e.g. requests and their response times. It is nil by default.
func (*Config) WithUserAgent ¶
WithUserAgent defines the user agent.
Directories ¶
Path | Synopsis |
---|---|
util
|
|
uritemplates
Package uritemplates is a level 4 implementation of RFC 6570 (URI Template, http://tools.ietf.org/html/rfc6570).
|
Package uritemplates is a level 4 implementation of RFC 6570 (URI Template, http://tools.ietf.org/html/rfc6570). |