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 (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"` }
Click to show internal directories.
Click to hide internal directories.