Documentation ¶
Overview ¶
Package sms is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterSMSAPIHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterSMSAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SMSAPIClient) error
- func RegisterSMSAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterSMSAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SMSAPIServer) error
- func RegisterSMSAPIServer(s *grpc.Server, srv SMSAPIServer)
- type SMS
- type SMSAPIClient
- type SMSAPIServer
- type UnimplementedSMSAPIServer
Constants ¶
This section is empty.
Variables ¶
var File_sms_proto protoreflect.FileDescriptor
Functions ¶
func RegisterSMSAPIHandler ¶
RegisterSMSAPIHandler registers the http handlers for service SMSAPI to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterSMSAPIHandlerClient ¶
func RegisterSMSAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SMSAPIClient) error
RegisterSMSAPIHandlerClient registers the http handlers for service SMSAPI to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SMSAPIClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SMSAPIClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SMSAPIClient" to call the correct interceptors.
func RegisterSMSAPIHandlerFromEndpoint ¶
func RegisterSMSAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterSMSAPIHandlerFromEndpoint is same as RegisterSMSAPIHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterSMSAPIHandlerServer ¶
func RegisterSMSAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SMSAPIServer) error
RegisterSMSAPIHandlerServer registers the http handlers for service SMSAPI to "mux". UnaryRPC :call SMSAPIServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
func RegisterSMSAPIServer ¶
func RegisterSMSAPIServer(s *grpc.Server, srv SMSAPIServer)
Types ¶
type SMS ¶
type SMS struct { DestinationPhones []string `protobuf:"bytes,2,rep,name=destination_phones,json=destinationPhones,proto3" json:"destination_phones,omitempty"` Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"` Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*SMS) Descriptor
deprecated
func (*SMS) GetDestinationPhones ¶
func (*SMS) GetKeyword ¶
func (*SMS) GetMessage ¶
func (*SMS) ProtoMessage ¶
func (*SMS) ProtoMessage()
func (*SMS) ProtoReflect ¶
func (x *SMS) ProtoReflect() protoreflect.Message
type SMSAPIClient ¶
type SMSAPIClient interface { // Send an sms to its destination(s) SendSMS(ctx context.Context, in *SMS, opts ...grpc.CallOption) (*empty.Empty, error) }
SMSAPIClient is the client API for SMSAPI service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewSMSAPIClient ¶
func NewSMSAPIClient(cc grpc.ClientConnInterface) SMSAPIClient