Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ref.Config Type string `json:"type"` Metadata map[string]string `json:"metadata"` }
Config is the component's configuration
type Factory ¶
type Factory struct { CompType string FactoryMethod func() PhoneCallService }
func NewFactory ¶
func NewFactory(compType string, f func() PhoneCallService) *Factory
type PhoneCallService ¶
type PhoneCallService interface { Init(context.Context, *Config) error SendVoiceWithTemplate(context.Context, *SendVoiceWithTemplateRequest) (*SendVoiceWithTemplateResponse, error) }
type Registry ¶
type Registry interface { Register(fs ...*Factory) Create(compType string) (PhoneCallService, error) }
func NewRegistry ¶
func NewRegistry(info *info.RuntimeInfo) Registry
type SendVoiceWithTemplateRequest ¶
type SendVoiceWithTemplateRequest struct { // If your system uses multiple IVR services at the same time, // you can specify which service to use with this field. ComponentName string `json:"component_name,omitempty"` // Required Template *VoiceTemplate `json:"template,omitempty"` // Required ToMobile []string `json:"to_mobile,omitempty"` // This field is required by some cloud providers. FromMobile string `json:"from_mobile,omitempty"` }
The request of SendVoiceWithTemplate method
type SendVoiceWithTemplateResponse ¶
type SendVoiceWithTemplateResponse struct { // Id of this request. RequestId string `json:"request_id,omitempty"` }
The response of `SendVoiceWithTemplate` method
type VoiceTemplate ¶
type VoiceTemplate struct { // Required TemplateId string `json:"template_id,omitempty"` // Required TemplateParams map[string]string `json:"template_params,omitempty"` }
VoiceTemplate
Click to show internal directories.
Click to hide internal directories.