imageaudit

package
v1.62.686 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 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 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) 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 {
	Results  []Result  `json:"Results" xml:"Results"`
	Elements []Element `json:"Elements" xml:"Elements"`
}

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 {
	Name string  `json:"Name" xml:"Name"`
	Id   string  `json:"Id" xml:"Id"`
	Rate float64 `json:"Rate" xml:"Rate"`
}

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 Frame

type Frame struct {
	URL  string  `json:"URL" xml:"URL"`
	Rate float64 `json:"Rate" xml:"Rate"`
}

Frame 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"`
	Width  float64 `json:"Width" xml:"Width"`
	Height float64 `json:"Height" xml:"Height"`
	Y      float64 `json:"Y" xml:"Y"`
	Name   string  `json:"Name" xml:"Name"`
	X      float64 `json:"X" xml:"X"`
}

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 {
	Width  float64 `json:"Width" xml:"Width"`
	Height float64 `json:"Height" xml:"Height"`
	Y      float64 `json:"Y" xml:"Y"`
	X      float64 `json:"X" xml:"X"`
}

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"`
	DataId     string      `json:"DataId" xml:"DataId"`
	TaskId     string      `json:"TaskId" xml:"TaskId"`
	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 {
	Width  float64 `json:"Width" xml:"Width"`
	Height float64 `json:"Height" xml:"Height"`
	Y      float64 `json:"Y" xml:"Y"`
	X      float64 `json:"X" xml:"X"`
	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"`
	Label               string            `json:"Label" xml:"Label"`
	Scene               string            `json:"Scene" xml:"Scene"`
	Rate                float64           `json:"Rate" xml:"Rate"`
	OCRDataList         []string          `json:"OCRDataList" xml:"OCRDataList"`
	SfaceDataList       []SfaceData       `json:"SfaceDataList" xml:"SfaceDataList"`
	HintWordsInfoList   []HintWordsInfo   `json:"HintWordsInfoList" xml:"HintWordsInfoList"`
	ProgramCodeDataList []ProgramCodeData `json:"ProgramCodeDataList" xml:"ProgramCodeDataList"`
	Frames              []Frame           `json:"Frames" xml:"Frames"`
	LogoDataList        []LogoData        `json:"LogoDataList" xml:"LogoDataList"`
}

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

Jump to

Keyboard shortcuts

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