api

package module
v0.0.0-...-3daa809 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2023 License: GPL-3.0 Imports: 11 Imported by: 2

Documentation

Index

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.

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) Descriptor() ([]byte, []int)

Deprecated: Use Note.ProtoReflect.Descriptor instead.

func (*Note) GetCreatedAt

func (x *Note) GetCreatedAt() *timestamp.Timestamp

func (*Note) GetMessage

func (x *Note) GetMessage() string

func (*Note) GetPublishedAt

func (x *Note) GetPublishedAt() *timestamp.Timestamp

func (*Note) ProtoMessage

func (*Note) ProtoMessage()

func (*Note) ProtoReflect

func (x *Note) ProtoReflect() protoreflect.Message

func (*Note) Reset

func (x *Note) Reset()

func (*Note) String

func (x *Note) String() string

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL