nifcloud

package
v1.25.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 8 Imported by: 44

Documentation

Overview

Package nifcloud provides core functionality for making requests to NIFCLOUD services.

Index

Constants

View Source
const SDKVersion = goModuleVersion

SDKVersion is the version of this SDK

Variables

This section is empty.

Functions

func Bool

func Bool(v bool) *bool

Bool returns a pointer value for the bool value passed in.

func BoolMap

func BoolMap(vs map[string]bool) map[string]*bool

BoolMap returns a map of bool pointers from the values passed in.

func BoolSlice

func BoolSlice(vs []bool) []*bool

BoolSlice returns a slice of bool pointers from the values passed in.

func Byte added in v1.14.0

func Byte(v byte) *byte

Byte returns a pointer value for the byte value passed in.

func ByteMap added in v1.14.0

func ByteMap(vs map[string]byte) map[string]*byte

ByteMap returns a map of byte pointers from the values passed in.

func ByteSlice added in v1.14.0

func ByteSlice(vs []byte) []*byte

ByteSlice returns a slice of byte pointers from the values passed in.

func Duration added in v1.14.0

func Duration(v time.Duration) *time.Duration

Duration returns a pointer value for the time.Duration value passed in.

func DurationMap added in v1.14.0

func DurationMap(vs map[string]time.Duration) map[string]*time.Duration

DurationMap returns a map of time.Duration pointers from the values passed in.

func DurationSlice added in v1.14.0

func DurationSlice(vs []time.Duration) []*time.Duration

DurationSlice returns a slice of time.Duration pointers from the values passed in.

func Float32

func Float32(v float32) *float32

Float32 returns a pointer value for the float32 value passed in.

func Float32Map

func Float32Map(vs map[string]float32) map[string]*float32

Float32Map returns a map of float32 pointers from the values passed in.

func Float32Slice

func Float32Slice(vs []float32) []*float32

Float32Slice returns a slice of float32 pointers from the values passed in.

func Float64

func Float64(v float64) *float64

Float64 returns a pointer value for the float64 value passed in.

func Float64Map

func Float64Map(vs map[string]float64) map[string]*float64

Float64Map returns a map of float64 pointers from the values passed in.

func Float64Slice

func Float64Slice(vs []float64) []*float64

Float64Slice returns a slice of float64 pointers from the values passed in.

func Int

func Int(v int) *int

Int returns a pointer value for the int value passed in.

func Int16

func Int16(v int16) *int16

Int16 returns a pointer value for the int16 value passed in.

func Int16Map

func Int16Map(vs map[string]int16) map[string]*int16

Int16Map returns a map of int16 pointers from the values passed in.

func Int16Slice

func Int16Slice(vs []int16) []*int16

Int16Slice returns a slice of int16 pointers from the values passed in.

func Int32

func Int32(v int32) *int32

Int32 returns a pointer value for the int32 value passed in.

func Int32Map

func Int32Map(vs map[string]int32) map[string]*int32

Int32Map returns a map of int32 pointers from the values passed in.

func Int32Slice

func Int32Slice(vs []int32) []*int32

Int32Slice returns a slice of int32 pointers from the values passed in.

func Int64

func Int64(v int64) *int64

Int64 returns a pointer value for the int64 value passed in.

func Int64Map

func Int64Map(vs map[string]int64) map[string]*int64

Int64Map returns a map of int64 pointers from the values passed in.

func Int64Slice

func Int64Slice(vs []int64) []*int64

Int64Slice returns a slice of int64 pointers from the values passed in.

func Int8

func Int8(v int8) *int8

Int8 returns a pointer value for the int8 value passed in.

func Int8Map

func Int8Map(vs map[string]int8) map[string]*int8

Int8Map returns a map of int8 pointers from the values passed in.

func Int8Slice

func Int8Slice(vs []int8) []*int8

Int8Slice returns a slice of int8 pointers from the values passed in.

func IntMap

func IntMap(vs map[string]int) map[string]*int

IntMap returns a map of int pointers from the values passed in.

func IntSlice

func IntSlice(vs []int) []*int

IntSlice returns a slice of int pointers from the values passed in.

func String

func String(v string) *string

String returns a pointer value for the string value passed in.

func StringMap

func StringMap(vs map[string]string) map[string]*string

StringMap returns a map of string pointers from the values passed in.

func StringSlice

func StringSlice(vs []string) []*string

StringSlice returns a slice of string pointers from the values passed in.

func Time

func Time(v time.Time) *time.Time

Time returns a pointer value for the time.Time value passed in.

func TimeMap

func TimeMap(vs map[string]time.Time) map[string]*time.Time

TimeMap returns a map of time.Time pointers from the values passed in.

func TimeSlice

func TimeSlice(vs []time.Time) []*time.Time

TimeSlice returns a slice of time.Time pointers from the values passed in.

func ToBool added in v1.14.0

func ToBool(p *bool) (v bool)

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

func ToBoolMap(vs map[string]*bool) map[string]bool

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

func ToBoolSlice(vs []*bool) []bool

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

func ToByte(p *byte) (v byte)

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

func ToByteMap(vs map[string]*byte) map[string]byte

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

func ToByteSlice(vs []*byte) []byte

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

func ToDuration(p *time.Duration) (v time.Duration)

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

func ToDurationMap(vs map[string]*time.Duration) map[string]time.Duration

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

func ToDurationSlice(vs []*time.Duration) []time.Duration

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

func ToFloat32(p *float32) (v float32)

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

func ToFloat32Map(vs map[string]*float32) map[string]float32

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

func ToFloat32Slice(vs []*float32) []float32

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

func ToFloat64(p *float64) (v float64)

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

func ToFloat64Map(vs map[string]*float64) map[string]float64

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

func ToFloat64Slice(vs []*float64) []float64

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

func ToInt(p *int) (v int)

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

func ToInt16(p *int16) (v int16)

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

func ToInt16Map(vs map[string]*int16) map[string]int16

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

func ToInt16Slice(vs []*int16) []int16

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

func ToInt32(p *int32) (v int32)

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

func ToInt32Map(vs map[string]*int32) map[string]int32

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

func ToInt32Slice(vs []*int32) []int32

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

func ToInt64(p *int64) (v int64)

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

func ToInt64Map(vs map[string]*int64) map[string]int64

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

func ToInt64Slice(vs []*int64) []int64

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

func ToInt8(p *int8) (v int8)

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

func ToInt8Map(vs map[string]*int8) map[string]int8

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

func ToInt8Slice(vs []*int8) []int8

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

func ToIntMap(vs map[string]*int) map[string]int

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

func ToIntSlice(vs []*int) []int

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

func ToString(p *string) (v string)

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

func ToStringMap(vs map[string]*string) map[string]string

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

func ToStringSlice(vs []*string) []string

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

func ToTime(p *time.Time) (v time.Time)

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

func ToTimeMap(vs map[string]*time.Time) map[string]time.Time

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

func ToTimeSlice(vs []*time.Time) []time.Time

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

func ToUint(p *uint) (v uint)

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

func ToUint16(p *uint16) (v uint16)

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

func ToUint16Map(vs map[string]*uint16) map[string]uint16

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

func ToUint16Slice(vs []*uint16) []uint16

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

func ToUint32(p *uint32) (v uint32)

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

func ToUint32Map(vs map[string]*uint32) map[string]uint32

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

func ToUint32Slice(vs []*uint32) []uint32

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

func ToUint64(p *uint64) (v uint64)

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

func ToUint64Map(vs map[string]*uint64) map[string]uint64

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

func ToUint64Slice(vs []*uint64) []uint64

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

func ToUint8(p *uint8) (v uint8)

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

func ToUint8Map(vs map[string]*uint8) map[string]uint8

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

func ToUint8Slice(vs []*uint8) []uint8

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

func ToUintMap(vs map[string]*uint) map[string]uint

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

func ToUintSlice(vs []*uint) []uint

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 Uint

func Uint(v uint) *uint

Uint returns a pointer value for the uint value passed in.

func Uint16

func Uint16(v uint16) *uint16

Uint16 returns a pointer value for the uint16 value passed in.

func Uint16Map

func Uint16Map(vs map[string]uint16) map[string]*uint16

Uint16Map returns a map of uint16 pointers from the values passed in.

func Uint16Slice

func Uint16Slice(vs []uint16) []*uint16

Uint16Slice returns a slice of uint16 pointers from the values passed in.

func Uint32

func Uint32(v uint32) *uint32

Uint32 returns a pointer value for the uint32 value passed in.

func Uint32Map

func Uint32Map(vs map[string]uint32) map[string]*uint32

Uint32Map returns a map of uint32 pointers from the values passed in.

func Uint32Slice

func Uint32Slice(vs []uint32) []*uint32

Uint32Slice returns a slice of uint32 pointers from the values passed in.

func Uint64

func Uint64(v uint64) *uint64

Uint64 returns a pointer value for the uint64 value passed in.

func Uint64Map

func Uint64Map(vs map[string]uint64) map[string]*uint64

Uint64Map returns a map of uint64 pointers from the values passed in.

func Uint64Slice

func Uint64Slice(vs []uint64) []*uint64

Uint64Slice returns a slice of uint64 pointers from the values passed in.

func Uint8

func Uint8(v uint8) *uint8

Uint8 returns a pointer value for the uint8 value passed in.

func Uint8Map

func Uint8Map(vs map[string]uint8) map[string]*uint8

Uint8Map returns a map of uint8 pointers from the values passed in.

func Uint8Slice

func Uint8Slice(vs []uint8) []*uint8

Uint8Slice returns a slice of uint8 pointers from the values passed in.

func UintMap

func UintMap(vs map[string]uint) map[string]*uint

UintMap returns a map of uint pointers from the values passed in.

func UintSlice

func UintSlice(vs []uint) []*uint

UintSlice returns a slice of uint 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

func NewConfig

func NewConfig(key, secret, region string) Config

NewConfig returns a new Config with access key, secret key and region.

func (Config) AWSConfig

func (c Config) AWSConfig() aws.Config

AWSConfig converts the config values to 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

Retrieve returns the credentials or error if the credentials are invalid.

Directories

Path Synopsis
Package nrn provides a parser for interacting with NIFCLOUD Resource Names.
Package nrn provides a parser for interacting with NIFCLOUD Resource Names.
signer
v2
v3

Jump to

Keyboard shortcuts

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