ugc

package
v0.0.0-...-2fb99e4 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseResponse

type BaseResponse struct{ pkg.BaseResponse }

type Conclusion

type Conclusion struct {
	Conclusion     string `json:"conclusion"`
	ConclusionType int    `json:"conclusionType"`
}

func (Conclusion) IsFailed

func (c Conclusion) IsFailed() bool

func (Conclusion) IsPassed

func (c Conclusion) IsPassed() bool

type ContentRequest

type ContentRequest struct {
	Text string `json:"text"`
}

func (*ContentRequest) ToMap

func (r *ContentRequest) ToMap() map[string]string

type ContentResponse

type ContentResponse struct {
	BaseResponse
	Conclusion
	Data DataResponses `json:"data"`
}

type DataResponse

type DataResponse struct {
	ErrorCode int    `json:"error_code"`
	ErrorMsg  string `json:"error_msg"`
	Conclusion
	Msg         string  `json:"msg"`
	Type        int     `json:"type"`
	SubType     int     `json:"subType"`
	Probability float64 `json:"probability"`
	DatasetName string  `json:"datasetName"`
	Stars       []struct {
		Name        string  `json:"name"`
		Probability float64 `json:"probability"`
		DatasetName string  `json:"datasetName"`
	} `json:"stars"`
	Hits []struct {
		Probability float64  `json:"probability"`
		DatasetName string   `json:"datasetName"`
		Words       []string `json:"words"`
	} `json:"hits"`
}

func (*DataResponse) Error

func (dr *DataResponse) Error() error

func (*DataResponse) Words

func (dr *DataResponse) Words() []string

type DataResponses

type DataResponses []DataResponse

func (DataResponses) Error

func (drs DataResponses) Error() error

type ImageRequest

type ImageRequest struct {
	Image   string `json:"image"`
	ImgUrl  string `json:"imgUrl"`
	ImgType int    `json:"imgType"`
}

func (*ImageRequest) ToMap

func (req *ImageRequest) ToMap() map[string]string

type ImageResponse

type ImageResponse struct {
	BaseResponse
	Conclusion
	Data DataResponses `json:"data"`
}

type SDK

type SDK struct {
	// contains filtered or unexported fields
}

func NewSDK

func NewSDK(token string, err error) SDK

func (SDK) Content

func (sdk SDK) Content(req *ContentRequest) (*ContentResponse, error)

func (SDK) Image

func (sdk SDK) Image(req *ImageRequest) (*ImageResponse, error)

func (SDK) Video

func (sdk SDK) Video(req *VideoRequest) (*VideoResponse, error)

type VideoRequest

type VideoRequest struct {
	Name     string `json:"name"`
	VideoURL string `json:"videoUrl"`
	ExtId    string `json:"extId"`
	ExtInfo  []struct {
		Subject string `json:"subject"`
		Fields  []struct {
			Title string `json:"title"`
			Value string `json:"value"`
		} `json:"fields"`
	} `json:"extInfo"`
}

func (*VideoRequest) ToMap

func (req *VideoRequest) ToMap() map[string]string

type VideoResponse

type VideoResponse struct {
	BaseResponse
	Conclusion
	Frames []struct {
		Conclusion
		FrameTimeStamp    int64         `json:"frameTimeStamp"`
		FrameUrl          string        `json:"frameUrl"`
		FrameThumbnailUrl string        `json:"frameThumbnailUrl"`
		Data              DataResponses `json:"data"`
	} `json:"frames"`
}

Jump to

Keyboard shortcuts

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