imagesearch

package
v1.63.61 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddImageRequest

type AddImageRequest struct {
	*requests.RoaRequest
	PicContent    string           `position:"Body" name:"PicContent"`
	StrAttr       string           `position:"Body" name:"StrAttr"`
	InstanceName  string           `position:"Body" name:"InstanceName"`
	IntAttr       requests.Integer `position:"Body" name:"IntAttr"`
	ProductId     string           `position:"Body" name:"ProductId"`
	PicName       string           `position:"Body" name:"PicName"`
	CustomContent string           `position:"Body" name:"CustomContent"`
	Region        string           `position:"Body" name:"Region"`
	CategoryId    requests.Integer `position:"Body" name:"CategoryId"`
	Crop          requests.Boolean `position:"Body" name:"Crop"`
}

AddImageRequest is the request struct for api AddImage

func CreateAddImageRequest

func CreateAddImageRequest() (request *AddImageRequest)

CreateAddImageRequest creates a request to invoke AddImage API

type AddImageResponse

type AddImageResponse struct {
	*responses.BaseResponse
	RequestId string  `json:"RequestId" xml:"RequestId"`
	Success   bool    `json:"Success" xml:"Success"`
	Message   string  `json:"Message" xml:"Message"`
	Code      int     `json:"Code" xml:"Code"`
	PicInfo   PicInfo `json:"PicInfo" xml:"PicInfo"`
}

AddImageResponse is the response struct for api AddImage

func CreateAddImageResponse

func CreateAddImageResponse() (response *AddImageResponse)

CreateAddImageResponse creates a response to parse from AddImage response

type AllCategories

type AllCategories struct {
	Category []Category `json:"Category" xml:"Category"`
}

AllCategories is a nested struct in imagesearch response

type Auction

type Auction struct {
	CategoryId     int    `json:"CategoryId" xml:"CategoryId"`
	ProductId      string `json:"ProductId" xml:"ProductId"`
	PicName        string `json:"PicName" xml:"PicName"`
	CustomContent  string `json:"CustomContent" xml:"CustomContent"`
	SortExprValues string `json:"SortExprValues" xml:"SortExprValues"`
	IntAttr        int    `json:"IntAttr" xml:"IntAttr"`
	StrAttr        string `json:"StrAttr" xml:"StrAttr"`
}

Auction is a nested struct in imagesearch response

type Auctions

type Auctions struct {
	Auction []Auction `json:"Auction" xml:"Auction"`
}

Auctions is a nested struct in imagesearch response

type Category

type Category struct {
	Id   int    `json:"Id" xml:"Id"`
	Name string `json:"Name" xml:"Name"`
}

Category is a nested struct in imagesearch response

type Client

type Client struct {
	sdk.Client
}

Client is the sdk client struct, each func corresponds to an OpenAPI

func NewClient

func NewClient() (client *Client, err error)

NewClient creates a sdk client with environment variables

func NewClientWithAccessKey

func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error)

NewClientWithAccessKey is a shortcut to create sdk client with accesskey usage: https://help.aliyun.com/document_detail/66217.html

func NewClientWithEcsRamRole

func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error)

NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role usage: https://help.aliyun.com/document_detail/66223.html

func NewClientWithOptions

func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error)

NewClientWithOptions creates a sdk client with regionId/sdkConfig/credential this is the common api to create a sdk client

func NewClientWithRamRoleArn

func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error)

NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn usage: https://help.aliyun.com/document_detail/66222.html

func NewClientWithRsaKeyPair

func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error)

NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair attention: rsa key pair auth is only Japan regions available

func NewClientWithStsToken

func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error)

NewClientWithStsToken is a shortcut to create sdk client with sts token usage: https://help.aliyun.com/document_detail/66222.html

func (*Client) AddImage

func (client *Client) AddImage(request *AddImageRequest) (response *AddImageResponse, err error)

AddImage invokes the imagesearch.AddImage API synchronously api document: https://help.aliyun.com/api/imagesearch/addimage.html

func (*Client) AddImageWithCallback

func (client *Client) AddImageWithCallback(request *AddImageRequest, callback func(response *AddImageResponse, err error)) <-chan int

AddImageWithCallback invokes the imagesearch.AddImage API asynchronously api document: https://help.aliyun.com/api/imagesearch/addimage.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) AddImageWithChan

func (client *Client) AddImageWithChan(request *AddImageRequest) (<-chan *AddImageResponse, <-chan error)

AddImageWithChan invokes the imagesearch.AddImage API asynchronously api document: https://help.aliyun.com/api/imagesearch/addimage.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) DeleteImage

func (client *Client) DeleteImage(request *DeleteImageRequest) (response *DeleteImageResponse, err error)

DeleteImage invokes the imagesearch.DeleteImage API synchronously api document: https://help.aliyun.com/api/imagesearch/deleteimage.html

func (*Client) DeleteImageWithCallback

func (client *Client) DeleteImageWithCallback(request *DeleteImageRequest, callback func(response *DeleteImageResponse, err error)) <-chan int

DeleteImageWithCallback invokes the imagesearch.DeleteImage API asynchronously api document: https://help.aliyun.com/api/imagesearch/deleteimage.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) DeleteImageWithChan

func (client *Client) DeleteImageWithChan(request *DeleteImageRequest) (<-chan *DeleteImageResponse, <-chan error)

DeleteImageWithChan invokes the imagesearch.DeleteImage API asynchronously api document: https://help.aliyun.com/api/imagesearch/deleteimage.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) SearchImage

func (client *Client) SearchImage(request *SearchImageRequest) (response *SearchImageResponse, err error)

SearchImage invokes the imagesearch.SearchImage API synchronously api document: https://help.aliyun.com/api/imagesearch/searchimage.html

func (*Client) SearchImageWithCallback

func (client *Client) SearchImageWithCallback(request *SearchImageRequest, callback func(response *SearchImageResponse, err error)) <-chan int

SearchImageWithCallback invokes the imagesearch.SearchImage API asynchronously api document: https://help.aliyun.com/api/imagesearch/searchimage.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) SearchImageWithChan

func (client *Client) SearchImageWithChan(request *SearchImageRequest) (<-chan *SearchImageResponse, <-chan error)

SearchImageWithChan invokes the imagesearch.SearchImage API asynchronously api document: https://help.aliyun.com/api/imagesearch/searchimage.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

type DeleteImageRequest

type DeleteImageRequest struct {
	*requests.RoaRequest
	InstanceName string `position:"Body" name:"InstanceName"`
	ProductId    string `position:"Body" name:"ProductId"`
	PicName      string `position:"Body" name:"PicName"`
}

DeleteImageRequest is the request struct for api DeleteImage

func CreateDeleteImageRequest

func CreateDeleteImageRequest() (request *DeleteImageRequest)

CreateDeleteImageRequest creates a request to invoke DeleteImage API

type DeleteImageResponse

type DeleteImageResponse struct {
	*responses.BaseResponse
	RequestId string `json:"RequestId" xml:"RequestId"`
	Success   bool   `json:"Success" xml:"Success"`
	Message   string `json:"Message" xml:"Message"`
	Code      int    `json:"Code" xml:"Code"`
}

DeleteImageResponse is the response struct for api DeleteImage

func CreateDeleteImageResponse

func CreateDeleteImageResponse() (response *DeleteImageResponse)

CreateDeleteImageResponse creates a response to parse from DeleteImage response

type Head struct {
	DocsReturn int `json:"DocsReturn" xml:"DocsReturn"`
	DocsFound  int `json:"DocsFound" xml:"DocsFound"`
	SearchTime int `json:"SearchTime" xml:"SearchTime"`
}

Head is a nested struct in imagesearch response

type PicInfo

type PicInfo struct {
	Region        string     `json:"Region" xml:"Region"`
	CategoryId    int        `json:"CategoryId" xml:"CategoryId"`
	AllCategories []Category `json:"AllCategories" xml:"AllCategories"`
}

PicInfo is a nested struct in imagesearch response

type SearchImageRequest

type SearchImageRequest struct {
	*requests.RoaRequest
	Filter       string           `position:"Body" name:"Filter"`
	PicContent   string           `position:"Body" name:"PicContent"`
	InstanceName string           `position:"Body" name:"InstanceName"`
	ProductId    string           `position:"Body" name:"ProductId"`
	Num          requests.Integer `position:"Body" name:"Num"`
	PicName      string           `position:"Body" name:"PicName"`
	Start        requests.Integer `position:"Body" name:"Start"`
	Region       string           `position:"Body" name:"Region"`
	Type         string           `position:"Body" name:"Type"`
	CategoryId   requests.Integer `position:"Body" name:"CategoryId"`
	Crop         requests.Boolean `position:"Body" name:"Crop"`
}

SearchImageRequest is the request struct for api SearchImage

func CreateSearchImageRequest

func CreateSearchImageRequest() (request *SearchImageRequest)

CreateSearchImageRequest creates a request to invoke SearchImage API

type SearchImageResponse

type SearchImageResponse struct {
	*responses.BaseResponse
	RequestId string    `json:"RequestId" xml:"RequestId"`
	Success   bool      `json:"Success" xml:"Success"`
	Code      int       `json:"Code" xml:"Code"`
	Msg       string    `json:"Msg" xml:"Msg"`
	Head      Head      `json:"Head" xml:"Head"`
	PicInfo   PicInfo   `json:"PicInfo" xml:"PicInfo"`
	Auctions  []Auction `json:"Auctions" xml:"Auctions"`
}

SearchImageResponse is the response struct for api SearchImage

func CreateSearchImageResponse

func CreateSearchImageResponse() (response *SearchImageResponse)

CreateSearchImageResponse creates a response to parse from SearchImage response

Jump to

Keyboard shortcuts

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