aliyun

package
v0.0.0-...-a78f517 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GreenText

func GreenText(conf GreenTextConf) (bool, error)

func RequestApi

func RequestApi(conf AliyunApiRequestConf) ([]byte, error)

Types

type AliyunApiRequestConf

type AliyunApiRequestConf struct {
	AccessKeyId     string
	AccessKeySecret string

	BaseURL string
	Path    string
	Version string

	Data map[string]interface{}
}

type GreenTextConf

type GreenTextConf struct {
	AccessKeyId     string
	AccessKeySecret string
	Region          string
	Content         string
	DataID          string
}

type GreenTextResponse

type GreenTextResponse struct {
	Code int `json:"code"`
	Data []struct {
		Code    int    `json:"code"`
		Content string `json:"content"`
		DataID  string `json:"dataId"`
		Msg     string `json:"msg"`
		Results []struct {
			Details []struct {
				Contexts []struct {
					Context string `json:"context"`
				} `json:"contexts"`
				Label string `json:"label"`
			} `json:"details"`
			Label      string  `json:"label"`
			Rate       float64 `json:"rate"`
			Scene      string  `json:"scene"`
			Suggestion string  `json:"suggestion"`
		} `json:"results"`
		TaskID string `json:"taskId"`
	} `json:"data"`
	Msg       string `json:"msg"`
	RequestID string `json:"requestId"`
}

Jump to

Keyboard shortcuts

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