Documentation ¶
Index ¶
- Variables
- func RegisterEphemeralNotesServer(s *grpc.Server, srv EphemeralNotesServer)
- type EphemeralNotesClient
- type EphemeralNotesServer
- type EphemeralNotes_StreamNotesClient
- type EphemeralNotes_StreamNotesServer
- type Note
- func (*Note) Descriptor() ([]byte, []int)deprecated
- func (x *Note) GetCreatedAt() *timestamp.Timestamp
- func (x *Note) GetMessage() string
- func (x *Note) GetPublishedAt() *timestamp.Timestamp
- func (*Note) ProtoMessage()
- func (x *Note) ProtoReflect() protoreflect.Message
- func (x *Note) Reset()
- func (x *Note) String() string
- type StreamNotesResponse
- func (*StreamNotesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StreamNotesResponse) GetNotes() []*Note
- func (*StreamNotesResponse) ProtoMessage()
- func (x *StreamNotesResponse) ProtoReflect() protoreflect.Message
- func (x *StreamNotesResponse) Reset()
- func (x *StreamNotesResponse) String() string
- type UnimplementedEphemeralNotesServer
Constants ¶
This section is empty.
Variables ¶
View Source
var File_ephemeral_notes_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEphemeralNotesServer ¶
func RegisterEphemeralNotesServer(s *grpc.Server, srv EphemeralNotesServer)
Types ¶
type EphemeralNotesClient ¶
type EphemeralNotesClient interface { // Publishes a note to the server PublishNote(ctx context.Context, in *Note, opts ...grpc.CallOption) (*Note, error) // Retrieves notes with realtime updates StreamNotes(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (EphemeralNotes_StreamNotesClient, error) }
EphemeralNotesClient is the client API for EphemeralNotes service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewEphemeralNotesClient ¶
func NewEphemeralNotesClient(cc grpc.ClientConnInterface) EphemeralNotesClient
type EphemeralNotesServer ¶
type EphemeralNotesServer interface { // Publishes a note to the server PublishNote(context.Context, *Note) (*Note, error) // Retrieves notes with realtime updates StreamNotes(*empty.Empty, EphemeralNotes_StreamNotesServer) error }
EphemeralNotesServer is the server API for EphemeralNotes service.
type EphemeralNotes_StreamNotesClient ¶
type EphemeralNotes_StreamNotesClient interface { Recv() (*StreamNotesResponse, error) grpc.ClientStream }
type EphemeralNotes_StreamNotesServer ¶
type EphemeralNotes_StreamNotesServer interface { Send(*StreamNotesResponse) error grpc.ServerStream }
type Note ¶
type Note struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` CreatedAt *timestamp.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` PublishedAt *timestamp.Timestamp `protobuf:"bytes,3,opt,name=published_at,json=publishedAt,proto3" json:"published_at,omitempty"` // contains filtered or unexported fields }
System-wide note declaration
func (*Note) Descriptor
deprecated
func (*Note) GetCreatedAt ¶
func (*Note) GetMessage ¶
func (*Note) GetPublishedAt ¶
func (*Note) ProtoMessage ¶
func (*Note) ProtoMessage()
func (*Note) ProtoReflect ¶
func (x *Note) ProtoReflect() protoreflect.Message
type StreamNotesResponse ¶
type StreamNotesResponse struct { Notes []*Note `protobuf:"bytes,1,rep,name=notes,proto3" json:"notes,omitempty"` // contains filtered or unexported fields }
Response message to StreamNotes call
func (*StreamNotesResponse) Descriptor
deprecated
func (*StreamNotesResponse) Descriptor() ([]byte, []int)
Deprecated: Use StreamNotesResponse.ProtoReflect.Descriptor instead.
func (*StreamNotesResponse) GetNotes ¶
func (x *StreamNotesResponse) GetNotes() []*Note
func (*StreamNotesResponse) ProtoMessage ¶
func (*StreamNotesResponse) ProtoMessage()
func (*StreamNotesResponse) ProtoReflect ¶
func (x *StreamNotesResponse) ProtoReflect() protoreflect.Message
func (*StreamNotesResponse) Reset ¶
func (x *StreamNotesResponse) Reset()
func (*StreamNotesResponse) String ¶
func (x *StreamNotesResponse) String() string
type UnimplementedEphemeralNotesServer ¶
type UnimplementedEphemeralNotesServer struct { }
UnimplementedEphemeralNotesServer can be embedded to have forward compatible implementations.
func (*UnimplementedEphemeralNotesServer) PublishNote ¶
func (*UnimplementedEphemeralNotesServer) StreamNotes ¶
func (*UnimplementedEphemeralNotesServer) StreamNotes(*empty.Empty, EphemeralNotes_StreamNotesServer) error
Click to show internal directories.
Click to hide internal directories.