Documentation
¶
Overview ¶
Package vsiface provides an interface to enable mocking the VS service client for testing your code.
It is important to note that this interface will have breaking changes when the service model is updated and adds new API operations, paginators, and waiters.
Index ¶
- Constants
- type CreateVoiceTaskInput
- func (s CreateVoiceTaskInput) GoString() string
- func (s *CreateVoiceTaskInput) SetDisplayNum(v string) *CreateVoiceTaskInput
- func (s *CreateVoiceTaskInput) SetMaxHangUpTime(v int32) *CreateVoiceTaskInput
- func (s *CreateVoiceTaskInput) SetMaxRingTime(v int32) *CreateVoiceTaskInput
- func (s *CreateVoiceTaskInput) SetNumberInfoList(v *NumberInfoListForCreateVoiceTaskInput) *CreateVoiceTaskInput
- func (s *CreateVoiceTaskInput) SetRepeatingCount(v int32) *CreateVoiceTaskInput
- func (s *CreateVoiceTaskInput) SetSendTime(v string) *CreateVoiceTaskInput
- func (s *CreateVoiceTaskInput) SetServiceCode(v string) *CreateVoiceTaskInput
- func (s *CreateVoiceTaskInput) SetTaskId(v string) *CreateVoiceTaskInput
- func (s *CreateVoiceTaskInput) SetTaskName(v string) *CreateVoiceTaskInput
- func (s *CreateVoiceTaskInput) SetTimeZone(v string) *CreateVoiceTaskInput
- func (s *CreateVoiceTaskInput) SetVoiceContent(v *VoiceContentForCreateVoiceTaskInput) *CreateVoiceTaskInput
- func (s CreateVoiceTaskInput) String() string
- func (s *CreateVoiceTaskInput) Validate() error
- type CreateVoiceTaskOutput
- func (s CreateVoiceTaskOutput) GoString() string
- func (s *CreateVoiceTaskOutput) SetData(v *DataForCreateVoiceTaskOutput) *CreateVoiceTaskOutput
- func (s *CreateVoiceTaskOutput) SetErrorMessage(v string) *CreateVoiceTaskOutput
- func (s *CreateVoiceTaskOutput) SetResult(v string) *CreateVoiceTaskOutput
- func (s CreateVoiceTaskOutput) String() string
- type DataForCreateVoiceTaskOutput
- type NumberInfoListForCreateVoiceTaskInput
- func (s NumberInfoListForCreateVoiceTaskInput) GoString() string
- func (s *NumberInfoListForCreateVoiceTaskInput) SetCalleeNumber(v string) *NumberInfoListForCreateVoiceTaskInput
- func (s *NumberInfoListForCreateVoiceTaskInput) SetParamObj(v string) *NumberInfoListForCreateVoiceTaskInput
- func (s NumberInfoListForCreateVoiceTaskInput) String() string
- type VS
- func (c *VS) CreateVoiceTask(input *CreateVoiceTaskInput) (*CreateVoiceTaskOutput, error)
- func (c *VS) CreateVoiceTaskCommon(input *map[string]interface{}) (*map[string]interface{}, error)
- func (c *VS) CreateVoiceTaskCommonRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{})
- func (c *VS) CreateVoiceTaskCommonWithContext(ctx byteplus.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error)
- func (c *VS) CreateVoiceTaskRequest(input *CreateVoiceTaskInput) (req *request.Request, output *CreateVoiceTaskOutput)
- func (c *VS) CreateVoiceTaskWithContext(ctx byteplus.Context, input *CreateVoiceTaskInput, opts ...request.Option) (*CreateVoiceTaskOutput, error)
- type VSAPI
- type VoiceContentForCreateVoiceTaskInput
- func (s VoiceContentForCreateVoiceTaskInput) GoString() string
- func (s *VoiceContentForCreateVoiceTaskInput) SetBaseFile(v string) *VoiceContentForCreateVoiceTaskInput
- func (s *VoiceContentForCreateVoiceTaskInput) SetFileName(v string) *VoiceContentForCreateVoiceTaskInput
- func (s *VoiceContentForCreateVoiceTaskInput) SetSource(v int32) *VoiceContentForCreateVoiceTaskInput
- func (s *VoiceContentForCreateVoiceTaskInput) SetText(v string) *VoiceContentForCreateVoiceTaskInput
- func (s *VoiceContentForCreateVoiceTaskInput) SetTtsLanguage(v string) *VoiceContentForCreateVoiceTaskInput
- func (s *VoiceContentForCreateVoiceTaskInput) SetTtsSpeed(v int32) *VoiceContentForCreateVoiceTaskInput
- func (s *VoiceContentForCreateVoiceTaskInput) SetVoiceId(v string) *VoiceContentForCreateVoiceTaskInput
- func (s VoiceContentForCreateVoiceTaskInput) String() string
Constants ¶
const ( ServiceName = "vs" // Name of service. EndpointsID = ServiceName // ID to lookup a service endpoint with. ServiceID = "vs" // ServiceID is a unique identifer of a specific service. )
Service information constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateVoiceTaskInput ¶
type CreateVoiceTaskInput struct {
// DisplayNum is a required field
DisplayNum *string `type:"string" json:",omitempty" required:"true"`
MaxHangUpTime *int32 `type:"int32" json:",omitempty"`
MaxRingTime *int32 `type:"int32" json:",omitempty"`
NumberInfoList *NumberInfoListForCreateVoiceTaskInput `type:"structure" json:",omitempty"`
RepeatingCount *int32 `type:"int32" json:",omitempty"`
SendTime *string `type:"string" json:",omitempty"`
// ServiceCode is a required field
ServiceCode *string `type:"string" json:",omitempty" required:"true"`
// TaskId is a required field
TaskId *string `type:"string" json:",omitempty" required:"true"`
// TaskName is a required field
TaskName *string `type:"string" json:",omitempty" required:"true"`
TimeZone *string `type:"string" json:",omitempty"`
VoiceContent *VoiceContentForCreateVoiceTaskInput `type:"structure" json:",omitempty"`
// contains filtered or unexported fields
}
func (CreateVoiceTaskInput) GoString ¶
func (s CreateVoiceTaskInput) GoString() string
GoString returns the string representation
func (*CreateVoiceTaskInput) SetDisplayNum ¶
func (s *CreateVoiceTaskInput) SetDisplayNum(v string) *CreateVoiceTaskInput
SetDisplayNum sets the DisplayNum field's value.
func (*CreateVoiceTaskInput) SetMaxHangUpTime ¶
func (s *CreateVoiceTaskInput) SetMaxHangUpTime(v int32) *CreateVoiceTaskInput
SetMaxHangUpTime sets the MaxHangUpTime field's value.
func (*CreateVoiceTaskInput) SetMaxRingTime ¶
func (s *CreateVoiceTaskInput) SetMaxRingTime(v int32) *CreateVoiceTaskInput
SetMaxRingTime sets the MaxRingTime field's value.
func (*CreateVoiceTaskInput) SetNumberInfoList ¶
func (s *CreateVoiceTaskInput) SetNumberInfoList(v *NumberInfoListForCreateVoiceTaskInput) *CreateVoiceTaskInput
SetNumberInfoList sets the NumberInfoList field's value.
func (*CreateVoiceTaskInput) SetRepeatingCount ¶
func (s *CreateVoiceTaskInput) SetRepeatingCount(v int32) *CreateVoiceTaskInput
SetRepeatingCount sets the RepeatingCount field's value.
func (*CreateVoiceTaskInput) SetSendTime ¶
func (s *CreateVoiceTaskInput) SetSendTime(v string) *CreateVoiceTaskInput
SetSendTime sets the SendTime field's value.
func (*CreateVoiceTaskInput) SetServiceCode ¶
func (s *CreateVoiceTaskInput) SetServiceCode(v string) *CreateVoiceTaskInput
SetServiceCode sets the ServiceCode field's value.
func (*CreateVoiceTaskInput) SetTaskId ¶
func (s *CreateVoiceTaskInput) SetTaskId(v string) *CreateVoiceTaskInput
SetTaskId sets the TaskId field's value.
func (*CreateVoiceTaskInput) SetTaskName ¶
func (s *CreateVoiceTaskInput) SetTaskName(v string) *CreateVoiceTaskInput
SetTaskName sets the TaskName field's value.
func (*CreateVoiceTaskInput) SetTimeZone ¶
func (s *CreateVoiceTaskInput) SetTimeZone(v string) *CreateVoiceTaskInput
SetTimeZone sets the TimeZone field's value.
func (*CreateVoiceTaskInput) SetVoiceContent ¶
func (s *CreateVoiceTaskInput) SetVoiceContent(v *VoiceContentForCreateVoiceTaskInput) *CreateVoiceTaskInput
SetVoiceContent sets the VoiceContent field's value.
func (CreateVoiceTaskInput) String ¶
func (s CreateVoiceTaskInput) String() string
String returns the string representation
func (*CreateVoiceTaskInput) Validate ¶
func (s *CreateVoiceTaskInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type CreateVoiceTaskOutput ¶
type CreateVoiceTaskOutput struct {
Metadata *response.ResponseMetadata
Data *DataForCreateVoiceTaskOutput `type:"structure" json:",omitempty"`
ErrorMessage *string `type:"string" json:",omitempty"`
Result *string `type:"string" json:",omitempty"`
// contains filtered or unexported fields
}
func (CreateVoiceTaskOutput) GoString ¶
func (s CreateVoiceTaskOutput) GoString() string
GoString returns the string representation
func (*CreateVoiceTaskOutput) SetData ¶
func (s *CreateVoiceTaskOutput) SetData(v *DataForCreateVoiceTaskOutput) *CreateVoiceTaskOutput
SetData sets the Data field's value.
func (*CreateVoiceTaskOutput) SetErrorMessage ¶
func (s *CreateVoiceTaskOutput) SetErrorMessage(v string) *CreateVoiceTaskOutput
SetErrorMessage sets the ErrorMessage field's value.
func (*CreateVoiceTaskOutput) SetResult ¶
func (s *CreateVoiceTaskOutput) SetResult(v string) *CreateVoiceTaskOutput
SetResult sets the Result field's value.
func (CreateVoiceTaskOutput) String ¶
func (s CreateVoiceTaskOutput) String() string
String returns the string representation
type DataForCreateVoiceTaskOutput ¶
type DataForCreateVoiceTaskOutput struct {
TaskId *string `type:"string" json:"taskId,omitempty"`
// contains filtered or unexported fields
}
func (DataForCreateVoiceTaskOutput) GoString ¶
func (s DataForCreateVoiceTaskOutput) GoString() string
GoString returns the string representation
func (*DataForCreateVoiceTaskOutput) SetTaskId ¶
func (s *DataForCreateVoiceTaskOutput) SetTaskId(v string) *DataForCreateVoiceTaskOutput
SetTaskId sets the TaskId field's value.
func (DataForCreateVoiceTaskOutput) String ¶
func (s DataForCreateVoiceTaskOutput) String() string
String returns the string representation
type NumberInfoListForCreateVoiceTaskInput ¶
type NumberInfoListForCreateVoiceTaskInput struct {
CalleeNumber *string `type:"string" json:"calleeNumber,omitempty"`
ParamObj *string `type:"string" json:"paramObj,omitempty"`
// contains filtered or unexported fields
}
func (NumberInfoListForCreateVoiceTaskInput) GoString ¶
func (s NumberInfoListForCreateVoiceTaskInput) GoString() string
GoString returns the string representation
func (*NumberInfoListForCreateVoiceTaskInput) SetCalleeNumber ¶
func (s *NumberInfoListForCreateVoiceTaskInput) SetCalleeNumber(v string) *NumberInfoListForCreateVoiceTaskInput
SetCalleeNumber sets the CalleeNumber field's value.
func (*NumberInfoListForCreateVoiceTaskInput) SetParamObj ¶
func (s *NumberInfoListForCreateVoiceTaskInput) SetParamObj(v string) *NumberInfoListForCreateVoiceTaskInput
SetParamObj sets the ParamObj field's value.
func (NumberInfoListForCreateVoiceTaskInput) String ¶
func (s NumberInfoListForCreateVoiceTaskInput) String() string
String returns the string representation
type VS ¶
VS provides the API operation methods for making requests to VS. See this package's package overview docs for details on the service.
VS methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.
func New ¶
func New(p client.ConfigProvider, cfgs ...*byteplus.Config) *VS
New create int can support ssl or region locate set
func (*VS) CreateVoiceTask ¶
func (c *VS) CreateVoiceTask(input *CreateVoiceTaskInput) (*CreateVoiceTaskOutput, error)
CreateVoiceTask API operation for VS.
Returns bytepluserr.Error for service API and SDK errors. Use runtime type assertions with bytepluserr.Error's Code and Message methods to get detailed information about the error.
See the BYTEPLUS API reference guide for VS's API operation CreateVoiceTask for usage and error information.
func (*VS) CreateVoiceTaskCommon ¶
CreateVoiceTaskCommon API operation for VS.
Returns bytepluserr.Error for service API and SDK errors. Use runtime type assertions with bytepluserr.Error's Code and Message methods to get detailed information about the error.
See the BYTEPLUS API reference guide for VS's API operation CreateVoiceTaskCommon for usage and error information.
func (*VS) CreateVoiceTaskCommonRequest ¶
func (c *VS) CreateVoiceTaskCommonRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{})
CreateVoiceTaskCommonRequest generates a "byteplus/request.Request" representing the client's request for the CreateVoiceTaskCommon operation. The "output" return value will be populated with the CreateVoiceTaskCommon request's response once the request completes successfully.
Use "Send" method on the returned CreateVoiceTaskCommon Request to send the API call to the service. the "output" return value is not valid until after CreateVoiceTaskCommon Send returns without error.
See CreateVoiceTaskCommon for more information on using the CreateVoiceTaskCommon API call, and error handling.
// Example sending a request using the CreateVoiceTaskCommonRequest method.
req, resp := client.CreateVoiceTaskCommonRequest(params)
err := req.Send()
if err == nil { // resp is now filled
fmt.Println(resp)
}
func (*VS) CreateVoiceTaskCommonWithContext ¶
func (c *VS) CreateVoiceTaskCommonWithContext(ctx byteplus.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error)
CreateVoiceTaskCommonWithContext is the same as CreateVoiceTaskCommon with the addition of the ability to pass a context and additional request options.
See CreateVoiceTaskCommon for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (*VS) CreateVoiceTaskRequest ¶
func (c *VS) CreateVoiceTaskRequest(input *CreateVoiceTaskInput) (req *request.Request, output *CreateVoiceTaskOutput)
CreateVoiceTaskRequest generates a "byteplus/request.Request" representing the client's request for the CreateVoiceTask operation. The "output" return value will be populated with the CreateVoiceTaskCommon request's response once the request completes successfully.
Use "Send" method on the returned CreateVoiceTaskCommon Request to send the API call to the service. the "output" return value is not valid until after CreateVoiceTaskCommon Send returns without error.
See CreateVoiceTask for more information on using the CreateVoiceTask API call, and error handling.
// Example sending a request using the CreateVoiceTaskRequest method.
req, resp := client.CreateVoiceTaskRequest(params)
err := req.Send()
if err == nil { // resp is now filled
fmt.Println(resp)
}
func (*VS) CreateVoiceTaskWithContext ¶
func (c *VS) CreateVoiceTaskWithContext(ctx byteplus.Context, input *CreateVoiceTaskInput, opts ...request.Option) (*CreateVoiceTaskOutput, error)
CreateVoiceTaskWithContext is the same as CreateVoiceTask with the addition of the ability to pass a context and additional request options.
See CreateVoiceTask for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. Ifthe context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
type VSAPI ¶
type VSAPI interface {
CreateVoiceTaskCommon(*map[string]interface{}) (*map[string]interface{}, error)
CreateVoiceTaskCommonWithContext(byteplus.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error)
CreateVoiceTaskCommonRequest(*map[string]interface{}) (*request.Request, *map[string]interface{})
CreateVoiceTask(*CreateVoiceTaskInput) (*CreateVoiceTaskOutput, error)
CreateVoiceTaskWithContext(byteplus.Context, *CreateVoiceTaskInput, ...request.Option) (*CreateVoiceTaskOutput, error)
CreateVoiceTaskRequest(*CreateVoiceTaskInput) (*request.Request, *CreateVoiceTaskOutput)
}
VSAPI provides an interface to enable mocking the vs.VS service client's API operation,
// byteplus sdk func uses an SDK service client to make a request to
// VS.
func myFunc(svc VSAPI) bool {
// Make svc.CreateVoiceTask request
}
func main() {
sess := session.New()
svc := vs.New(sess)
myFunc(svc)
}
type VoiceContentForCreateVoiceTaskInput ¶
type VoiceContentForCreateVoiceTaskInput struct {
BaseFile *string `type:"string" json:"baseFile,omitempty"`
FileName *string `type:"string" json:"fileName,omitempty"`
Source *int32 `type:"int32" json:"source,omitempty"`
Text *string `type:"string" json:"text,omitempty"`
TtsLanguage *string `type:"string" json:"ttsLanguage,omitempty"`
TtsSpeed *int32 `type:"int32" json:"ttsSpeed,omitempty"`
VoiceId *string `type:"string" json:"voiceId,omitempty"`
// contains filtered or unexported fields
}
func (VoiceContentForCreateVoiceTaskInput) GoString ¶
func (s VoiceContentForCreateVoiceTaskInput) GoString() string
GoString returns the string representation
func (*VoiceContentForCreateVoiceTaskInput) SetBaseFile ¶
func (s *VoiceContentForCreateVoiceTaskInput) SetBaseFile(v string) *VoiceContentForCreateVoiceTaskInput
SetBaseFile sets the BaseFile field's value.
func (*VoiceContentForCreateVoiceTaskInput) SetFileName ¶
func (s *VoiceContentForCreateVoiceTaskInput) SetFileName(v string) *VoiceContentForCreateVoiceTaskInput
SetFileName sets the FileName field's value.
func (*VoiceContentForCreateVoiceTaskInput) SetSource ¶
func (s *VoiceContentForCreateVoiceTaskInput) SetSource(v int32) *VoiceContentForCreateVoiceTaskInput
SetSource sets the Source field's value.
func (*VoiceContentForCreateVoiceTaskInput) SetText ¶
func (s *VoiceContentForCreateVoiceTaskInput) SetText(v string) *VoiceContentForCreateVoiceTaskInput
SetText sets the Text field's value.
func (*VoiceContentForCreateVoiceTaskInput) SetTtsLanguage ¶
func (s *VoiceContentForCreateVoiceTaskInput) SetTtsLanguage(v string) *VoiceContentForCreateVoiceTaskInput
SetTtsLanguage sets the TtsLanguage field's value.
func (*VoiceContentForCreateVoiceTaskInput) SetTtsSpeed ¶
func (s *VoiceContentForCreateVoiceTaskInput) SetTtsSpeed(v int32) *VoiceContentForCreateVoiceTaskInput
SetTtsSpeed sets the TtsSpeed field's value.
func (*VoiceContentForCreateVoiceTaskInput) SetVoiceId ¶
func (s *VoiceContentForCreateVoiceTaskInput) SetVoiceId(v string) *VoiceContentForCreateVoiceTaskInput
SetVoiceId sets the VoiceId field's value.
func (VoiceContentForCreateVoiceTaskInput) String ¶
func (s VoiceContentForCreateVoiceTaskInput) String() string
String returns the string representation