ali

package
v0.0.0-...-28699d0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MIME         = "application/json"
	ResultBlock  = "block"
	ResultPass   = "pass"
	ResultReview = "review"
)

Variables

This section is empty.

Functions

func MakeReqHeader

func MakeReqHeader(req *http.Request, uniqueID, bodyMd5Base64 string, accessKeyID, accessKeySecret string,
	path string, clientJSON []byte)

Types

type ClientInfo

type ClientInfo struct {
}

type ImageScanReq

type ImageScanReq struct {
	BizType string          `json:"bizType,omitempty"`
	Scenes  []string        `json:"scenes"`
	Tasks   []ImageScanTask `json:"tasks"`
}

type ImageScanResult

type ImageScanResult struct {
	Code    int           `json:"code"`
	DataId  string        `json:"dataId"` //nolint
	Msg     string        `json:"msg"`
	Results []SceneResult `json:"results"`
	TaskId  string        `json:"taskId"` //nolint
	URL     string        `json:"url"`
}

type ImageScanRsp

type ImageScanRsp struct {
	Code      int               `json:"code"`
	Msg       string            `json:"msg"`
	RequestId string            `json:"requestId"` //nolint
	Data      []ImageScanResult `json:"data"`
}

type ImageScanTask

type ImageScanTask struct {
	DataID    string `json:"dataId"`
	URL       string `json:"url"`
	MaxFrames int32  `json:"maxFrames"`
	Interval  int32  `json:"interval"`
}

type ImageScanner

type ImageScanner struct {
	AliServerURL    string
	BizType         string
	AccessKeyID     string
	AccessKeySecret string
	Scenes          []string
}

func (*ImageScanner) ImageScan

func (scanner *ImageScanner) ImageScan(uniqueID, imageURL string) (string, error)

type SceneResult

type SceneResult struct {
	Scene      string  `json:"scene"`
	Rate       float64 `json:"rate"`
	Label      string  `json:"label"`
	Suggestion string  `json:"suggestion"`
}

Jump to

Keyboard shortcuts

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