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.ServiceRegistrar, srv SMSAPIServer)
- type SMS
- type SMSAPIClient
- type SMSAPIServer
- type UnimplementedSMSAPIServer
- type UnsafeSMSAPIServer
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. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSMSAPIHandlerFromEndpoint instead.
func RegisterSMSAPIServer ¶
func RegisterSMSAPIServer(s grpc.ServiceRegistrar, 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://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewSMSAPIClient ¶
func NewSMSAPIClient(cc grpc.ClientConnInterface) SMSAPIClient
type SMSAPIServer ¶
type SMSAPIServer interface { // Send an sms to its destination(s) SendSMS(context.Context, *SMS) (*empty.Empty, error) // contains filtered or unexported methods }
SMSAPIServer is the server API for SMSAPI service. All implementations must embed UnimplementedSMSAPIServer for forward compatibility
type UnimplementedSMSAPIServer ¶
type UnimplementedSMSAPIServer struct { }
UnimplementedSMSAPIServer must be embedded to have forward compatible implementations.
type UnsafeSMSAPIServer ¶
type UnsafeSMSAPIServer interface {
// contains filtered or unexported methods
}
UnsafeSMSAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SMSAPIServer will result in compilation errors.