Documentation ¶
Overview ¶
Package messaging is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterMessagingHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMessagingHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MessagingClient) error
- func RegisterMessagingHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMessagingHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MessagingServer) error
- func RegisterMessagingServer(s *grpc.Server, srv MessagingServer)
- type BroadCastMessageRequest
- func (*BroadCastMessageRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BroadCastMessageRequest) GetChannels() []string
- func (x *BroadCastMessageRequest) GetMessage() *Message
- func (*BroadCastMessageRequest) ProtoMessage()
- func (x *BroadCastMessageRequest) ProtoReflect() protoreflect.Message
- func (x *BroadCastMessageRequest) Reset()
- func (x *BroadCastMessageRequest) String() string
- type ListMessagesFilter
- func (*ListMessagesFilter) Descriptor() ([]byte, []int)deprecated
- func (x *ListMessagesFilter) GetTypeFilters() []MessageType
- func (x *ListMessagesFilter) GetUserId() string
- func (*ListMessagesFilter) ProtoMessage()
- func (x *ListMessagesFilter) ProtoReflect() protoreflect.Message
- func (x *ListMessagesFilter) Reset()
- func (x *ListMessagesFilter) String() string
- type ListMessagesRequest
- func (*ListMessagesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListMessagesRequest) GetFilter() *ListMessagesFilter
- func (x *ListMessagesRequest) GetPageSize() int32
- func (x *ListMessagesRequest) GetPageToken() string
- func (*ListMessagesRequest) ProtoMessage()
- func (x *ListMessagesRequest) ProtoReflect() protoreflect.Message
- func (x *ListMessagesRequest) Reset()
- func (x *ListMessagesRequest) String() string
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetCreateTimeSeconds() int64
- func (x *Message) GetData() string
- func (x *Message) GetDetails() map[string]string
- func (x *Message) GetLink() string
- func (x *Message) GetMessageId() string
- func (x *Message) GetSave() bool
- func (x *Message) GetSeen() bool
- func (x *Message) GetSendMethods() []SendMethod
- func (x *Message) GetTitle() string
- func (x *Message) GetType() MessageType
- func (x *Message) GetUserId() string
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type MessageRequest
- type MessageType
- func (MessageType) Descriptor() protoreflect.EnumDescriptor
- func (x MessageType) Enum() *MessageType
- func (MessageType) EnumDescriptor() ([]byte, []int)deprecated
- func (x MessageType) Number() protoreflect.EnumNumber
- func (x MessageType) String() string
- func (MessageType) Type() protoreflect.EnumType
- type Messages
- type MessagingClient
- type MessagingServer
- type NewMessagesCount
- type SendMessageResponse
- func (*SendMessageResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SendMessageResponse) GetMessageId() string
- func (*SendMessageResponse) ProtoMessage()
- func (x *SendMessageResponse) ProtoReflect() protoreflect.Message
- func (x *SendMessageResponse) Reset()
- func (x *SendMessageResponse) String() string
- type SendMethod
- type UnimplementedMessagingServer
- func (*UnimplementedMessagingServer) BroadCastMessage(context.Context, *BroadCastMessageRequest) (*empty.Empty, error)
- func (*UnimplementedMessagingServer) GetNewMessagesCount(context.Context, *MessageRequest) (*NewMessagesCount, error)
- func (*UnimplementedMessagingServer) ListMessages(context.Context, *ListMessagesRequest) (*Messages, error)
- func (*UnimplementedMessagingServer) ReadAll(context.Context, *MessageRequest) (*empty.Empty, error)
- func (*UnimplementedMessagingServer) SendMessage(context.Context, *Message) (*SendMessageResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ( MessageType_name = map[int32]string{ 0: "ALL", 1: "PROMOTIONAL", 2: "REMINDER", 3: "WARNING", 4: "ALERT", 5: "INFO", } MessageType_value = map[string]int32{ "ALL": 0, "PROMOTIONAL": 1, "REMINDER": 2, "WARNING": 3, "ALERT": 4, "INFO": 5, } )
Enum value maps for MessageType.
var ( SendMethod_name = map[int32]string{ 0: "SEND_METHOD_UNSPECIFIED", 1: "EMAIL", 2: "SMSV2", 3: "CALL", 4: "PUSH", } SendMethod_value = map[string]int32{ "SEND_METHOD_UNSPECIFIED": 0, "EMAIL": 1, "SMSV2": 2, "CALL": 3, "PUSH": 4, } )
Enum value maps for SendMethod.
var File_messaging_proto protoreflect.FileDescriptor
Functions ¶
func RegisterMessagingHandler ¶
func RegisterMessagingHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterMessagingHandler registers the http handlers for service Messaging to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMessagingHandlerClient ¶
func RegisterMessagingHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MessagingClient) error
RegisterMessagingHandlerClient registers the http handlers for service Messaging to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MessagingClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MessagingClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MessagingClient" to call the correct interceptors.
func RegisterMessagingHandlerFromEndpoint ¶
func RegisterMessagingHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMessagingHandlerFromEndpoint is same as RegisterMessagingHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMessagingHandlerServer ¶
func RegisterMessagingHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MessagingServer) error
RegisterMessagingHandlerServer registers the http handlers for service Messaging to "mux". UnaryRPC :call MessagingServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
func RegisterMessagingServer ¶
func RegisterMessagingServer(s *grpc.Server, srv MessagingServer)
Types ¶
type BroadCastMessageRequest ¶
type BroadCastMessageRequest struct { Channels []string `protobuf:"bytes,1,rep,name=channels,proto3" json:"channels,omitempty"` Message *Message `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*BroadCastMessageRequest) Descriptor
deprecated
func (*BroadCastMessageRequest) Descriptor() ([]byte, []int)
Deprecated: Use BroadCastMessageRequest.ProtoReflect.Descriptor instead.
func (*BroadCastMessageRequest) GetChannels ¶
func (x *BroadCastMessageRequest) GetChannels() []string
func (*BroadCastMessageRequest) GetMessage ¶
func (x *BroadCastMessageRequest) GetMessage() *Message
func (*BroadCastMessageRequest) ProtoMessage ¶
func (*BroadCastMessageRequest) ProtoMessage()
func (*BroadCastMessageRequest) ProtoReflect ¶
func (x *BroadCastMessageRequest) ProtoReflect() protoreflect.Message
func (*BroadCastMessageRequest) Reset ¶
func (x *BroadCastMessageRequest) Reset()
func (*BroadCastMessageRequest) String ¶
func (x *BroadCastMessageRequest) String() string
type ListMessagesFilter ¶
type ListMessagesFilter struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` TypeFilters []MessageType `` /* 131-byte string literal not displayed */ // contains filtered or unexported fields }
func (*ListMessagesFilter) Descriptor
deprecated
func (*ListMessagesFilter) Descriptor() ([]byte, []int)
Deprecated: Use ListMessagesFilter.ProtoReflect.Descriptor instead.
func (*ListMessagesFilter) GetTypeFilters ¶
func (x *ListMessagesFilter) GetTypeFilters() []MessageType
func (*ListMessagesFilter) GetUserId ¶
func (x *ListMessagesFilter) GetUserId() string
func (*ListMessagesFilter) ProtoMessage ¶
func (*ListMessagesFilter) ProtoMessage()
func (*ListMessagesFilter) ProtoReflect ¶
func (x *ListMessagesFilter) ProtoReflect() protoreflect.Message
func (*ListMessagesFilter) Reset ¶
func (x *ListMessagesFilter) Reset()
func (*ListMessagesFilter) String ¶
func (x *ListMessagesFilter) String() string
type ListMessagesRequest ¶
type ListMessagesRequest struct { PageToken string `protobuf:"bytes,1,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` Filter *ListMessagesFilter `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` // contains filtered or unexported fields }
func (*ListMessagesRequest) Descriptor
deprecated
func (*ListMessagesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListMessagesRequest.ProtoReflect.Descriptor instead.
func (*ListMessagesRequest) GetFilter ¶
func (x *ListMessagesRequest) GetFilter() *ListMessagesFilter
func (*ListMessagesRequest) GetPageSize ¶
func (x *ListMessagesRequest) GetPageSize() int32
func (*ListMessagesRequest) GetPageToken ¶
func (x *ListMessagesRequest) GetPageToken() string
func (*ListMessagesRequest) ProtoMessage ¶
func (*ListMessagesRequest) ProtoMessage()
func (*ListMessagesRequest) ProtoReflect ¶
func (x *ListMessagesRequest) ProtoReflect() protoreflect.Message
func (*ListMessagesRequest) Reset ¶
func (x *ListMessagesRequest) Reset()
func (*ListMessagesRequest) String ¶
func (x *ListMessagesRequest) String() string
type Message ¶
type Message struct { MessageId string `protobuf:"bytes,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` Data string `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` Link string `protobuf:"bytes,5,opt,name=link,proto3" json:"link,omitempty"` CreateTimeSeconds int64 `protobuf:"varint,6,opt,name=create_time_seconds,json=createTimeSeconds,proto3" json:"create_time_seconds,omitempty"` Seen bool `protobuf:"varint,7,opt,name=seen,proto3" json:"seen,omitempty"` Save bool `protobuf:"varint,9,opt,name=save,proto3" json:"save,omitempty"` Type MessageType `protobuf:"varint,10,opt,name=type,proto3,enum=gidyon.apis.MessageType" json:"type,omitempty"` SendMethods []SendMethod `` /* 131-byte string literal not displayed */ Details map[string]string `` /* 156-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Message) Descriptor
deprecated
func (*Message) GetCreateTimeSeconds ¶
func (*Message) GetDetails ¶
func (*Message) GetMessageId ¶
func (*Message) GetSendMethods ¶
func (x *Message) GetSendMethods() []SendMethod
func (*Message) GetType ¶
func (x *Message) GetType() MessageType
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type MessageRequest ¶
type MessageRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*MessageRequest) Descriptor
deprecated
func (*MessageRequest) Descriptor() ([]byte, []int)
Deprecated: Use MessageRequest.ProtoReflect.Descriptor instead.
func (*MessageRequest) GetUserId ¶
func (x *MessageRequest) GetUserId() string
func (*MessageRequest) ProtoMessage ¶
func (*MessageRequest) ProtoMessage()
func (*MessageRequest) ProtoReflect ¶
func (x *MessageRequest) ProtoReflect() protoreflect.Message
func (*MessageRequest) Reset ¶
func (x *MessageRequest) Reset()
func (*MessageRequest) String ¶
func (x *MessageRequest) String() string
type MessageType ¶
type MessageType int32
MessageType
const ( MessageType_ALL MessageType = 0 MessageType_PROMOTIONAL MessageType = 1 MessageType_REMINDER MessageType = 2 MessageType_WARNING MessageType = 3 MessageType_ALERT MessageType = 4 MessageType_INFO MessageType = 5 )
func (MessageType) Descriptor ¶
func (MessageType) Descriptor() protoreflect.EnumDescriptor
func (MessageType) Enum ¶
func (x MessageType) Enum() *MessageType
func (MessageType) EnumDescriptor
deprecated
func (MessageType) EnumDescriptor() ([]byte, []int)
Deprecated: Use MessageType.Descriptor instead.
func (MessageType) Number ¶
func (x MessageType) Number() protoreflect.EnumNumber
func (MessageType) String ¶
func (x MessageType) String() string
func (MessageType) Type ¶
func (MessageType) Type() protoreflect.EnumType
type Messages ¶
type Messages struct { Messages []*Message `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // contains filtered or unexported fields }
func (*Messages) Descriptor
deprecated
func (*Messages) GetMessages ¶
func (*Messages) GetNextPageToken ¶
func (*Messages) ProtoMessage ¶
func (*Messages) ProtoMessage()
func (*Messages) ProtoReflect ¶
func (x *Messages) ProtoReflect() protoreflect.Message
type MessagingClient ¶
type MessagingClient interface { // Broadcasts a message BroadCastMessage(ctx context.Context, in *BroadCastMessageRequest, opts ...grpc.CallOption) (*empty.Empty, error) // Sends message to a single destination SendMessage(ctx context.Context, in *Message, opts ...grpc.CallOption) (*SendMessageResponse, error) // Retrieves a collection of messages ListMessages(ctx context.Context, in *ListMessagesRequest, opts ...grpc.CallOption) (*Messages, error) // Updates unread messages statuses to read ReadAll(ctx context.Context, in *MessageRequest, opts ...grpc.CallOption) (*empty.Empty, error) // Fetches count of new messages GetNewMessagesCount(ctx context.Context, in *MessageRequest, opts ...grpc.CallOption) (*NewMessagesCount, error) }
MessagingClient is the client API for Messaging service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMessagingClient ¶
func NewMessagingClient(cc grpc.ClientConnInterface) MessagingClient
type MessagingServer ¶
type MessagingServer interface { // Broadcasts a message BroadCastMessage(context.Context, *BroadCastMessageRequest) (*empty.Empty, error) // Sends message to a single destination SendMessage(context.Context, *Message) (*SendMessageResponse, error) // Retrieves a collection of messages ListMessages(context.Context, *ListMessagesRequest) (*Messages, error) // Updates unread messages statuses to read ReadAll(context.Context, *MessageRequest) (*empty.Empty, error) // Fetches count of new messages GetNewMessagesCount(context.Context, *MessageRequest) (*NewMessagesCount, error) }
MessagingServer is the server API for Messaging service.
type NewMessagesCount ¶
type NewMessagesCount struct { Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*NewMessagesCount) Descriptor
deprecated
func (*NewMessagesCount) Descriptor() ([]byte, []int)
Deprecated: Use NewMessagesCount.ProtoReflect.Descriptor instead.
func (*NewMessagesCount) GetCount ¶
func (x *NewMessagesCount) GetCount() int32
func (*NewMessagesCount) ProtoMessage ¶
func (*NewMessagesCount) ProtoMessage()
func (*NewMessagesCount) ProtoReflect ¶
func (x *NewMessagesCount) ProtoReflect() protoreflect.Message
func (*NewMessagesCount) Reset ¶
func (x *NewMessagesCount) Reset()
func (*NewMessagesCount) String ¶
func (x *NewMessagesCount) String() string
type SendMessageResponse ¶
type SendMessageResponse struct { MessageId string `protobuf:"bytes,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` // contains filtered or unexported fields }
func (*SendMessageResponse) Descriptor
deprecated
func (*SendMessageResponse) Descriptor() ([]byte, []int)
Deprecated: Use SendMessageResponse.ProtoReflect.Descriptor instead.
func (*SendMessageResponse) GetMessageId ¶
func (x *SendMessageResponse) GetMessageId() string
func (*SendMessageResponse) ProtoMessage ¶
func (*SendMessageResponse) ProtoMessage()
func (*SendMessageResponse) ProtoReflect ¶
func (x *SendMessageResponse) ProtoReflect() protoreflect.Message
func (*SendMessageResponse) Reset ¶
func (x *SendMessageResponse) Reset()
func (*SendMessageResponse) String ¶
func (x *SendMessageResponse) String() string
type SendMethod ¶
type SendMethod int32
SendMethod
const ( SendMethod_SEND_METHOD_UNSPECIFIED SendMethod = 0 SendMethod_EMAIL SendMethod = 1 SendMethod_SMSV2 SendMethod = 2 SendMethod_CALL SendMethod = 3 SendMethod_PUSH SendMethod = 4 )
func (SendMethod) Descriptor ¶
func (SendMethod) Descriptor() protoreflect.EnumDescriptor
func (SendMethod) Enum ¶
func (x SendMethod) Enum() *SendMethod
func (SendMethod) EnumDescriptor
deprecated
func (SendMethod) EnumDescriptor() ([]byte, []int)
Deprecated: Use SendMethod.Descriptor instead.
func (SendMethod) Number ¶
func (x SendMethod) Number() protoreflect.EnumNumber
func (SendMethod) String ¶
func (x SendMethod) String() string
func (SendMethod) Type ¶
func (SendMethod) Type() protoreflect.EnumType
type UnimplementedMessagingServer ¶
type UnimplementedMessagingServer struct { }
UnimplementedMessagingServer can be embedded to have forward compatible implementations.
func (*UnimplementedMessagingServer) BroadCastMessage ¶
func (*UnimplementedMessagingServer) BroadCastMessage(context.Context, *BroadCastMessageRequest) (*empty.Empty, error)
func (*UnimplementedMessagingServer) GetNewMessagesCount ¶
func (*UnimplementedMessagingServer) GetNewMessagesCount(context.Context, *MessageRequest) (*NewMessagesCount, error)
func (*UnimplementedMessagingServer) ListMessages ¶
func (*UnimplementedMessagingServer) ListMessages(context.Context, *ListMessagesRequest) (*Messages, error)
func (*UnimplementedMessagingServer) ReadAll ¶
func (*UnimplementedMessagingServer) ReadAll(context.Context, *MessageRequest) (*empty.Empty, error)
func (*UnimplementedMessagingServer) SendMessage ¶
func (*UnimplementedMessagingServer) SendMessage(context.Context, *Message) (*SendMessageResponse, error)
Directories ¶
Path | Synopsis |
---|---|
Package call is a reverse proxy.
|
Package call is a reverse proxy. |
Package emailing is a reverse proxy.
|
Package emailing is a reverse proxy. |
Package pusher is a reverse proxy.
|
Package pusher is a reverse proxy. |
Package sms is a reverse proxy.
|
Package sms is a reverse proxy. |