service

package
v2.0.0-...-781b733 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 27 Imported by: 1

Documentation

Overview

This file is auto-generated, don't edit it. Thanks. *

  • This is for OpenApi Util

Index

Constants

View Source
const (
	PEM_BEGIN = "-----BEGIN RSA PRIVATE KEY-----\n"
	PEM_END   = "\n-----END RSA PRIVATE KEY-----"
)

Variables

This section is empty.

Functions

func ArrayToStringWithSpecifiedStyle

func ArrayToStringWithSpecifiedStyle(array interface{}, prefix *string, style *string) (_result *string)

*

  • Parse array into a string with specified style
  • @param array the array
  • @param prefix the prefix string
  • @style specified style e.g. repeatList
  • @return the string

func Convert

func Convert(body interface{}, content interface{})

*

  • Convert all params of body other than type of readable into content
  • @param body source Model
  • @param content target Model
  • @return void

func GetAuthorization

func GetAuthorization(request *tea.Request, signatureAlgorithm, payload, acesskey, secret *string) *string

func GetEncodeParam

func GetEncodeParam(param *string) *string

func GetEncodePath

func GetEncodePath(path *string) *string

func GetEndpoint

func GetEndpoint(endpoint *string, server *bool, endpointType *string) *string

func GetROASignature

func GetROASignature(stringToSign *string, secret *string) (_result *string)

*

  • Get signature according to stringToSign, secret
  • @param stringToSign the signed string
  • @param secret accesskey secret
  • @return the signature

func GetRPCSignature

func GetRPCSignature(signedParams map[string]*string, method *string, secret *string) (_result *string)

*

  • Get signature according to signedParams, method and secret
  • @param signedParams params which need to be signed
  • @param method http method e.g. GET
  • @param secret AccessKeySecret
  • @return the signature

func GetStringToSign

func GetStringToSign(request *tea.Request) (_result *string)

*

  • Get the string to be signed according to request
  • @param request which contains signed messages
  • @return the signed string

func GetThrottlingTimeLeft

func GetThrottlingTimeLeft(headers map[string]*string) (_result *int64)

*

  • Get throttling param
  • @param the response headers
  • @return time left

func GetTimestamp

func GetTimestamp() (_result *string)

*

  • Get timestamp
  • @return the timestamp string

func Hash

func Hash(raw []byte, signatureAlgorithm *string) []byte

func HexEncode

func HexEncode(raw []byte) *string

func ParseToMap

func ParseToMap(in interface{}) map[string]interface{}

func Query

func Query(filter interface{}) (_result map[string]*string)

*

  • Parse filter into a object which's type is map[string]string
  • @param filter query param
  • @return the object

func SignatureMethod

func SignatureMethod(secret, source, signatureAlgorithm string) []byte

func ToForm

func ToForm(filter map[string]interface{}) (_result *string)

*

  • Parse filter into a form string
  • @param filter object
  • @return the string

Types

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