api

package
v0.9.160 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	URI_PREFIX = bce.URI_PREFIX + "v2"
	VIDEO_URI  = "/videolib"
	IMAGE_URI  = "/imagelib"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseRequest

type BaseRequest struct {
	Source       string `json:"source"`
	Description  string `json:"description"`
	Notification string `json:"notification"`
	NeedTag      bool   `json:"needTag"`
}

type BaseResponse

type BaseResponse struct {
	TaskID      string  `json:"taskId"`
	Status      string  `json:"status"`
	Description string  `json:"description"`
	Duration    float64 `json:"duration"`
	Error       struct {
		Code    string `json:"code"`
		Message string `json:"message"`
	} `json:"error"`
	Lib        string    `json:"lib"`
	Source     string    `json:"source"`
	UpdateTime time.Time `json:"updateTime"`
	StartTime  time.Time `json:"startTime"`
	FinishTime time.Time `json:"finishTime"`
	CreateTime time.Time `json:"createTime,"`
}

func DeleteImage

func DeleteImage(cli bce.Client, lib, source string) (*BaseResponse, error)

func DeleteImageById added in v0.9.109

func DeleteImageById(cli bce.Client, libId, mediaId string) (*BaseResponse, error)

func DeleteVideo

func DeleteVideo(cli bce.Client, lib, source string) (*BaseResponse, error)

func DeleteVideoById added in v0.9.109

func DeleteVideoById(cli bce.Client, libId, mediaId string) (*BaseResponse, error)

func GetInsertVideoResult

func GetInsertVideoResult(cli bce.Client, lib, source string) (*BaseResponse, error)

func GetInsertVideoResultById added in v0.9.109

func GetInsertVideoResultById(cli bce.Client, libId, mediaId string) (*BaseResponse, error)

func InsertImage

func InsertImage(cli bce.Client, lib string, args *BaseRequest) (*BaseResponse, error)

func InsertVideo

func InsertVideo(cli bce.Client, lib string, args *BaseRequest) (*BaseResponse, error)

type MatchFrame

type MatchFrame struct {
	Distance  float64 `json:"distance"`
	Position  int     `json:"position"`
	Timestamp float64 `json:"timestamp"`
}

type SearchTaskResult

type SearchTaskResult struct {
	Cover       string       `json:"cover"`
	Description string       `json:"description"`
	Distance    float64      `json:"distance"`
	Duration    float64      `json:"duration"`
	ID          string       `json:"id"`
	Name        string       `json:"name"`
	Score       float64      `json:"score"`
	Source      string       `json:"source"`
	Type        string       `json:"type"`
	Frames      []MatchFrame `json:"frames"`
	Clips       []VideoClip  `json:"clips"`
}

type SearchTaskResultResponse

type SearchTaskResultResponse struct {
	BaseResponse
	Results    []SearchTaskResult `json:"results"`
	TagResults []SearchTaskResult `json:"tagResults"`
}

func GetSearchVideoByVideoResult

func GetSearchVideoByVideoResult(cli bce.Client, lib, source string) (*SearchTaskResultResponse, error)

func GetSearchVideoByVideoResultById added in v0.9.109

func GetSearchVideoByVideoResultById(cli bce.Client, lib, taskId string) (*SearchTaskResultResponse, error)

func SearchImageByImage

func SearchImageByImage(cli bce.Client, lib string, args *BaseRequest) (*SearchTaskResultResponse, error)

func SearchVideoByImage

func SearchVideoByImage(cli bce.Client, lib string, args *BaseRequest) (*SearchTaskResultResponse, error)

func SearchVideoByVideo

func SearchVideoByVideo(cli bce.Client, lib string, args *BaseRequest) (*SearchTaskResultResponse, error)

type VideoClip

type VideoClip struct {
	Clip            bool    `json:"clip"`
	ClipNum         int     `json:"clipNum"`
	Distance        float64 `json:"distance"`
	FrameNum        int     `json:"frameNum"`
	InputEndPos     int     `json:"inputEndPos"`
	InputEndTime    float64 `json:"inputEndTime"`
	InputStartPos   int     `json:"inputStartPos"`
	InputStartTime  float64 `json:"inputStartTime"`
	InputSumTime    float64 `json:"inputSumTime"`
	MatchNum        int     `json:"matchNum"`
	OutputEndPos    int     `json:"outputEndPos"`
	OutputEndTime   float64 `json:"outputEndTime"`
	OutputStartPos  int     `json:"outputStartPos"`
	OutputStartTime float64 `json:"outputStartTime"`
	OutputSumTime   float64 `json:"outputSumTime"`
	PreIdx          int     `json:"preIdx"`
}

Jump to

Keyboard shortcuts

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