videorecog

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 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) DetectVideoShot

func (client *Client) DetectVideoShot(request *DetectVideoShotRequest) (response *DetectVideoShotResponse, err error)

DetectVideoShot invokes the videorecog.DetectVideoShot API synchronously

func (*Client) DetectVideoShotWithCallback

func (client *Client) DetectVideoShotWithCallback(request *DetectVideoShotRequest, callback func(response *DetectVideoShotResponse, err error)) <-chan int

DetectVideoShotWithCallback invokes the videorecog.DetectVideoShot API asynchronously

func (*Client) DetectVideoShotWithChan

func (client *Client) DetectVideoShotWithChan(request *DetectVideoShotRequest) (<-chan *DetectVideoShotResponse, <-chan error)

DetectVideoShotWithChan invokes the videorecog.DetectVideoShot API asynchronously

func (*Client) GenerateVideoCover

func (client *Client) GenerateVideoCover(request *GenerateVideoCoverRequest) (response *GenerateVideoCoverResponse, err error)

GenerateVideoCover invokes the videorecog.GenerateVideoCover API synchronously

func (*Client) GenerateVideoCoverWithCallback

func (client *Client) GenerateVideoCoverWithCallback(request *GenerateVideoCoverRequest, callback func(response *GenerateVideoCoverResponse, err error)) <-chan int

GenerateVideoCoverWithCallback invokes the videorecog.GenerateVideoCover API asynchronously

func (*Client) GenerateVideoCoverWithChan

func (client *Client) GenerateVideoCoverWithChan(request *GenerateVideoCoverRequest) (<-chan *GenerateVideoCoverResponse, <-chan error)

GenerateVideoCoverWithChan invokes the videorecog.GenerateVideoCover API asynchronously

func (*Client) GetAsyncJobResult

func (client *Client) GetAsyncJobResult(request *GetAsyncJobResultRequest) (response *GetAsyncJobResultResponse, err error)

GetAsyncJobResult invokes the videorecog.GetAsyncJobResult API synchronously

func (*Client) GetAsyncJobResultWithCallback

func (client *Client) GetAsyncJobResultWithCallback(request *GetAsyncJobResultRequest, callback func(response *GetAsyncJobResultResponse, err error)) <-chan int

GetAsyncJobResultWithCallback invokes the videorecog.GetAsyncJobResult API asynchronously

func (*Client) GetAsyncJobResultWithChan

func (client *Client) GetAsyncJobResultWithChan(request *GetAsyncJobResultRequest) (<-chan *GetAsyncJobResultResponse, <-chan error)

GetAsyncJobResultWithChan invokes the videorecog.GetAsyncJobResult API asynchronously

func (*Client) RecognizeVideoCastCrewList

func (client *Client) RecognizeVideoCastCrewList(request *RecognizeVideoCastCrewListRequest) (response *RecognizeVideoCastCrewListResponse, err error)

RecognizeVideoCastCrewList invokes the videorecog.RecognizeVideoCastCrewList API synchronously

func (*Client) RecognizeVideoCastCrewListWithCallback

func (client *Client) RecognizeVideoCastCrewListWithCallback(request *RecognizeVideoCastCrewListRequest, callback func(response *RecognizeVideoCastCrewListResponse, err error)) <-chan int

RecognizeVideoCastCrewListWithCallback invokes the videorecog.RecognizeVideoCastCrewList API asynchronously

func (*Client) RecognizeVideoCastCrewListWithChan

func (client *Client) RecognizeVideoCastCrewListWithChan(request *RecognizeVideoCastCrewListRequest) (<-chan *RecognizeVideoCastCrewListResponse, <-chan error)

RecognizeVideoCastCrewListWithChan invokes the videorecog.RecognizeVideoCastCrewList API asynchronously

func (*Client) SplitVideoParts

func (client *Client) SplitVideoParts(request *SplitVideoPartsRequest) (response *SplitVideoPartsResponse, err error)

SplitVideoParts invokes the videorecog.SplitVideoParts API synchronously

func (*Client) SplitVideoPartsWithCallback

func (client *Client) SplitVideoPartsWithCallback(request *SplitVideoPartsRequest, callback func(response *SplitVideoPartsResponse, err error)) <-chan int

SplitVideoPartsWithCallback invokes the videorecog.SplitVideoParts API asynchronously

func (*Client) SplitVideoPartsWithChan

func (client *Client) SplitVideoPartsWithChan(request *SplitVideoPartsRequest) (<-chan *SplitVideoPartsResponse, <-chan error)

SplitVideoPartsWithChan invokes the videorecog.SplitVideoParts API asynchronously

func (*Client) UnderstandVideoContent

func (client *Client) UnderstandVideoContent(request *UnderstandVideoContentRequest) (response *UnderstandVideoContentResponse, err error)

UnderstandVideoContent invokes the videorecog.UnderstandVideoContent API synchronously

func (*Client) UnderstandVideoContentWithCallback

func (client *Client) UnderstandVideoContentWithCallback(request *UnderstandVideoContentRequest, callback func(response *UnderstandVideoContentResponse, err error)) <-chan int

UnderstandVideoContentWithCallback invokes the videorecog.UnderstandVideoContent API asynchronously

func (*Client) UnderstandVideoContentWithChan

func (client *Client) UnderstandVideoContentWithChan(request *UnderstandVideoContentRequest) (<-chan *UnderstandVideoContentResponse, <-chan error)

UnderstandVideoContentWithChan invokes the videorecog.UnderstandVideoContent API asynchronously

type Data

type Data struct {
	JobId        string                 `json:"JobId" xml:"JobId"`
	Result       string                 `json:"Result" xml:"Result"`
	ErrorMessage string                 `json:"ErrorMessage" xml:"ErrorMessage"`
	TagInfo      map[string]interface{} `json:"TagInfo" xml:"TagInfo"`
	Status       string                 `json:"Status" xml:"Status"`
	ErrorCode    string                 `json:"ErrorCode" xml:"ErrorCode"`
	ShotFrameIds []int                  `json:"ShotFrameIds" xml:"ShotFrameIds"`
	VideoInfo    VideoInfo              `json:"VideoInfo" xml:"VideoInfo"`
	Elements     []Elements             `json:"Elements" xml:"Elements"`
	Outputs      []Output               `json:"Outputs" xml:"Outputs"`
}

Data is a nested struct in videorecog response

type DetectVideoShotRequest

type DetectVideoShotRequest struct {
	*requests.RpcRequest
	Async    requests.Boolean `position:"Body" name:"Async"`
	VideoUrl string           `position:"Body" name:"VideoUrl"`
}

DetectVideoShotRequest is the request struct for api DetectVideoShot

func CreateDetectVideoShotRequest

func CreateDetectVideoShotRequest() (request *DetectVideoShotRequest)

CreateDetectVideoShotRequest creates a request to invoke DetectVideoShot API

type DetectVideoShotResponse

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

DetectVideoShotResponse is the response struct for api DetectVideoShot

func CreateDetectVideoShotResponse

func CreateDetectVideoShotResponse() (response *DetectVideoShotResponse)

CreateDetectVideoShotResponse creates a response to parse from DetectVideoShot response

type Elements

type Elements struct {
	EndTime   float64 `json:"EndTime" xml:"EndTime"`
	BeginTime float64 `json:"BeginTime" xml:"BeginTime"`
	Index     int64   `json:"Index" xml:"Index"`
}

Elements is a nested struct in videorecog response

type ElementsInSplitVideoParts

type ElementsInSplitVideoParts struct {
	Elements []Elements `json:"elements" xml:"elements"`
}

ElementsInSplitVideoParts is a nested struct in videorecog response

type GenerateVideoCoverRequest

type GenerateVideoCoverRequest struct {
	*requests.RpcRequest
	IsGif    requests.Boolean `position:"Body" name:"IsGif"`
	Async    requests.Boolean `position:"Body" name:"Async"`
	VideoUrl string           `position:"Body" name:"VideoUrl"`
}

GenerateVideoCoverRequest is the request struct for api GenerateVideoCover

func CreateGenerateVideoCoverRequest

func CreateGenerateVideoCoverRequest() (request *GenerateVideoCoverRequest)

CreateGenerateVideoCoverRequest creates a request to invoke GenerateVideoCover API

type GenerateVideoCoverResponse

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

GenerateVideoCoverResponse is the response struct for api GenerateVideoCover

func CreateGenerateVideoCoverResponse

func CreateGenerateVideoCoverResponse() (response *GenerateVideoCoverResponse)

CreateGenerateVideoCoverResponse creates a response to parse from GenerateVideoCover response

type GetAsyncJobResultRequest

type GetAsyncJobResultRequest struct {
	*requests.RpcRequest
	JobId string           `position:"Body" name:"JobId"`
	Async requests.Boolean `position:"Body" name:"Async"`
}

GetAsyncJobResultRequest is the request struct for api GetAsyncJobResult

func CreateGetAsyncJobResultRequest

func CreateGetAsyncJobResultRequest() (request *GetAsyncJobResultRequest)

CreateGetAsyncJobResultRequest creates a request to invoke GetAsyncJobResult API

type GetAsyncJobResultResponse

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

GetAsyncJobResultResponse is the response struct for api GetAsyncJobResult

func CreateGetAsyncJobResultResponse

func CreateGetAsyncJobResultResponse() (response *GetAsyncJobResultResponse)

CreateGetAsyncJobResultResponse creates a response to parse from GetAsyncJobResult response

type Output

type Output struct {
	ImageURL   string  `json:"ImageURL" xml:"ImageURL"`
	Confidence float64 `json:"Confidence" xml:"Confidence"`
}

Output is a nested struct in videorecog response

type Outputs

type Outputs struct {
	Output []Output `json:"Output" xml:"Output"`
}

Outputs is a nested struct in videorecog response

type RecognizeVideoCastCrewListRequest

type RecognizeVideoCastCrewListRequest struct {
	*requests.RpcRequest
	Params      string           `position:"Body" name:"Params"`
	Async       requests.Boolean `position:"Body" name:"Async"`
	RegisterUrl string           `position:"Body" name:"RegisterUrl"`
	VideoUrl    string           `position:"Body" name:"VideoUrl"`
}

RecognizeVideoCastCrewListRequest is the request struct for api RecognizeVideoCastCrewList

func CreateRecognizeVideoCastCrewListRequest

func CreateRecognizeVideoCastCrewListRequest() (request *RecognizeVideoCastCrewListRequest)

CreateRecognizeVideoCastCrewListRequest creates a request to invoke RecognizeVideoCastCrewList API

type RecognizeVideoCastCrewListResponse

type RecognizeVideoCastCrewListResponse struct {
	*responses.BaseResponse
}

RecognizeVideoCastCrewListResponse is the response struct for api RecognizeVideoCastCrewList

func CreateRecognizeVideoCastCrewListResponse

func CreateRecognizeVideoCastCrewListResponse() (response *RecognizeVideoCastCrewListResponse)

CreateRecognizeVideoCastCrewListResponse creates a response to parse from RecognizeVideoCastCrewList response

type ShotFrameIds

type ShotFrameIds struct {
	ShotFrameId []int `json:"ShotFrameId" xml:"ShotFrameId"`
}

ShotFrameIds is a nested struct in videorecog response

type SplitVideoPartsRequest

type SplitVideoPartsRequest struct {
	*requests.RpcRequest
	Async    requests.Boolean `position:"Body" name:"Async"`
	VideoUrl string           `position:"Body" name:"VideoUrl"`
}

SplitVideoPartsRequest is the request struct for api SplitVideoParts

func CreateSplitVideoPartsRequest

func CreateSplitVideoPartsRequest() (request *SplitVideoPartsRequest)

CreateSplitVideoPartsRequest creates a request to invoke SplitVideoParts API

type SplitVideoPartsResponse

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

SplitVideoPartsResponse is the response struct for api SplitVideoParts

func CreateSplitVideoPartsResponse

func CreateSplitVideoPartsResponse() (response *SplitVideoPartsResponse)

CreateSplitVideoPartsResponse creates a response to parse from SplitVideoParts response

type UnderstandVideoContentRequest

type UnderstandVideoContentRequest struct {
	*requests.RpcRequest
	Async    requests.Boolean `position:"Body" name:"Async"`
	VideoURL string           `position:"Body" name:"VideoURL"`
}

UnderstandVideoContentRequest is the request struct for api UnderstandVideoContent

func CreateUnderstandVideoContentRequest

func CreateUnderstandVideoContentRequest() (request *UnderstandVideoContentRequest)

CreateUnderstandVideoContentRequest creates a request to invoke UnderstandVideoContent API

type UnderstandVideoContentResponse

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

UnderstandVideoContentResponse is the response struct for api UnderstandVideoContent

func CreateUnderstandVideoContentResponse

func CreateUnderstandVideoContentResponse() (response *UnderstandVideoContentResponse)

CreateUnderstandVideoContentResponse creates a response to parse from UnderstandVideoContent response

type VideoInfo

type VideoInfo struct {
	Width    int64   `json:"Width" xml:"Width"`
	Height   int64   `json:"Height" xml:"Height"`
	Duration int64   `json:"Duration" xml:"Duration"`
	Fps      float64 `json:"Fps" xml:"Fps"`
}

VideoInfo is a nested struct in videorecog response

Jump to

Keyboard shortcuts

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