Documentation
¶
Index ¶
- Constants
- Variables
- type BasicResourceResponse
- type BasicResourceResult
- type BatchAppendRequest
- type CommonResponse
- type CreateTaskRequest
- type CreateTtsResourceRequest
- type EditTaskRequest
- type FailItem
- type FetchVoiceResourceRequest
- type ForbidTimeItem
- type GetResourceResult
- type JsonTime
- type Notify
- func (p *Notify) BatchAppend(req *BatchAppendRequest) (*TaskAppendResponse, int, error)
- func (p *Notify) CommitVoiceResourceUpload(req *UploadVoiceResourceRequest) (*BasicResourceResponse, int, error)
- func (p *Notify) CreateTask(req *CreateTaskRequest) (*TaskAppendResponse, int, error)
- func (p *Notify) CreateTtsResource(req *CreateTtsResourceRequest) (*BasicResourceResponse, int, error)
- func (p *Notify) DeleteResourceByResourceKey(resourceKey string) (*CommonResponse, int, error)
- func (p *Notify) FetchVoiceResourceByUrl(req *FetchVoiceResourceRequest) (*BasicResourceResponse, int, error)
- func (p *Notify) GenerateVoiceResourceUploadUrl(req *UploadVoiceResourceRequest) (*BasicResourceResponse, int, error)
- func (p *Notify) GetAPIInfo(api string) *base.ApiInfo
- func (p *Notify) GetServiceInfo() *base.ServiceInfo
- func (p *Notify) OpenUpdateResource(resourceKey string, name string) (*BasicResourceResponse, int, error)
- func (p *Notify) PauseTask(taskOpenId string) (*CommonResponse, int, error)
- func (p *Notify) QueryOpenGetResource(req *QueryOpenGetResourceRequest) (*QueryOpenGetResourceResponse, int, error)
- func (p *Notify) QueryUsableResource(resourceType string) (*QueryUsableResourceResponse, int, error)
- func (p *Notify) ResumeTask(taskOpenId string) (*CommonResponse, int, error)
- func (p *Notify) SetHost(host string)
- func (p *Notify) SetRegion(region string)
- func (p *Notify) SetSchema(schema string)
- func (p *Notify) SingleBatchAppend(req *SingleAppendRequest) (*SingleAppendResponse, int, error)
- func (p *Notify) SingleCancel(taskOpenId string) (*CommonResponse, int, error)
- func (p *Notify) SingleInfo(taskOpenId string) (*SingleInfoResponse, int, error)
- func (p *Notify) StopTask(taskOpenId string) (*CommonResponse, int, error)
- func (p *Notify) UpdateTask(req *EditTaskRequest) (*TaskAppendResponse, int, error)
- type PhoneParam
- type QueryOpenGetResourceRequest
- type QueryOpenGetResourceResponse
- type QueryUsableResourceResponse
- type Resource
- type SingleAppendRequest
- type SingleAppendResponse
- type SingleAppendResult
- type SingleInfo
- type SingleInfoResponse
- type SingleParam
- type SingleResultItem
- type TaskAppendResponse
- type TaskAppendResult
- type UploadVoiceResourceRequest
Constants ¶
View Source
const ( DefaultRegion = "cn-north-1" ServiceVersion = "2021-01-01" ServiceName = "volc_voice_notify" )
View Source
const TIME_LAYOUT = "2006-01-02 15:04:05"
Variables ¶
View Source
var ( ServiceInfo = &base.ServiceInfo{ Timeout: 5 * time.Second, Host: "cloud-vms.volcengineapi.com", Header: http.Header{ "Accept": []string{"application/json"}, }, } ApiInfoList = map[string]*base.ApiInfo{ "CreateTask": { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{"CreateTask"}, "Version": []string{ServiceVersion}, }, }, "BatchAppend": { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{"BatchAppend"}, "Version": []string{ServiceVersion}, }, }, "PauseTask": { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{"PauseTask"}, "Version": []string{ServiceVersion}, }, }, "ResumeTask": { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{"ResumeTask"}, "Version": []string{ServiceVersion}, }, }, "StopTask": { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{"StopTask"}, "Version": []string{ServiceVersion}, }, }, "UpdateTask": { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{"UpdateTask"}, "Version": []string{ServiceVersion}, }, }, "SingleBatchAppend": { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{"SingleBatchAppend"}, "Version": []string{ServiceVersion}, }, }, "SingleInfo": { Method: http.MethodGet, Path: "/", Query: url.Values{ "Action": []string{"SingleInfo"}, "Version": []string{ServiceVersion}, }, }, "SingleCancel": { Method: http.MethodGet, Path: "/", Query: url.Values{ "Action": []string{"SingleCancel"}, "Version": []string{ServiceVersion}, }, }, "FetchResource": { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{"FetchResource"}, "Version": []string{ServiceVersion}, }, }, "OpenCreateTts": { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{"OpenCreateTts"}, "Version": []string{ServiceVersion}, }, }, "OpenDeleteResource": { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{"OpenDeleteResource"}, "Version": []string{ServiceVersion}, }, }, "GetResourceUploadUrl": { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{"GetResourceUploadUrl"}, "Version": []string{ServiceVersion}, }, }, "CommitResourceUpload": { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{"CommitResourceUpload"}, "Version": []string{ServiceVersion}, }, }, "OpenUpdateResource": { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{"OpenUpdateResource"}, "Version": []string{ServiceVersion}, }, }, "QueryUsableResource": { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{"QueryUsableResource"}, "Version": []string{ServiceVersion}, }, }, "QueryOpenGetResource": { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{"QueryOpenGetResource"}, "Version": []string{ServiceVersion}, }, }, } )
View Source
var DefaultInstance = NewInstance()
DefaultInstance 默认的实例
Functions ¶
This section is empty.
Types ¶
type BasicResourceResponse ¶
type BasicResourceResponse struct {
ResponseMetadata *base.ResponseMetadata
Result *BasicResourceResult
}
type BasicResourceResult ¶
type BatchAppendRequest ¶
type BatchAppendRequest struct {
TaskOpenId string
PhoneList []*PhoneParam
}
type CommonResponse ¶
type CommonResponse struct {
ResponseMetadata *base.ResponseMetadata
}
type CreateTaskRequest ¶
type CreateTaskRequest struct {
Name string
PhoneList []*PhoneParam
Resource string
StartTime JsonTime
EndTime JsonTime
Concurrency int32
Start bool `json:",omitempty"`
MaxRingDuration int32 `json:",omitempty"`
//max 3
RingAgainTimes int32 `json:",omitempty"`
//min 5
RingAgainInterval int32 `json:",omitempty"`
Unique bool
ForbidTimeList []*ForbidTimeItem `json:",omitempty"`
NumberPoolNo string
NumberList []string `json:",omitempty"`
SelectNumberType int32
SelectNumberRule int32
Type int32
FinishWhenListEnd bool `json:",omitempty"`
}
type EditTaskRequest ¶
type ForbidTimeItem ¶
type GetResourceResult ¶
type JsonTime ¶
func (JsonTime) UnmarshalJSON ¶
type Notify ¶
IAM .
func (*Notify) BatchAppend ¶
func (p *Notify) BatchAppend(req *BatchAppendRequest) (*TaskAppendResponse, int, error)
func (*Notify) CommitVoiceResourceUpload ¶
func (p *Notify) CommitVoiceResourceUpload(req *UploadVoiceResourceRequest) (*BasicResourceResponse, int, error)
func (*Notify) CreateTask ¶
func (p *Notify) CreateTask(req *CreateTaskRequest) (*TaskAppendResponse, int, error)
func (*Notify) CreateTtsResource ¶
func (p *Notify) CreateTtsResource(req *CreateTtsResourceRequest) (*BasicResourceResponse, int, error)
func (*Notify) DeleteResourceByResourceKey ¶
func (p *Notify) DeleteResourceByResourceKey(resourceKey string) (*CommonResponse, int, error)
func (*Notify) FetchVoiceResourceByUrl ¶
func (p *Notify) FetchVoiceResourceByUrl(req *FetchVoiceResourceRequest) (*BasicResourceResponse, int, error)
func (*Notify) GenerateVoiceResourceUploadUrl ¶
func (p *Notify) GenerateVoiceResourceUploadUrl(req *UploadVoiceResourceRequest) (*BasicResourceResponse, int, error)
func (*Notify) GetAPIInfo ¶
GetAPIInfo interface
func (*Notify) GetServiceInfo ¶
func (p *Notify) GetServiceInfo() *base.ServiceInfo
GetServiceInfo interface
func (*Notify) OpenUpdateResource ¶
func (*Notify) PauseTask ¶
func (p *Notify) PauseTask(taskOpenId string) (*CommonResponse, int, error)
func (*Notify) QueryOpenGetResource ¶
func (p *Notify) QueryOpenGetResource(req *QueryOpenGetResourceRequest) (*QueryOpenGetResourceResponse, int, error)
func (*Notify) QueryUsableResource ¶
func (p *Notify) QueryUsableResource(resourceType string) (*QueryUsableResourceResponse, int, error)
func (*Notify) ResumeTask ¶
func (p *Notify) ResumeTask(taskOpenId string) (*CommonResponse, int, error)
func (*Notify) SingleBatchAppend ¶
func (p *Notify) SingleBatchAppend(req *SingleAppendRequest) (*SingleAppendResponse, int, error)
func (*Notify) SingleCancel ¶
func (p *Notify) SingleCancel(taskOpenId string) (*CommonResponse, int, error)
func (*Notify) SingleInfo ¶
func (p *Notify) SingleInfo(taskOpenId string) (*SingleInfoResponse, int, error)
func (*Notify) StopTask ¶
func (p *Notify) StopTask(taskOpenId string) (*CommonResponse, int, error)
func (*Notify) UpdateTask ¶
func (p *Notify) UpdateTask(req *EditTaskRequest) (*TaskAppendResponse, int, error)
type PhoneParam ¶
type QueryOpenGetResourceResponse ¶
type QueryOpenGetResourceResponse struct {
ResponseMetadata *base.ResponseMetadata
Result *GetResourceResult
}
type QueryUsableResourceResponse ¶
type QueryUsableResourceResponse struct {
ResponseMetadata *base.ResponseMetadata
Result []*Resource
}
type SingleAppendRequest ¶
type SingleAppendRequest struct {
List []*SingleParam
}
type SingleAppendResponse ¶
type SingleAppendResponse struct {
ResponseMetadata *base.ResponseMetadata
Result *SingleAppendResult
}
type SingleAppendResult ¶
type SingleAppendResult struct {
SuccessList []*SingleResultItem
FailList []*SingleResultItem
}
type SingleInfo ¶
type SingleInfoResponse ¶
type SingleInfoResponse struct {
ResponseMetadata *base.ResponseMetadata
Result *SingleInfo
}
type SingleParam ¶
type SingleParam struct {
SingleOpenId string
Phone string
Resource string
TriggerTime JsonTime `json:",omitempty"`
//max 3
RingAgainTimes int32 `json:",omitempty"`
//min 5
RingAgainInterval int32 `json:",omitempty"`
PhoneParam map[string]interface{}
TtsContent string
Ext string
NumberPoolNo string
NumberList []string `json:",omitempty"`
NumberType int32
Type int32
SelectNumberRule int32 `json:",omitempty"`
ForbidTimeList []*ForbidTimeItem `json:",omitempty"`
}
type SingleResultItem ¶
type TaskAppendResponse ¶
type TaskAppendResponse struct {
ResponseMetadata *base.ResponseMetadata
Result *TaskAppendResult
}
type TaskAppendResult ¶
type UploadVoiceResourceRequest ¶
type UploadVoiceResourceRequest struct {
FileName string
}
Click to show internal directories.
Click to hide internal directories.