Documentation
¶
Index ¶
- Variables
- func NewSmsEndpoints() []*api.Endpoint
- func RegisterSmsHandler(s server.Server, hdlr SmsHandler, opts ...server.HandlerOption) error
- type SendRequest
- func (*SendRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendRequest) GetFrom() string
- func (x *SendRequest) GetMessage() string
- func (x *SendRequest) GetTo() string
- func (*SendRequest) ProtoMessage()
- func (x *SendRequest) ProtoReflect() protoreflect.Message
- func (x *SendRequest) Reset()
- func (x *SendRequest) String() string
- type SendResponse
- func (*SendResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SendResponse) GetInfo() string
- func (x *SendResponse) GetStatus() string
- func (*SendResponse) ProtoMessage()
- func (x *SendResponse) ProtoReflect() protoreflect.Message
- func (x *SendResponse) Reset()
- func (x *SendResponse) String() string
- type SmsHandler
- type SmsService
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_sms_proto protoreflect.FileDescriptor
Functions ¶
func NewSmsEndpoints ¶
func RegisterSmsHandler ¶
func RegisterSmsHandler(s server.Server, hdlr SmsHandler, opts ...server.HandlerOption) error
Types ¶
type SendRequest ¶
type SendRequest struct {
// who is the message from? The message will be suffixed with "Sent from <from>"
From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
// the destination phone number including the international dialling code (e.g. +44)
To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
// the main body of the message to send
Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
Send an SMS.
func (*SendRequest) Descriptor
deprecated
func (*SendRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendRequest.ProtoReflect.Descriptor instead.
func (*SendRequest) GetFrom ¶
func (x *SendRequest) GetFrom() string
func (*SendRequest) GetMessage ¶
func (x *SendRequest) GetMessage() string
func (*SendRequest) GetTo ¶
func (x *SendRequest) GetTo() string
func (*SendRequest) ProtoMessage ¶
func (*SendRequest) ProtoMessage()
func (*SendRequest) ProtoReflect ¶
func (x *SendRequest) ProtoReflect() protoreflect.Message
func (*SendRequest) Reset ¶
func (x *SendRequest) Reset()
func (*SendRequest) String ¶
func (x *SendRequest) String() string
type SendResponse ¶
type SendResponse struct {
// will return "ok" if successful
Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
// any additional info
Info string `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"`
// contains filtered or unexported fields
}
func (*SendResponse) Descriptor
deprecated
func (*SendResponse) Descriptor() ([]byte, []int)
Deprecated: Use SendResponse.ProtoReflect.Descriptor instead.
func (*SendResponse) GetInfo ¶
func (x *SendResponse) GetInfo() string
func (*SendResponse) GetStatus ¶
func (x *SendResponse) GetStatus() string
func (*SendResponse) ProtoMessage ¶
func (*SendResponse) ProtoMessage()
func (*SendResponse) ProtoReflect ¶
func (x *SendResponse) ProtoReflect() protoreflect.Message
func (*SendResponse) Reset ¶
func (x *SendResponse) Reset()
func (*SendResponse) String ¶
func (x *SendResponse) String() string
type SmsHandler ¶
type SmsHandler interface {
Send(context.Context, *SendRequest, *SendResponse) error
}
type SmsService ¶
type SmsService interface {
Send(ctx context.Context, in *SendRequest, opts ...client.CallOption) (*SendResponse, error)
}
func NewSmsService ¶
func NewSmsService(name string, c client.Client) SmsService
Click to show internal directories.
Click to hide internal directories.