horizontal

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowRetry

func AllowRetry(retry interface{}, retryTimes *int) *bool

func AssertAsMap

func AssertAsMap(a interface{}) (_result map[string]interface{}, _err error)

func Bool

func Bool(a bool) *bool

func BoolSlice

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

func BoolSliceValue

func BoolSliceValue(a []*bool) []bool

func BoolValue

func BoolValue(a *bool) bool

func Convert

func Convert(in interface{}, out interface{}) error

func ConvertToSuzakuResp

func ConvertToSuzakuResp(in interface{}, out interface{}) error

func DefaultNumber

func DefaultNumber(reaNum, defaultNum *int) *int

func DefaultString

func DefaultString(reaStr, defaultStr *string) *string

func Float32

func Float32(a float32) *float32

func Float32Slice

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

func Float32Value

func Float32Value(a *float32) float32

func Float32ValueSlice

func Float32ValueSlice(a []*float32) []float32

func Float64

func Float64(a float64) *float64

func Float64Slice

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

func Float64Value

func Float64Value(a *float64) float64

func Float64ValueSlice

func Float64ValueSlice(a []*float64) []float64

func GetBackoffTime

func GetBackoffTime(backoff interface{}, retrytimes *int) *int

func Int

func Int(a int) *int

func Int16

func Int16(a int16) *int16

func Int16Slice

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

func Int16Value

func Int16Value(a *int16) int16

func Int16ValueSlice

func Int16ValueSlice(a []*int16) []int16

func Int32

func Int32(a int32) *int32

func Int32Slice

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

func Int32Value

func Int32Value(a *int32) int32

func Int32ValueSlice

func Int32ValueSlice(a []*int32) []int32

func Int64

func Int64(a int64) *int64

func Int64Slice

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

func Int64Value

func Int64Value(a *int64) int64

func Int64ValueSlice

func Int64ValueSlice(a []*int64) []int64

func Int8

func Int8(a int8) *int8

func Int8Slice

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

func Int8Value

func Int8Value(a *int8) int8

func Int8ValueSlice

func Int8ValueSlice(a []*int8) []int8

func IntSlice

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

func IntValue

func IntValue(a *int) int

func IntValueSlice

func IntValueSlice(a []*int) []int

func IsUnset

func IsUnset(val interface{}) *bool

func Merge

func Merge(args ...interface{}) map[string]*string

func Prettify

func Prettify(i interface{}) string

func ReadAsJSON

func ReadAsJSON(body io.Reader) (result interface{}, err error)

func Recover

func Recover(in interface{}) error

func Retryable

func Retryable(err error) *bool

func Sleep

func Sleep(backoffTime *int)

func String

func String(a string) *string

func StringSlice

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

func StringSliceValue

func StringSliceValue(a []*string) []string

func StringValue

func StringValue(a *string) string

func Substring

func Substring(s string, pos, length int) string

func ToInt

func ToInt(a *int32) *int

func ToInt32

func ToInt32(a *int) *int32

func ToJSONString

func ToJSONString(a interface{}) *string

func ToMap

func ToMap(args ...interface{}) map[string]interface{}

func ToObject

func ToObject(obj interface{}) map[string]interface{}

func ToReader

func ToReader(obj interface{}) io.Reader

func ToString

func ToString(val interface{}) string

func TransInterfaceToBool

func TransInterfaceToBool(val interface{}) *bool

func TransInterfaceToInt

func TransInterfaceToInt(val interface{}) *int

func TransInterfaceToString

func TransInterfaceToString(val interface{}) *string

func Uint

func Uint(a uint) *uint

func Uint16

func Uint16(a uint16) *uint16

func Uint16Slice

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

func Uint16Value

func Uint16Value(a *uint16) uint16

func Uint16ValueSlice

func Uint16ValueSlice(a []*uint16) []uint16

func Uint32

func Uint32(a uint32) *uint32

func Uint32Slice

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

func Uint32Value

func Uint32Value(a *uint32) uint32

func Uint32ValueSlice

func Uint32ValueSlice(a []*uint32) []uint32

func Uint64

func Uint64(a uint64) *uint64

func Uint64Slice

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

func Uint64Value

func Uint64Value(a *uint64) uint64

func Uint64ValueSlice

func Uint64ValueSlice(a []*uint64) []uint64

func Uint8

func Uint8(a uint8) *uint8

func Uint8Slice

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

func Uint8Value

func Uint8Value(a *uint8) uint8

func Uint8ValueSlice

func Uint8ValueSlice(a []*uint8) []uint8

func UintSlice

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

func UintValue

func UintValue(a *uint) uint

func UintValueSlice

func UintValueSlice(a []*uint) []uint

func Validate

func Validate(params interface{}) error

Types

type Request

type Request struct {
	Headers map[string]*string
	// contains filtered or unexported fields
}

Request is used wrap http request

func NewRequest

func NewRequest(requestId string) *Request

func (*Request) GetApiVersion

func (request *Request) GetApiVersion() *string

func (*Request) GetEndpoint

func (request *Request) GetEndpoint() *string

func (*Request) GetMethod

func (request *Request) GetMethod() *string

func (*Request) GetPath

func (request *Request) GetPath() *string

func (*Request) GetPort

func (request *Request) GetPort() *int

func (*Request) GetQuery

func (request *Request) GetQuery() map[string]*string

func (*Request) GetRequestId

func (request *Request) GetRequestId() *string

func (*Request) SetApiVersion

func (request *Request) SetApiVersion(apiVersion *string)

func (*Request) SetBody

func (request *Request) SetBody(body interface{})

func (*Request) SetEndpoint

func (request *Request) SetEndpoint(endpoint *string)

func (*Request) SetMethodDELETE

func (request *Request) SetMethodDELETE()

func (*Request) SetMethodGET

func (request *Request) SetMethodGET()

func (*Request) SetMethodPOST

func (request *Request) SetMethodPOST()

func (*Request) SetMethodPUT

func (request *Request) SetMethodPUT()

func (*Request) SetPath

func (request *Request) SetPath(path string)

func (*Request) SetPort

func (request *Request) SetPort(port *int)

func (*Request) SetQuery

func (request *Request) SetQuery(query map[string]*string)

func (*Request) UpdateQuery

func (request *Request) UpdateQuery(query map[string]*string)

type Response

type Response struct {
	Body          io.ReadCloser
	StatusCode    *int
	StatusMessage *string
	Headers       map[string]*string
}

Response is use d wrap http response

func DoRequest

func DoRequest(request *Request, requestRuntime map[string]interface{}) (response *Response, err error)

func NewResponse

func NewResponse(httpResponse *http.Response) (res *Response)

NewResponse is create response with http response

func (*Response) ReadBody

func (response *Response) ReadBody() (body []byte, err error)

ReadBody is used read response body

type RuntimeObject

type RuntimeObject struct {
	ConnectTimeout *int `json:"connectTimeout"`
	ReadTimeout    *int `json:"readTimeout"`
	Backoff        *int `json:"backoff"`
	Retry          *int `json:"retry"`
}

RuntimeObject is used for converting http configuration

func NewRuntimeObject

func NewRuntimeObject(runtime map[string]interface{}) *RuntimeObject

type SDKError

type SDKError struct {
	StatusCode *int
	Code       *string
	Message    *string
	Data       *string

	RequestId *string
	// contains filtered or unexported fields
}

SDKError struct is used save error code and message

func NewSDKError

func NewSDKError(obj map[string]interface{}) *SDKError

NewSDKError is used for shortly create SDKError object

func (*SDKError) Error

func (err *SDKError) Error() string

func (*SDKError) SetErrMsg

func (err *SDKError) SetErrMsg(msg string)

type Sorter

type Sorter struct {
	Keys []string
	Vals []string
}

func (*Sorter) Len

func (hs *Sorter) Len() int

Len is an additional function for function SignHeader.

func (*Sorter) Less

func (hs *Sorter) Less(i, j int) bool

Less is an additional function for function SignHeader.

func (*Sorter) Sort

func (hs *Sorter) Sort()

Sort is an additional function for function SignHeader.

func (*Sorter) Swap

func (hs *Sorter) Swap(i, j int)

Swap is an additional function for function SignHeader.

Jump to

Keyboard shortcuts

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