common

package
v1.0.103 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultRegion  = "cn-beijing"
	ServiceVersion = "2021-07-05"
	ServiceName    = "gtm"
	Timeout        = 15
)

Variables

View Source
var (
	ServiceInfo = &base.ServiceInfo{
		Timeout: Timeout * time.Second,
		Host:    "open.volcengineapi.com",
		Header: http.Header{
			"Accept": []string{"application/json"},
		},
		Scheme: "http",
		Credentials: base.Credentials{
			Service:         ServiceName,
			Region:          DefaultRegion,
			AccessKeyID:     os.Getenv("VOLC_ACCESSKEY"),
			SecretAccessKey: os.Getenv("VOLC_SECRETKEY"),
		},
	}
)

Functions

This section is empty.

Types

type SDKClient

type SDKClient struct {
	Client *base.Client
}

SDKClient .

func (*SDKClient) GetServiceInfo

func (p *SDKClient) GetServiceInfo() *base.ServiceInfo

GetServiceInfo interface

func (*SDKClient) SetHost

func (p *SDKClient) SetHost(host string)

func (*SDKClient) SetRegion

func (p *SDKClient) SetRegion(region string)

func (*SDKClient) SetSchema

func (p *SDKClient) SetSchema(schema string)

type TopRespError

type TopRespError struct {
	Code    string `form:"Code" json:"Code"`
	CodeN   int64  `form:"CodeN" json:"CodeN"`
	Message string `form:"Message" json:"Message"`
}

type TopRespMeta

type TopRespMeta struct {
	Action    string       `form:"Action" json:"Action"`
	Error     TopRespError `form:"Error" json:"Error"`
	Region    string       `form:"Region" json:"Region"`
	RequestID string       `form:"RequestId" json:"RequestId"`
	Service   string       `form:"Service" json:"Service"`
	Version   string       `form:"Version" json:"Version"`
}

type TopResponse

type TopResponse struct {
	ResponseMetadata TopRespMeta     `form:"ResponseMetadata" json:"ResponseMetadata"`
	Result           json.RawMessage `form:"Result" json:"Result"`
}

Jump to

Keyboard shortcuts

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