Documentation
¶
Index ¶
- type Body
- type Client
- func (client *Client) AppendUserAgent(userAgent *string)
- func (client *Client) GetAccessKeyId() (_result *string, _err error)
- func (client *Client) GetAccessKeySecret() (_result *string, _err error)
- func (client *Client) GetUserAgent() (_result *string)
- func (client *Client) Init(config *Config) (_err error)
- func (client *Client) Request(method *string, pathname *string, query map[string]interface{}, ...) (_result map[string]interface{}, _err error)
- func (client *Client) SetUserAgent(userAgent *string)
- type Config
- type ResponseError
- type ResponseHeader
- type ResponseSearchList
- type ResponseSuggestList
- type SuggestBody
- type SuggestItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Body ¶ added in v0.1.8
type Body[T any] struct { Error []ResponseError `json:"error"` OpsRequestMisc string `json:"ops_request_misc"` RequestId string `json:"request_id"` Status string `json:"status"` Trace string `json:"trace"` Result struct { ComputeCost []any `json:"compute_cost"` Facet []any `json:"facet"` Num uint32 `json:"num"` SearchTime float64 `json:"searchtime"` Total uint32 `json:"total"` ViewTotal uint32 `json:"viewtotal"` Items []T `json:"Items"` } `json:"result"` }
type Client ¶
type Client struct {
Endpoint *string
Protocol *string
UserAgent *string
Credential credential.Credential
}
func (*Client) AppendUserAgent ¶
func (*Client) GetAccessKeyId ¶
func (*Client) GetAccessKeySecret ¶
func (*Client) GetUserAgent ¶
func (*Client) SetUserAgent ¶
type Config ¶
type Config struct {
Endpoint *string `json:"endpoint,omitempty" xml:"endpoint,omitempty"`
Protocol *string `json:"protocol,omitempty" xml:"protocol,omitempty"`
Type *string `json:"type,omitempty" xml:"type,omitempty"`
SecurityToken *string `json:"securityToken,omitempty" xml:"securityToken,omitempty"`
AccessKeyId *string `json:"accessKeyId,omitempty" xml:"accessKeyId,omitempty"`
AccessKeySecret *string `json:"accessKeySecret,omitempty" xml:"accessKeySecret,omitempty"`
UserAgent *string `json:"userAgent,omitempty" xml:"userAgent,omitempty"`
}
type ResponseError ¶ added in v0.1.3
type ResponseHeader ¶ added in v0.1.2
type ResponseHeader struct {
Connection string `json:"connection"`
ContentType string `json:"content-type"`
Date string `json:"date"`
KeepAlive string `json:"keep-alive"`
RequestId string `json:"request-id"`
Server string `json:"server"`
XAcsApiName string `json:"x-acs-api-name"`
XAcsCallerType string `json:"x-acs-caller-type"`
XAcsCallerUid string `json:"x-acs-caller-uid"`
XAcsParentUid string `json:"x-acs-parent-uid"`
XAliyunUserId string `json:"x-aliyun-user-id"`
XAppId string `json:"x-app-id"`
XAppName string `json:"x-app-name"`
XAppgroupId string `json:"x-appgroup-id"`
}
type ResponseSearchList ¶ added in v0.1.4
type ResponseSearchList[T any] struct { Headers ResponseHeader `json:"headers"` Body Body[T] `json:"body"` }
type ResponseSuggestList ¶ added in v0.1.2
type ResponseSuggestList struct {
Headers ResponseHeader `json:"headers"`
Body SuggestBody `json:"body"`
}
type SuggestBody ¶ added in v0.1.2
type SuggestBody struct {
RequestId string `json:"request_id"`
SearchTime float64 `json:"searchtime"`
Suggestions []SuggestItem `json:"suggestions"`
}
type SuggestItem ¶ added in v0.1.2
type SuggestItem struct {
Suggestion string `json:"suggestion"`
}
Click to show internal directories.
Click to hide internal directories.