Documentation ¶
Index ¶
- Constants
- func Fail(w http.ResponseWriter, message string)
- func GetUUID() string
- func GetXTime() string
- func Init(addr string, ops ...Options) error
- func ReplaceText(text string) string
- func Success(w http.ResponseWriter, data interface{})
- type Conn
- type ConnAzure
- type ConnBing
- type ConnModule
- type IConn
- type Option
- type Options
- type Resp
- type Server
- type StatResp
- type Writer
- type WriterFile
- type WriterQiniu
Constants ¶
View Source
const ( XiaoxiaoNeural = "zh-CN-XiaoxiaoNeural" // Xiaoxiao (Neural) - 晓晓 'general', 'assistant', 'chat', 'customerservice', 'newscast', 'affectionate', 'angry', 'calm', 'cheerful', 'disgruntled', 'fearful', 'gentle', 'lyrical', 'sad', 'serious' YunyangNeural = "zh-CN-YunyangNeural" // Yunyang (Neural) - 云扬 'general', 'customerservice', 'narration-professional', 'newscast-casual' XiaochenNeural = "zh-CN-XiaochenNeural" // Xiaochen (Neural) - 晓辰 'general' XiaohanNeural = "zh-CN-XiaohanNeural" // Xiaohan (Neural) - 晓涵 'general', 'calm', 'fearful', 'cheerful', 'disgruntled', 'serious', 'angry', 'sad', 'gentle', 'affectionate', 'embarrassed' XiaomoNeural = "zh-CN-XiaomoNeural" // Xiaomo (Neural) - 晓墨 'general', 'embarrassed', 'calm', 'fearful', 'cheerful', 'disgruntled', 'serious', 'angry', 'sad', 'depressed', 'affectionate', 'gentle', 'envious' XiaoqiuNeural = "zh-CN-XiaoqiuNeural" // Xiaoqiu (Neural) - 晓秋 'general' XiaoruiNeural = "zh-CN-XiaoruiNeural" // Xiaorui (Neural) - 晓睿 'general', 'calm', 'fearful', 'angry', 'sad' XiaoshuangNeural = "zh-CN-XiaoshuangNeural" // Xiaoshuang (Neural) - 晓双 'general', 'chat' XiaoxuanNeural = "zh-CN-XiaoxuanNeural" // Xiaoxuan (Neural) - 晓萱 'general', 'calm', 'fearful', 'cheerful', 'disgruntled', 'serious', 'angry', 'gentle', 'depressed' XiaoyanNeural = "zh-CN-XiaoyanNeural" // Xiaoyan (Neural) - 晓颜 'general' XiaoyouNeural = "zh-CN-XiaoyouNeural" // Xiaoyou (Neural) - 晓悠 'general' YunxiNeural = "zh-CN-YunxiNeural" // Yunxi (Neural) - 云希 'general', 'narration-relaxed', 'embarrassed', 'fearful', 'cheerful', 'disgruntled', 'serious', 'angry', 'sad', 'depressed', 'chat', 'assistant', 'newscast' YunyeNeural = "zh-CN-YunyeNeural" // Yunye (Neural) - 云野 'general', 'embarrassed', 'calm', 'fearful', 'cheerful', 'disgruntled', 'serious', 'angry', 'sad' )
Variables ¶
This section is empty.
Functions ¶
func Fail ¶
func Fail(w http.ResponseWriter, message string)
func ReplaceText ¶
func Success ¶
func Success(w http.ResponseWriter, data interface{})
Types ¶
type ConnAzure ¶
type ConnAzure struct {
Conn // Exceeded maximum websocket connection duration(> 1200000ms)
}
type ConnModule ¶
type ConnModule string
const ( ConnModuleAzure ConnModule = "azure" ConnModuleBing ConnModule = "bing" )
type IConn ¶
type IConn interface { Read(s *Server) Write(reqId, text, voice string) error Init(token string) Heartbeat(s *Server) GetID() string }
func GetConn ¶
func GetConn(v interface{}, module ConnModule) IConn
func NewConn ¶
func NewConn(module ConnModule) IConn
type Options ¶
type Options func(option *Option)
func WithModule ¶
func WithModule(module ConnModule) Options
func WithWriter ¶
type Server ¶
type WriterFile ¶
type WriterFile struct {
Path string
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.