imgsearch

package
v1.63.54 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EndpointMap map[string]string

EndpointMap Endpoint Data

View Source
var EndpointType = "regional"

EndpointType regional or central

Functions

func GetEndpointMap

func GetEndpointMap() map[string]string

GetEndpointMap Get Endpoint Data Map

func GetEndpointType

func GetEndpointType() string

GetEndpointType Get Endpoint Type Value

func SetClientProperty

func SetClientProperty(client *Client, propertyName string, propertyValue interface{})

SetClientProperty Set Property by Reflect

func SetEndpointDataToClient

func SetEndpointDataToClient(client *Client)

SetEndpointDataToClient Set EndpointMap and ENdpointType

Types

type AddImageRequest

type AddImageRequest struct {
	*requests.RpcRequest
	EntityId  string `position:"Body" name:"EntityId"`
	DbName    string `position:"Body" name:"DbName"`
	ImageUrl  string `position:"Body" name:"ImageUrl"`
	ExtraData string `position:"Body" name:"ExtraData"`
}

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"`
	Data      Data   `json:"Data" xml:"Data"`
}

AddImageResponse is the response struct for api AddImage

func CreateAddImageResponse

func CreateAddImageResponse() (response *AddImageResponse)

CreateAddImageResponse creates a response to parse from AddImage 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://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

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://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

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 NewClientWithProvider

func NewClientWithProvider(regionId string, providers ...provider.Provider) (client *Client, err error)

NewClientWithProvider creates a sdk client with providers usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

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://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

func NewClientWithRamRoleArnAndPolicy

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

NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn and policy usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

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 usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

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://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

func (*Client) AddImage

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

AddImage invokes the imgsearch.AddImage API synchronously

func (*Client) AddImageWithCallback

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

AddImageWithCallback invokes the imgsearch.AddImage API asynchronously

func (*Client) AddImageWithChan

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

AddImageWithChan invokes the imgsearch.AddImage API asynchronously

func (*Client) CreateImageDb

func (client *Client) CreateImageDb(request *CreateImageDbRequest) (response *CreateImageDbResponse, err error)

CreateImageDb invokes the imgsearch.CreateImageDb API synchronously

func (*Client) CreateImageDbWithCallback

func (client *Client) CreateImageDbWithCallback(request *CreateImageDbRequest, callback func(response *CreateImageDbResponse, err error)) <-chan int

CreateImageDbWithCallback invokes the imgsearch.CreateImageDb API asynchronously

func (*Client) CreateImageDbWithChan

func (client *Client) CreateImageDbWithChan(request *CreateImageDbRequest) (<-chan *CreateImageDbResponse, <-chan error)

CreateImageDbWithChan invokes the imgsearch.CreateImageDb API asynchronously

func (*Client) DeleteImage

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

DeleteImage invokes the imgsearch.DeleteImage API synchronously

func (*Client) DeleteImageDb

func (client *Client) DeleteImageDb(request *DeleteImageDbRequest) (response *DeleteImageDbResponse, err error)

DeleteImageDb invokes the imgsearch.DeleteImageDb API synchronously

func (*Client) DeleteImageDbWithCallback

func (client *Client) DeleteImageDbWithCallback(request *DeleteImageDbRequest, callback func(response *DeleteImageDbResponse, err error)) <-chan int

DeleteImageDbWithCallback invokes the imgsearch.DeleteImageDb API asynchronously

func (*Client) DeleteImageDbWithChan

func (client *Client) DeleteImageDbWithChan(request *DeleteImageDbRequest) (<-chan *DeleteImageDbResponse, <-chan error)

DeleteImageDbWithChan invokes the imgsearch.DeleteImageDb API asynchronously

func (*Client) DeleteImageWithCallback

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

DeleteImageWithCallback invokes the imgsearch.DeleteImage API asynchronously

func (*Client) DeleteImageWithChan

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

DeleteImageWithChan invokes the imgsearch.DeleteImage API asynchronously

func (*Client) ListImageDbs

func (client *Client) ListImageDbs(request *ListImageDbsRequest) (response *ListImageDbsResponse, err error)

ListImageDbs invokes the imgsearch.ListImageDbs API synchronously

func (*Client) ListImageDbsWithCallback

func (client *Client) ListImageDbsWithCallback(request *ListImageDbsRequest, callback func(response *ListImageDbsResponse, err error)) <-chan int

ListImageDbsWithCallback invokes the imgsearch.ListImageDbs API asynchronously

func (*Client) ListImageDbsWithChan

func (client *Client) ListImageDbsWithChan(request *ListImageDbsRequest) (<-chan *ListImageDbsResponse, <-chan error)

ListImageDbsWithChan invokes the imgsearch.ListImageDbs API asynchronously

func (*Client) ListImages

func (client *Client) ListImages(request *ListImagesRequest) (response *ListImagesResponse, err error)

ListImages invokes the imgsearch.ListImages API synchronously

func (*Client) ListImagesWithCallback

func (client *Client) ListImagesWithCallback(request *ListImagesRequest, callback func(response *ListImagesResponse, err error)) <-chan int

ListImagesWithCallback invokes the imgsearch.ListImages API asynchronously

func (*Client) ListImagesWithChan

func (client *Client) ListImagesWithChan(request *ListImagesRequest) (<-chan *ListImagesResponse, <-chan error)

ListImagesWithChan invokes the imgsearch.ListImages API asynchronously

func (*Client) SearchImage

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

SearchImage invokes the imgsearch.SearchImage API synchronously

func (*Client) SearchImageWithCallback

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

SearchImageWithCallback invokes the imgsearch.SearchImage API asynchronously

func (*Client) SearchImageWithChan

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

SearchImageWithChan invokes the imgsearch.SearchImage API asynchronously

type CreateImageDbRequest

type CreateImageDbRequest struct {
	*requests.RpcRequest
	Name string `position:"Body" name:"Name"`
}

CreateImageDbRequest is the request struct for api CreateImageDb

func CreateCreateImageDbRequest

func CreateCreateImageDbRequest() (request *CreateImageDbRequest)

CreateCreateImageDbRequest creates a request to invoke CreateImageDb API

type CreateImageDbResponse

type CreateImageDbResponse struct {
	*responses.BaseResponse
	RequestId string `json:"RequestId" xml:"RequestId"`
}

CreateImageDbResponse is the response struct for api CreateImageDb

func CreateCreateImageDbResponse

func CreateCreateImageDbResponse() (response *CreateImageDbResponse)

CreateCreateImageDbResponse creates a response to parse from CreateImageDb response

type Data

type Data struct {
	Token      string          `json:"Token" xml:"Token"`
	DataId     string          `json:"DataId" xml:"DataId"`
	TotalCount int             `json:"TotalCount" xml:"TotalCount"`
	ImageList  []ImageListItem `json:"ImageList" xml:"ImageList"`
	DbList     []DbListItem    `json:"DbList" xml:"DbList"`
	MatchList  []MatchListItem `json:"MatchList" xml:"MatchList"`
}

Data is a nested struct in imgsearch response

type DbList

type DbList struct {
	DbListItem []DbListItem `json:"DbList" xml:"DbList"`
}

DbList is a nested struct in imgsearch response

type DbListItem

type DbListItem struct {
	Name string `json:"Name" xml:"Name"`
}

DbListItem is a nested struct in imgsearch response

type DeleteImageDbRequest

type DeleteImageDbRequest struct {
	*requests.RpcRequest
	Name string `position:"Body" name:"Name"`
}

DeleteImageDbRequest is the request struct for api DeleteImageDb

func CreateDeleteImageDbRequest

func CreateDeleteImageDbRequest() (request *DeleteImageDbRequest)

CreateDeleteImageDbRequest creates a request to invoke DeleteImageDb API

type DeleteImageDbResponse

type DeleteImageDbResponse struct {
	*responses.BaseResponse
	RequestId string `json:"RequestId" xml:"RequestId"`
}

DeleteImageDbResponse is the response struct for api DeleteImageDb

func CreateDeleteImageDbResponse

func CreateDeleteImageDbResponse() (response *DeleteImageDbResponse)

CreateDeleteImageDbResponse creates a response to parse from DeleteImageDb response

type DeleteImageRequest

type DeleteImageRequest struct {
	*requests.RpcRequest
	EntityId string `position:"Body" name:"EntityId"`
	DbName   string `position:"Body" name:"DbName"`
}

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"`
}

DeleteImageResponse is the response struct for api DeleteImage

func CreateDeleteImageResponse

func CreateDeleteImageResponse() (response *DeleteImageResponse)

CreateDeleteImageResponse creates a response to parse from DeleteImage response

type ImageList

type ImageList struct {
	ImageListItem []ImageListItem `json:"ImageList" xml:"ImageList"`
}

ImageList is a nested struct in imgsearch response

type ImageListItem

type ImageListItem struct {
	EntityId  string `json:"EntityId" xml:"EntityId"`
	CreatedAt int64  `json:"CreatedAt" xml:"CreatedAt"`
	UpdatedAt int64  `json:"UpdatedAt" xml:"UpdatedAt"`
	DataId    string `json:"DataId" xml:"DataId"`
	ExtraData string `json:"ExtraData" xml:"ExtraData"`
}

ImageListItem is a nested struct in imgsearch response

type ListImageDbsRequest

type ListImageDbsRequest struct {
	*requests.RpcRequest
}

ListImageDbsRequest is the request struct for api ListImageDbs

func CreateListImageDbsRequest

func CreateListImageDbsRequest() (request *ListImageDbsRequest)

CreateListImageDbsRequest creates a request to invoke ListImageDbs API

type ListImageDbsResponse

type ListImageDbsResponse struct {
	*responses.BaseResponse
	RequestId string `json:"RequestId" xml:"RequestId"`
	Data      Data   `json:"Data" xml:"Data"`
}

ListImageDbsResponse is the response struct for api ListImageDbs

func CreateListImageDbsResponse

func CreateListImageDbsResponse() (response *ListImageDbsResponse)

CreateListImageDbsResponse creates a response to parse from ListImageDbs response

type ListImagesRequest

type ListImagesRequest struct {
	*requests.RpcRequest
	EntityIdPrefix string           `position:"Body" name:"EntityIdPrefix"`
	Limit          requests.Integer `position:"Body" name:"Limit"`
	Order          string           `position:"Body" name:"Order"`
	Offset         requests.Integer `position:"Body" name:"Offset"`
	Token          string           `position:"Body" name:"Token"`
	DbName         string           `position:"Body" name:"DbName"`
}

ListImagesRequest is the request struct for api ListImages

func CreateListImagesRequest

func CreateListImagesRequest() (request *ListImagesRequest)

CreateListImagesRequest creates a request to invoke ListImages API

type ListImagesResponse

type ListImagesResponse struct {
	*responses.BaseResponse
	RequestId string `json:"RequestId" xml:"RequestId"`
	Data      Data   `json:"Data" xml:"Data"`
}

ListImagesResponse is the response struct for api ListImages

func CreateListImagesResponse

func CreateListImagesResponse() (response *ListImagesResponse)

CreateListImagesResponse creates a response to parse from ListImages response

type MatchList

type MatchList struct {
	MatchListItem []MatchListItem `json:"MatchList" xml:"MatchList"`
}

MatchList is a nested struct in imgsearch response

type MatchListItem

type MatchListItem struct {
	ImageUrl  string  `json:"ImageUrl" xml:"ImageUrl"`
	EntityId  string  `json:"EntityId" xml:"EntityId"`
	Score     float64 `json:"Score" xml:"Score"`
	DataId    string  `json:"DataId" xml:"DataId"`
	ExtraData string  `json:"ExtraData" xml:"ExtraData"`
}

MatchListItem is a nested struct in imgsearch response

type SearchImageRequest

type SearchImageRequest struct {
	*requests.RpcRequest
	DbName   string           `position:"Body" name:"DbName"`
	ImageUrl string           `position:"Body" name:"ImageUrl"`
	Limit    requests.Integer `position:"Body" name:"Limit"`
}

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"`
	Data      Data   `json:"Data" xml:"Data"`
}

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