Documentation ¶
Overview ¶
Package nifcloud provides core functionality for making requests to NIFCLOUD services.
Index ¶
- Constants
- func Bool(v bool) *bool
- func BoolMap(vs map[string]bool) map[string]*bool
- func BoolSlice(vs []bool) []*bool
- func Byte(v byte) *byte
- func ByteMap(vs map[string]byte) map[string]*byte
- func ByteSlice(vs []byte) []*byte
- func Duration(v time.Duration) *time.Duration
- func DurationMap(vs map[string]time.Duration) map[string]*time.Duration
- func DurationSlice(vs []time.Duration) []*time.Duration
- func Float32(v float32) *float32
- func Float32Map(vs map[string]float32) map[string]*float32
- func Float32Slice(vs []float32) []*float32
- func Float64(v float64) *float64
- func Float64Map(vs map[string]float64) map[string]*float64
- func Float64Slice(vs []float64) []*float64
- func Int(v int) *int
- func Int16(v int16) *int16
- func Int16Map(vs map[string]int16) map[string]*int16
- func Int16Slice(vs []int16) []*int16
- func Int32(v int32) *int32
- func Int32Map(vs map[string]int32) map[string]*int32
- func Int32Slice(vs []int32) []*int32
- func Int64(v int64) *int64
- func Int64Map(vs map[string]int64) map[string]*int64
- func Int64Slice(vs []int64) []*int64
- func Int8(v int8) *int8
- func Int8Map(vs map[string]int8) map[string]*int8
- func Int8Slice(vs []int8) []*int8
- func IntMap(vs map[string]int) map[string]*int
- func IntSlice(vs []int) []*int
- func String(v string) *string
- func StringMap(vs map[string]string) map[string]*string
- func StringSlice(vs []string) []*string
- func Time(v time.Time) *time.Time
- func TimeMap(vs map[string]time.Time) map[string]*time.Time
- func TimeSlice(vs []time.Time) []*time.Time
- func ToBool(p *bool) (v bool)
- func ToBoolMap(vs map[string]*bool) map[string]bool
- func ToBoolSlice(vs []*bool) []bool
- func ToByte(p *byte) (v byte)
- func ToByteMap(vs map[string]*byte) map[string]byte
- func ToByteSlice(vs []*byte) []byte
- func ToDuration(p *time.Duration) (v time.Duration)
- func ToDurationMap(vs map[string]*time.Duration) map[string]time.Duration
- func ToDurationSlice(vs []*time.Duration) []time.Duration
- func ToFloat32(p *float32) (v float32)
- func ToFloat32Map(vs map[string]*float32) map[string]float32
- func ToFloat32Slice(vs []*float32) []float32
- func ToFloat64(p *float64) (v float64)
- func ToFloat64Map(vs map[string]*float64) map[string]float64
- func ToFloat64Slice(vs []*float64) []float64
- func ToInt(p *int) (v int)
- func ToInt16(p *int16) (v int16)
- func ToInt16Map(vs map[string]*int16) map[string]int16
- func ToInt16Slice(vs []*int16) []int16
- func ToInt32(p *int32) (v int32)
- func ToInt32Map(vs map[string]*int32) map[string]int32
- func ToInt32Slice(vs []*int32) []int32
- func ToInt64(p *int64) (v int64)
- func ToInt64Map(vs map[string]*int64) map[string]int64
- func ToInt64Slice(vs []*int64) []int64
- func ToInt8(p *int8) (v int8)
- func ToInt8Map(vs map[string]*int8) map[string]int8
- func ToInt8Slice(vs []*int8) []int8
- func ToIntMap(vs map[string]*int) map[string]int
- func ToIntSlice(vs []*int) []int
- func ToString(p *string) (v string)
- func ToStringMap(vs map[string]*string) map[string]string
- func ToStringSlice(vs []*string) []string
- func ToTime(p *time.Time) (v time.Time)
- func ToTimeMap(vs map[string]*time.Time) map[string]time.Time
- func ToTimeSlice(vs []*time.Time) []time.Time
- func ToUint(p *uint) (v uint)
- func ToUint16(p *uint16) (v uint16)
- func ToUint16Map(vs map[string]*uint16) map[string]uint16
- func ToUint16Slice(vs []*uint16) []uint16
- func ToUint32(p *uint32) (v uint32)
- func ToUint32Map(vs map[string]*uint32) map[string]uint32
- func ToUint32Slice(vs []*uint32) []uint32
- func ToUint64(p *uint64) (v uint64)
- func ToUint64Map(vs map[string]*uint64) map[string]uint64
- func ToUint64Slice(vs []*uint64) []uint64
- func ToUint8(p *uint8) (v uint8)
- func ToUint8Map(vs map[string]*uint8) map[string]uint8
- func ToUint8Slice(vs []*uint8) []uint8
- func ToUintMap(vs map[string]*uint) map[string]uint
- func ToUintSlice(vs []*uint) []uint
- func Uint(v uint) *uint
- func Uint16(v uint16) *uint16
- func Uint16Map(vs map[string]uint16) map[string]*uint16
- func Uint16Slice(vs []uint16) []*uint16
- func Uint32(v uint32) *uint32
- func Uint32Map(vs map[string]uint32) map[string]*uint32
- func Uint32Slice(vs []uint32) []*uint32
- func Uint64(v uint64) *uint64
- func Uint64Map(vs map[string]uint64) map[string]*uint64
- func Uint64Slice(vs []uint64) []*uint64
- func Uint8(v uint8) *uint8
- func Uint8Map(vs map[string]uint8) map[string]*uint8
- func Uint8Slice(vs []uint8) []*uint8
- func UintMap(vs map[string]uint) map[string]*uint
- func UintSlice(vs []uint) []*uint
- type Config
- type StaticCredentialsProvider
Constants ¶
const SDKVersion = goModuleVersion
SDKVersion is the version of this SDK
Variables ¶
This section is empty.
Functions ¶
func ByteSlice ¶ added in v1.14.0
ByteSlice returns a slice of byte pointers from the values passed in.
func Duration ¶ added in v1.14.0
Duration returns a pointer value for the time.Duration value passed in.
func DurationMap ¶ added in v1.14.0
DurationMap returns a map of time.Duration pointers from the values passed in.
func DurationSlice ¶ added in v1.14.0
DurationSlice returns a slice of time.Duration pointers from the values passed in.
func Float32Map ¶
Float32Map returns a map of float32 pointers from the values passed in.
func Float32Slice ¶
Float32Slice returns a slice of float32 pointers from the values passed in.
func Float64Map ¶
Float64Map returns a map of float64 pointers from the values passed in.
func Float64Slice ¶
Float64Slice returns a slice of float64 pointers from the values passed in.
func Int16Slice ¶
Int16Slice returns a slice of int16 pointers from the values passed in.
func Int32Slice ¶
Int32Slice returns a slice of int32 pointers from the values passed in.
func Int64Slice ¶
Int64Slice returns a slice of int64 pointers from the values passed in.
func StringSlice ¶
StringSlice returns a slice of string pointers from the values passed in.
func ToBool ¶ added in v1.14.0
ToBool returns bool value dereferenced if the passed in pointer was not nil. Returns a bool zero value if the pointer was nil.
func ToBoolMap ¶ added in v1.14.0
ToBoolMap returns a map of bool values, that are dereferenced if the passed in pointer was not nil. The bool zero value is used if the pointer was nil.
func ToBoolSlice ¶ added in v1.14.0
ToBoolSlice returns a slice of bool values, that are dereferenced if the passed in pointer was not nil. Returns a bool zero value if the pointer was nil.
func ToByte ¶ added in v1.14.0
ToByte returns byte value dereferenced if the passed in pointer was not nil. Returns a byte zero value if the pointer was nil.
func ToByteMap ¶ added in v1.14.0
ToByteMap returns a map of byte values, that are dereferenced if the passed in pointer was not nil. The byte zero value is used if the pointer was nil.
func ToByteSlice ¶ added in v1.14.0
ToByteSlice returns a slice of byte values, that are dereferenced if the passed in pointer was not nil. Returns a byte zero value if the pointer was nil.
func ToDuration ¶ added in v1.14.0
ToDuration returns time.Duration value dereferenced if the passed in pointer was not nil. Returns a time.Duration zero value if the pointer was nil.
func ToDurationMap ¶ added in v1.14.0
ToDurationMap returns a map of time.Duration values, that are dereferenced if the passed in pointer was not nil. The time.Duration zero value is used if the pointer was nil.
func ToDurationSlice ¶ added in v1.14.0
ToDurationSlice returns a slice of time.Duration values, that are dereferenced if the passed in pointer was not nil. Returns a time.Duration zero value if the pointer was nil.
func ToFloat32 ¶ added in v1.14.0
ToFloat32 returns float32 value dereferenced if the passed in pointer was not nil. Returns a float32 zero value if the pointer was nil.
func ToFloat32Map ¶ added in v1.14.0
ToFloat32Map returns a map of float32 values, that are dereferenced if the passed in pointer was not nil. The float32 zero value is used if the pointer was nil.
func ToFloat32Slice ¶ added in v1.14.0
ToFloat32Slice returns a slice of float32 values, that are dereferenced if the passed in pointer was not nil. Returns a float32 zero value if the pointer was nil.
func ToFloat64 ¶ added in v1.14.0
ToFloat64 returns float64 value dereferenced if the passed in pointer was not nil. Returns a float64 zero value if the pointer was nil.
func ToFloat64Map ¶ added in v1.14.0
ToFloat64Map returns a map of float64 values, that are dereferenced if the passed in pointer was not nil. The float64 zero value is used if the pointer was nil.
func ToFloat64Slice ¶ added in v1.14.0
ToFloat64Slice returns a slice of float64 values, that are dereferenced if the passed in pointer was not nil. Returns a float64 zero value if the pointer was nil.
func ToInt ¶ added in v1.14.0
ToInt returns int value dereferenced if the passed in pointer was not nil. Returns a int zero value if the pointer was nil.
func ToInt16 ¶ added in v1.14.0
ToInt16 returns int16 value dereferenced if the passed in pointer was not nil. Returns a int16 zero value if the pointer was nil.
func ToInt16Map ¶ added in v1.14.0
ToInt16Map returns a map of int16 values, that are dereferenced if the passed in pointer was not nil. The int16 zero value is used if the pointer was nil.
func ToInt16Slice ¶ added in v1.14.0
ToInt16Slice returns a slice of int16 values, that are dereferenced if the passed in pointer was not nil. Returns a int16 zero value if the pointer was nil.
func ToInt32 ¶ added in v1.14.0
ToInt32 returns int32 value dereferenced if the passed in pointer was not nil. Returns a int32 zero value if the pointer was nil.
func ToInt32Map ¶ added in v1.14.0
ToInt32Map returns a map of int32 values, that are dereferenced if the passed in pointer was not nil. The int32 zero value is used if the pointer was nil.
func ToInt32Slice ¶ added in v1.14.0
ToInt32Slice returns a slice of int32 values, that are dereferenced if the passed in pointer was not nil. Returns a int32 zero value if the pointer was nil.
func ToInt64 ¶ added in v1.14.0
ToInt64 returns int64 value dereferenced if the passed in pointer was not nil. Returns a int64 zero value if the pointer was nil.
func ToInt64Map ¶ added in v1.14.0
ToInt64Map returns a map of int64 values, that are dereferenced if the passed in pointer was not nil. The int64 zero value is used if the pointer was nil.
func ToInt64Slice ¶ added in v1.14.0
ToInt64Slice returns a slice of int64 values, that are dereferenced if the passed in pointer was not nil. Returns a int64 zero value if the pointer was nil.
func ToInt8 ¶ added in v1.14.0
ToInt8 returns int8 value dereferenced if the passed in pointer was not nil. Returns a int8 zero value if the pointer was nil.
func ToInt8Map ¶ added in v1.14.0
ToInt8Map returns a map of int8 values, that are dereferenced if the passed in pointer was not nil. The int8 zero value is used if the pointer was nil.
func ToInt8Slice ¶ added in v1.14.0
ToInt8Slice returns a slice of int8 values, that are dereferenced if the passed in pointer was not nil. Returns a int8 zero value if the pointer was nil.
func ToIntMap ¶ added in v1.14.0
ToIntMap returns a map of int values, that are dereferenced if the passed in pointer was not nil. The int zero value is used if the pointer was nil.
func ToIntSlice ¶ added in v1.14.0
ToIntSlice returns a slice of int values, that are dereferenced if the passed in pointer was not nil. Returns a int zero value if the pointer was nil.
func ToString ¶ added in v1.14.0
ToString returns string value dereferenced if the passed in pointer was not nil. Returns a string zero value if the pointer was nil.
func ToStringMap ¶ added in v1.14.0
ToStringMap returns a map of string values, that are dereferenced if the passed in pointer was not nil. The string zero value is used if the pointer was nil.
func ToStringSlice ¶ added in v1.14.0
ToStringSlice returns a slice of string values, that are dereferenced if the passed in pointer was not nil. Returns a string zero value if the pointer was nil.
func ToTime ¶ added in v1.14.0
ToTime returns time.Time value dereferenced if the passed in pointer was not nil. Returns a time.Time zero value if the pointer was nil.
func ToTimeMap ¶ added in v1.14.0
ToTimeMap returns a map of time.Time values, that are dereferenced if the passed in pointer was not nil. The time.Time zero value is used if the pointer was nil.
func ToTimeSlice ¶ added in v1.14.0
ToTimeSlice returns a slice of time.Time values, that are dereferenced if the passed in pointer was not nil. Returns a time.Time zero value if the pointer was nil.
func ToUint ¶ added in v1.14.0
ToUint returns uint value dereferenced if the passed in pointer was not nil. Returns a uint zero value if the pointer was nil.
func ToUint16 ¶ added in v1.14.0
ToUint16 returns uint16 value dereferenced if the passed in pointer was not nil. Returns a uint16 zero value if the pointer was nil.
func ToUint16Map ¶ added in v1.14.0
ToUint16Map returns a map of uint16 values, that are dereferenced if the passed in pointer was not nil. The uint16 zero value is used if the pointer was nil.
func ToUint16Slice ¶ added in v1.14.0
ToUint16Slice returns a slice of uint16 values, that are dereferenced if the passed in pointer was not nil. Returns a uint16 zero value if the pointer was nil.
func ToUint32 ¶ added in v1.14.0
ToUint32 returns uint32 value dereferenced if the passed in pointer was not nil. Returns a uint32 zero value if the pointer was nil.
func ToUint32Map ¶ added in v1.14.0
ToUint32Map returns a map of uint32 values, that are dereferenced if the passed in pointer was not nil. The uint32 zero value is used if the pointer was nil.
func ToUint32Slice ¶ added in v1.14.0
ToUint32Slice returns a slice of uint32 values, that are dereferenced if the passed in pointer was not nil. Returns a uint32 zero value if the pointer was nil.
func ToUint64 ¶ added in v1.14.0
ToUint64 returns uint64 value dereferenced if the passed in pointer was not nil. Returns a uint64 zero value if the pointer was nil.
func ToUint64Map ¶ added in v1.14.0
ToUint64Map returns a map of uint64 values, that are dereferenced if the passed in pointer was not nil. The uint64 zero value is used if the pointer was nil.
func ToUint64Slice ¶ added in v1.14.0
ToUint64Slice returns a slice of uint64 values, that are dereferenced if the passed in pointer was not nil. Returns a uint64 zero value if the pointer was nil.
func ToUint8 ¶ added in v1.14.0
ToUint8 returns uint8 value dereferenced if the passed in pointer was not nil. Returns a uint8 zero value if the pointer was nil.
func ToUint8Map ¶ added in v1.14.0
ToUint8Map returns a map of uint8 values, that are dereferenced if the passed in pointer was not nil. The uint8 zero value is used if the pointer was nil.
func ToUint8Slice ¶ added in v1.14.0
ToUint8Slice returns a slice of uint8 values, that are dereferenced if the passed in pointer was not nil. Returns a uint8 zero value if the pointer was nil.
func ToUintMap ¶ added in v1.14.0
ToUintMap returns a map of uint values, that are dereferenced if the passed in pointer was not nil. The uint zero value is used if the pointer was nil.
func ToUintSlice ¶ added in v1.14.0
ToUintSlice returns a slice of uint values, that are dereferenced if the passed in pointer was not nil. Returns a uint zero value if the pointer was nil.
func Uint16Slice ¶
Uint16Slice returns a slice of uint16 pointers from the values passed in.
func Uint32Slice ¶
Uint32Slice returns a slice of uint32 pointers from the values passed in.
func Uint64Slice ¶
Uint64Slice returns a slice of uint64 pointers from the values passed in.
func Uint8Slice ¶
Uint8Slice returns a slice of uint8 pointers from the values passed in.
Types ¶
type Config ¶
type Config struct { // The region to send requests to. This parameter is required and must // be configured globally or on a per-client basis unless otherwise // noted. A full list of regions is found in the "Regions and Endpoints" // document. // // See http://docs.aws.amazon.com/general/latest/gr/rande.html for // information on AWS regions. Region string // The credentials object to use when signing requests. Defaults to a // chain of credential providers to search for credentials in environment // variables, shared credential file, and EC2 Instance Roles. Credentials aws.CredentialsProvider // The HTTP Client the SDK's API clients will use to invoke HTTP requests. // The SDK defaults to a BuildableClient allowing API clients to create // copies of the HTTP Client for service specific customizations. // // Use a (*http.Client) for custom behavior. Using a custom http.Client // will prevent the SDK from modifying the HTTP client. HTTPClient aws.HTTPClient //nolint:staticcheck // SA1019 to use aws.EndpointResolver EndpointResolver aws.EndpointResolver // An endpoint resolver that can be used to provide or override an endpoint for the given // service and region Please see the `aws.EndpointResolverWithOptions` documentation on usage. EndpointResolverWithOptions aws.EndpointResolverWithOptions // Config.Retryer member is not nil. This value will be ignored if // Retryer is not nil. RetryMaxAttempts int // RetryMode specifies the retry model the API client will be created with. // // API Clients will only use this value to construct a retryer if the // Config.Retryer member is not nil. This value will be ignored if // Retryer is not nil. RetryMode aws.RetryMode // Retryer is a function that provides a Retryer implementation. A Retryer guides how HTTP requests should be // retried in case of recoverable failures. When nil the API client will use a default // retryer. // // In general, the provider function should return a new instance of a Retryer if you are attempting // to provide a consistent Retryer configuration across all clients. This will ensure that each client will be // provided a new instance of the Retryer implementation, and will avoid issues such as sharing the same retry token // bucket across services. Retryer func() aws.Retryer // ConfigSources are the sources that were used to construct the Config. // Allows for additional configuration to be loaded by clients. ConfigSources []interface{} // APIOptions provides the set of middleware mutations modify how the API // client requests will be handled. This is useful for adding additional // tracing data to a request, or changing behavior of the SDK's client. APIOptions []func(*middleware.Stack) error // The logger writer interface to write logging messages to. Defaults to // standard error. Logger logging.Logger // Configures the events that will be sent to the configured logger. // This can be used to configure the logging of signing, retries, request, and responses // of the SDK clients. // // See the ClientLogMode type documentation for the complete set of logging modes and available // configuration. ClientLogMode aws.ClientLogMode // The configured DefaultsMode. If not specified, service clients will default to legacy. // // Supported modes are: auto, cross-region, in-region, legacy, mobile, standard DefaultsMode aws.DefaultsMode // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set to // AutoDefaultsMode and is initialized by `config.LoadDefaultConfig`. You should not // populate this structure programmatically, or rely on the values here within your applications. RuntimeEnvironment aws.RuntimeEnvironment }
A Config provides service configuration for service clients. This struct is copied from github.com/aws/aws-sdk-go-v2/aws.Config
type StaticCredentialsProvider ¶
type StaticCredentialsProvider struct {
Value aws.Credentials
}
A StaticCredentialsProvider is a set of credentials which are set programmatically.
func NewStaticCredentialsProvider ¶
func NewStaticCredentialsProvider(key, secret string) StaticCredentialsProvider
NewStaticCredentialsProvider return a StaticCredentialsProvider initialized with the NIFCLOUD credentials passed in.
func (StaticCredentialsProvider) Retrieve ¶
func (s StaticCredentialsProvider) Retrieve(ctx context.Context) (aws.Credentials, error)
Retrieve returns the credentials or error if the credentials are invalid.