Documentation ¶
Index ¶
- Variables
- func GetEndpointMap() map[string]string
- func GetEndpointType() string
- func SetClientProperty(client *Client, propertyName string, propertyValue interface{})
- func SetEndpointDataToClient(client *Client)
- type Client
- func NewClient() (client *Client, err error)
- func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error)
- func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error)
- func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error)
- func NewClientWithProvider(regionId string, providers ...provider.Provider) (client *Client, err error)
- func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error)
- func NewClientWithRamRoleArnAndPolicy(regionId string, ...) (client *Client, err error)
- func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error)
- func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error)
- func (client *Client) ScanImage(request *ScanImageRequest) (response *ScanImageResponse, err error)
- func (client *Client) ScanImageWithCallback(request *ScanImageRequest, ...) <-chan int
- func (client *Client) ScanImageWithChan(request *ScanImageRequest) (<-chan *ScanImageResponse, <-chan error)
- func (client *Client) ScanText(request *ScanTextRequest) (response *ScanTextResponse, err error)
- func (client *Client) ScanTextWithCallback(request *ScanTextRequest, callback func(response *ScanTextResponse, err error)) <-chan int
- func (client *Client) ScanTextWithChan(request *ScanTextRequest) (<-chan *ScanTextResponse, <-chan error)
- type Context
- type Contexts
- type Data
- type Detail
- type Details
- type Element
- type Elements
- type Face
- type Faces
- type Frame
- type Frames
- type HintWordsInfo
- type HintWordsInfoList
- type LogoData
- type LogoDataList
- type OCRDataList
- type ProgramCodeData
- type ProgramCodeDataList
- type Result
- type ResultsInScanImage
- type ResultsInScanText
- type ScanImageRequest
- type ScanImageResponse
- type ScanImageTask
- type ScanTextLabels
- type ScanTextRequest
- type ScanTextResponse
- type ScanTextTasks
- type SfaceData
- type SfaceDataList
- type SubResult
- type SubResults
Constants ¶
This section is empty.
Variables ¶
var EndpointMap map[string]string
EndpointMap Endpoint Data
var EndpointType = "regional"
EndpointType regional or central
Functions ¶
func SetClientProperty ¶
SetClientProperty Set Property by Reflect
func SetEndpointDataToClient ¶
func SetEndpointDataToClient(client *Client)
SetEndpointDataToClient Set EndpointMap and ENdpointType
Types ¶
type Client ¶
Client is the sdk client struct, each func corresponds to an OpenAPI
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 ¶
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) ScanImage ¶
func (client *Client) ScanImage(request *ScanImageRequest) (response *ScanImageResponse, err error)
ScanImage invokes the imageaudit.ScanImage API synchronously
func (*Client) ScanImageWithCallback ¶
func (client *Client) ScanImageWithCallback(request *ScanImageRequest, callback func(response *ScanImageResponse, err error)) <-chan int
ScanImageWithCallback invokes the imageaudit.ScanImage API asynchronously
func (*Client) ScanImageWithChan ¶
func (client *Client) ScanImageWithChan(request *ScanImageRequest) (<-chan *ScanImageResponse, <-chan error)
ScanImageWithChan invokes the imageaudit.ScanImage API asynchronously
func (*Client) ScanText ¶
func (client *Client) ScanText(request *ScanTextRequest) (response *ScanTextResponse, err error)
ScanText invokes the imageaudit.ScanText API synchronously
func (*Client) ScanTextWithCallback ¶
func (client *Client) ScanTextWithCallback(request *ScanTextRequest, callback func(response *ScanTextResponse, err error)) <-chan int
ScanTextWithCallback invokes the imageaudit.ScanText API asynchronously
func (*Client) ScanTextWithChan ¶
func (client *Client) ScanTextWithChan(request *ScanTextRequest) (<-chan *ScanTextResponse, <-chan error)
ScanTextWithChan invokes the imageaudit.ScanText API asynchronously
type Context ¶
type Context struct {
Context string `json:"Context" xml:"Context"`
}
Context is a nested struct in imageaudit response
type Contexts ¶
type Contexts struct {
Context []Context `json:"Context" xml:"Context"`
}
Contexts is a nested struct in imageaudit response
type Data ¶
type Data struct { Elements []Element `json:"Elements" xml:"Elements"` Results []Result `json:"Results" xml:"Results"` }
Data is a nested struct in imageaudit response
type Detail ¶
type Detail struct { Label string `json:"Label" xml:"Label"` Contexts []Context `json:"Contexts" xml:"Contexts"` }
Detail is a nested struct in imageaudit response
type Details ¶
type Details struct {
Detail []Detail `json:"Detail" xml:"Detail"`
}
Details is a nested struct in imageaudit response
type Element ¶
type Element struct { TaskId string `json:"TaskId" xml:"TaskId"` Results []Result `json:"Results" xml:"Results"` }
Element is a nested struct in imageaudit response
type Elements ¶
type Elements struct {
Element []Element `json:"Element" xml:"Element"`
}
Elements is a nested struct in imageaudit response
type Face ¶
type Face struct { Rate float64 `json:"Rate" xml:"Rate"` Id string `json:"Id" xml:"Id"` Name string `json:"Name" xml:"Name"` }
Face is a nested struct in imageaudit response
type Faces ¶
type Faces struct {
Face []Face `json:"Face" xml:"Face"`
}
Faces is a nested struct in imageaudit response
type Frames ¶
type Frames struct {
Frame []Frame `json:"Frame" xml:"Frame"`
}
Frames is a nested struct in imageaudit response
type HintWordsInfo ¶
type HintWordsInfo struct {
Context string `json:"Context" xml:"Context"`
}
HintWordsInfo is a nested struct in imageaudit response
type HintWordsInfoList ¶
type HintWordsInfoList struct {
HintWordsInfo []HintWordsInfo `json:"HintWordsInfo" xml:"HintWordsInfo"`
}
HintWordsInfoList is a nested struct in imageaudit response
type LogoData ¶
type LogoData struct { Type string `json:"Type" xml:"Type"` X float64 `json:"X" xml:"X"` Y float64 `json:"Y" xml:"Y"` Height float64 `json:"Height" xml:"Height"` Width float64 `json:"Width" xml:"Width"` Name string `json:"Name" xml:"Name"` }
LogoData is a nested struct in imageaudit response
type LogoDataList ¶
type LogoDataList struct {
LogoData []LogoData `json:"LogoData" xml:"LogoData"`
}
LogoDataList is a nested struct in imageaudit response
type OCRDataList ¶
type OCRDataList struct {
OCRData []string `json:"OCRData" xml:"OCRData"`
}
OCRDataList is a nested struct in imageaudit response
type ProgramCodeData ¶
type ProgramCodeData struct { X float64 `json:"X" xml:"X"` Y float64 `json:"Y" xml:"Y"` Height float64 `json:"Height" xml:"Height"` Width float64 `json:"Width" xml:"Width"` }
ProgramCodeData is a nested struct in imageaudit response
type ProgramCodeDataList ¶
type ProgramCodeDataList struct {
ProgramCodeData []ProgramCodeData `json:"ProgramCodeData" xml:"ProgramCodeData"`
}
ProgramCodeDataList is a nested struct in imageaudit response
type Result ¶
type Result struct { Rate float64 `json:"Rate" xml:"Rate"` TaskId string `json:"TaskId" xml:"TaskId"` DataId string `json:"DataId" xml:"DataId"` Suggestion string `json:"Suggestion" xml:"Suggestion"` Label string `json:"Label" xml:"Label"` ImageURL string `json:"ImageURL" xml:"ImageURL"` SubResults []SubResult `json:"SubResults" xml:"SubResults"` Details []Detail `json:"Details" xml:"Details"` }
Result is a nested struct in imageaudit response
type ResultsInScanImage ¶
type ResultsInScanImage struct {
Result []Result `json:"Result" xml:"Result"`
}
ResultsInScanImage is a nested struct in imageaudit response
type ResultsInScanText ¶
type ResultsInScanText struct {
Result []Result `json:"Result" xml:"Result"`
}
ResultsInScanText is a nested struct in imageaudit response
type ScanImageRequest ¶
type ScanImageRequest struct { *requests.RpcRequest Scene *[]string `position:"Body" name:"Scene" type:"Repeated"` Task *[]ScanImageTask `position:"Body" name:"Task" type:"Repeated"` }
ScanImageRequest is the request struct for api ScanImage
func CreateScanImageRequest ¶
func CreateScanImageRequest() (request *ScanImageRequest)
CreateScanImageRequest creates a request to invoke ScanImage API
type ScanImageResponse ¶
type ScanImageResponse struct { *responses.BaseResponse RequestId string `json:"RequestId" xml:"RequestId"` Data Data `json:"Data" xml:"Data"` }
ScanImageResponse is the response struct for api ScanImage
func CreateScanImageResponse ¶
func CreateScanImageResponse() (response *ScanImageResponse)
CreateScanImageResponse creates a response to parse from ScanImage response
type ScanImageTask ¶
type ScanImageTask struct { DataId string `name:"DataId"` ImageURL string `name:"ImageURL"` MaxFrames string `name:"MaxFrames"` Interval string `name:"Interval"` ImageTimeMillisecond string `name:"ImageTimeMillisecond"` }
ScanImageTask is a repeated param struct in ScanImageRequest
type ScanTextLabels ¶
type ScanTextLabels struct {
Label string `name:"Label"`
}
ScanTextLabels is a repeated param struct in ScanTextRequest
type ScanTextRequest ¶
type ScanTextRequest struct { *requests.RpcRequest Labels *[]ScanTextLabels `position:"Body" name:"Labels" type:"Repeated"` Tasks *[]ScanTextTasks `position:"Body" name:"Tasks" type:"Repeated"` }
ScanTextRequest is the request struct for api ScanText
func CreateScanTextRequest ¶
func CreateScanTextRequest() (request *ScanTextRequest)
CreateScanTextRequest creates a request to invoke ScanText API
type ScanTextResponse ¶
type ScanTextResponse struct { *responses.BaseResponse RequestId string `json:"RequestId" xml:"RequestId"` Data Data `json:"Data" xml:"Data"` }
ScanTextResponse is the response struct for api ScanText
func CreateScanTextResponse ¶
func CreateScanTextResponse() (response *ScanTextResponse)
CreateScanTextResponse creates a response to parse from ScanText response
type ScanTextTasks ¶
type ScanTextTasks struct {
Content string `name:"Content"`
}
ScanTextTasks is a repeated param struct in ScanTextRequest
type SfaceData ¶
type SfaceData struct { X float64 `json:"X" xml:"X"` Y float64 `json:"Y" xml:"Y"` Height float64 `json:"Height" xml:"Height"` Width float64 `json:"Width" xml:"Width"` Faces []Face `json:"Faces" xml:"Faces"` }
SfaceData is a nested struct in imageaudit response
type SfaceDataList ¶
type SfaceDataList struct {
SfaceData []SfaceData `json:"SfaceData" xml:"SfaceData"`
}
SfaceDataList is a nested struct in imageaudit response
type SubResult ¶
type SubResult struct { Suggestion string `json:"Suggestion" xml:"Suggestion"` Rate float64 `json:"Rate" xml:"Rate"` Label string `json:"Label" xml:"Label"` Scene string `json:"Scene" xml:"Scene"` OCRDataList []string `json:"OCRDataList" xml:"OCRDataList"` Frames []Frame `json:"Frames" xml:"Frames"` SfaceDataList []SfaceData `json:"SfaceDataList" xml:"SfaceDataList"` HintWordsInfoList []HintWordsInfo `json:"HintWordsInfoList" xml:"HintWordsInfoList"` LogoDataList []LogoData `json:"LogoDataList" xml:"LogoDataList"` ProgramCodeDataList []ProgramCodeData `json:"ProgramCodeDataList" xml:"ProgramCodeDataList"` }
SubResult is a nested struct in imageaudit response
type SubResults ¶
type SubResults struct {
SubResult []SubResult `json:"SubResult" xml:"SubResult"`
}
SubResults is a nested struct in imageaudit response
Source Files ¶
- client.go
- endpoint.go
- scan_image.go
- scan_text.go
- struct_context.go
- struct_contexts.go
- struct_data.go
- struct_detail.go
- struct_details.go
- struct_element.go
- struct_elements.go
- struct_face.go
- struct_faces.go
- struct_frame.go
- struct_frames.go
- struct_hint_words_info.go
- struct_hint_words_info_list.go
- struct_logo_data.go
- struct_logo_data_list.go
- struct_ocr_data_list.go
- struct_program_code_data.go
- struct_program_code_data_list.go
- struct_result.go
- struct_results_in_scan_image.go
- struct_results_in_scan_text.go
- struct_sface_data.go
- struct_sface_data_list.go
- struct_sub_result.go
- struct_sub_results.go