Documentation
¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterNotesServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterNotesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NotesServiceClient) error
- func RegisterNotesServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterNotesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NotesServiceServer) error
- func RegisterNotesServiceServer(s grpc.ServiceRegistrar, srv NotesServiceServer)
- type CreateNoteRequest
- func (*CreateNoteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateNoteRequest) GetContent() string
- func (x *CreateNoteRequest) GetTitle() string
- func (*CreateNoteRequest) ProtoMessage()
- func (x *CreateNoteRequest) ProtoReflect() protoreflect.Message
- func (x *CreateNoteRequest) Reset()
- func (x *CreateNoteRequest) String() string
- func (x *CreateNoteRequest) Verbose() string
- type CreateNoteResponse
- func (*CreateNoteResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateNoteResponse) GetNote() *Note
- func (*CreateNoteResponse) ProtoMessage()
- func (x *CreateNoteResponse) ProtoReflect() protoreflect.Message
- func (x *CreateNoteResponse) Reset()
- func (x *CreateNoteResponse) String() string
- func (x *CreateNoteResponse) Verbose() string
- type DeleteNoteRequest
- func (*DeleteNoteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteNoteRequest) GetId() *types.ID
- func (*DeleteNoteRequest) ProtoMessage()
- func (x *DeleteNoteRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteNoteRequest) Reset()
- func (x *DeleteNoteRequest) String() string
- func (x *DeleteNoteRequest) Verbose() string
- type DeleteNoteResponse
- func (*DeleteNoteResponse) Descriptor() ([]byte, []int)deprecated
- func (*DeleteNoteResponse) ProtoMessage()
- func (x *DeleteNoteResponse) ProtoReflect() protoreflect.Message
- func (x *DeleteNoteResponse) Reset()
- func (x *DeleteNoteResponse) String() string
- func (x *DeleteNoteResponse) Verbose() string
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetEventTime() *timestamppb.Timestamp
- func (x *Event) GetId() string
- func (x *Event) GetNoteId() *types.ID
- func (x *Event) GetType() EventType
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- func (x *Event) Verbose() string
- type EventType
- type ListNotesRequest
- type ListNotesResponse
- func (*ListNotesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListNotesResponse) GetNotes() []*Note
- func (*ListNotesResponse) ProtoMessage()
- func (x *ListNotesResponse) ProtoReflect() protoreflect.Message
- func (x *ListNotesResponse) Reset()
- func (x *ListNotesResponse) String() string
- func (x *ListNotesResponse) Verbose() string
- type Note
- func (*Note) Descriptor() ([]byte, []int)deprecated
- func (x *Note) GetContent() string
- func (x *Note) GetCreatedAt() *timestamppb.Timestamp
- func (x *Note) GetId() *types.ID
- func (x *Note) GetTitle() string
- func (x *Note) GetUpdatedAt() *timestamppb.Timestamp
- func (*Note) ProtoMessage()
- func (x *Note) ProtoReflect() protoreflect.Message
- func (x *Note) Reset()
- func (x *Note) String() string
- func (x *Note) Verbose() string
- type NotesServiceClient
- type NotesServiceServer
- type NotesService_SubscribeToEventsClient
- type NotesService_SubscribeToEventsServer
- type RetrieveNoteRequest
- func (*RetrieveNoteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RetrieveNoteRequest) GetId() *types.ID
- func (*RetrieveNoteRequest) ProtoMessage()
- func (x *RetrieveNoteRequest) ProtoReflect() protoreflect.Message
- func (x *RetrieveNoteRequest) Reset()
- func (x *RetrieveNoteRequest) String() string
- func (x *RetrieveNoteRequest) Verbose() string
- type RetrieveNoteResponse
- func (*RetrieveNoteResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RetrieveNoteResponse) GetNote() *Note
- func (*RetrieveNoteResponse) ProtoMessage()
- func (x *RetrieveNoteResponse) ProtoReflect() protoreflect.Message
- func (x *RetrieveNoteResponse) Reset()
- func (x *RetrieveNoteResponse) String() string
- func (x *RetrieveNoteResponse) Verbose() string
- type SubscribeToEventsRequest
- func (*SubscribeToEventsRequest) Descriptor() ([]byte, []int)deprecated
- func (*SubscribeToEventsRequest) ProtoMessage()
- func (x *SubscribeToEventsRequest) ProtoReflect() protoreflect.Message
- func (x *SubscribeToEventsRequest) Reset()
- func (x *SubscribeToEventsRequest) String() string
- func (x *SubscribeToEventsRequest) Verbose() string
- type SubscribeToEventsResponse
- func (*SubscribeToEventsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SubscribeToEventsResponse) GetEvent() *Event
- func (x *SubscribeToEventsResponse) GetPayload() isSubscribeToEventsResponse_Payload
- func (x *SubscribeToEventsResponse) GetUnread() *Unread
- func (*SubscribeToEventsResponse) ProtoMessage()
- func (x *SubscribeToEventsResponse) ProtoReflect() protoreflect.Message
- func (x *SubscribeToEventsResponse) Reset()
- func (x *SubscribeToEventsResponse) String() string
- func (x *SubscribeToEventsResponse) Verbose() string
- type SubscribeToEventsResponse_Event
- type SubscribeToEventsResponse_Unread
- type UnimplementedNotesServiceServer
- func (UnimplementedNotesServiceServer) CreateNote(context.Context, *CreateNoteRequest) (*CreateNoteResponse, error)
- func (UnimplementedNotesServiceServer) DeleteNote(context.Context, *DeleteNoteRequest) (*DeleteNoteResponse, error)
- func (UnimplementedNotesServiceServer) ListNotes(context.Context, *ListNotesRequest) (*ListNotesResponse, error)
- func (UnimplementedNotesServiceServer) RetrieveNote(context.Context, *RetrieveNoteRequest) (*RetrieveNoteResponse, error)
- func (UnimplementedNotesServiceServer) SubscribeToEvents(*SubscribeToEventsRequest, ...) error
- type Unread
- type UnsafeNotesServiceServer
Constants ¶
const ( NotesService_ListNotes_FullMethodName = "/api.notes.v1.NotesService/ListNotes" NotesService_RetrieveNote_FullMethodName = "/api.notes.v1.NotesService/RetrieveNote" NotesService_CreateNote_FullMethodName = "/api.notes.v1.NotesService/CreateNote" NotesService_DeleteNote_FullMethodName = "/api.notes.v1.NotesService/DeleteNote" NotesService_SubscribeToEvents_FullMethodName = "/api.notes.v1.NotesService/SubscribeToEvents" )
Variables ¶
var ( EventType_name = map[int32]string{ 0: "EVENT_TYPE_UNKNOWN", 1: "EVENT_TYPE_CREATED", 2: "EVENT_TYPE_DELETED", } EventType_value = map[string]int32{ "EVENT_TYPE_UNKNOWN": 0, "EVENT_TYPE_CREATED": 1, "EVENT_TYPE_DELETED": 2, } )
Enum value maps for EventType.
var File_api_notes_v1_messages_proto protoreflect.FileDescriptor
var File_api_notes_v1_service_proto protoreflect.FileDescriptor
var NotesService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.notes.v1.NotesService", HandlerType: (*NotesServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListNotes", Handler: _NotesService_ListNotes_Handler, }, { MethodName: "RetrieveNote", Handler: _NotesService_RetrieveNote_Handler, }, { MethodName: "CreateNote", Handler: _NotesService_CreateNote_Handler, }, { MethodName: "DeleteNote", Handler: _NotesService_DeleteNote_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "SubscribeToEvents", Handler: _NotesService_SubscribeToEvents_Handler, ServerStreams: true, }, }, Metadata: "api/notes/v1/service.proto", }
NotesService_ServiceDesc is the grpc.ServiceDesc for NotesService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterNotesServiceHandler ¶
func RegisterNotesServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterNotesServiceHandler registers the http handlers for service NotesService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterNotesServiceHandlerClient ¶
func RegisterNotesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NotesServiceClient) error
RegisterNotesServiceHandlerClient registers the http handlers for service NotesService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NotesServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NotesServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "NotesServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterNotesServiceHandlerFromEndpoint ¶
func RegisterNotesServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterNotesServiceHandlerFromEndpoint is same as RegisterNotesServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterNotesServiceHandlerServer ¶
func RegisterNotesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NotesServiceServer) error
RegisterNotesServiceHandlerServer registers the http handlers for service NotesService to "mux". UnaryRPC :call NotesServiceServer 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 RegisterNotesServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterNotesServiceServer ¶
func RegisterNotesServiceServer(s grpc.ServiceRegistrar, srv NotesServiceServer)
Types ¶
type CreateNoteRequest ¶
type CreateNoteRequest struct {
// Title of the new note.
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
// Content/body of the new note.
Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
// contains filtered or unexported fields
}
CreateNoteRequest is the request message for creating a new note.
func (*CreateNoteRequest) Descriptor
deprecated
func (*CreateNoteRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateNoteRequest.ProtoReflect.Descriptor instead.
func (*CreateNoteRequest) GetContent ¶
func (x *CreateNoteRequest) GetContent() string
func (*CreateNoteRequest) GetTitle ¶
func (x *CreateNoteRequest) GetTitle() string
func (*CreateNoteRequest) ProtoMessage ¶
func (*CreateNoteRequest) ProtoMessage()
func (*CreateNoteRequest) ProtoReflect ¶
func (x *CreateNoteRequest) ProtoReflect() protoreflect.Message
func (*CreateNoteRequest) Reset ¶
func (x *CreateNoteRequest) Reset()
func (*CreateNoteRequest) String ¶
func (x *CreateNoteRequest) String() string
func (*CreateNoteRequest) Verbose ¶
func (x *CreateNoteRequest) Verbose() string
type CreateNoteResponse ¶
type CreateNoteResponse struct {
// The created note, including its generated ID and timestamps.
Note *Note `protobuf:"bytes,1,opt,name=note,proto3" json:"note,omitempty"`
// contains filtered or unexported fields
}
CreateNoteResponse is the response message after creating a note.
func (*CreateNoteResponse) Descriptor
deprecated
func (*CreateNoteResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateNoteResponse.ProtoReflect.Descriptor instead.
func (*CreateNoteResponse) GetNote ¶
func (x *CreateNoteResponse) GetNote() *Note
func (*CreateNoteResponse) ProtoMessage ¶
func (*CreateNoteResponse) ProtoMessage()
func (*CreateNoteResponse) ProtoReflect ¶
func (x *CreateNoteResponse) ProtoReflect() protoreflect.Message
func (*CreateNoteResponse) Reset ¶
func (x *CreateNoteResponse) Reset()
func (*CreateNoteResponse) String ¶
func (x *CreateNoteResponse) String() string
func (*CreateNoteResponse) Verbose ¶
func (x *CreateNoteResponse) Verbose() string
type DeleteNoteRequest ¶
type DeleteNoteRequest struct {
// ID of the note to delete.
Id *types.ID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
DeleteNoteRequest is the request message for deleting a note by ID.
func (*DeleteNoteRequest) Descriptor
deprecated
func (*DeleteNoteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteNoteRequest.ProtoReflect.Descriptor instead.
func (*DeleteNoteRequest) GetId ¶
func (x *DeleteNoteRequest) GetId() *types.ID
func (*DeleteNoteRequest) ProtoMessage ¶
func (*DeleteNoteRequest) ProtoMessage()
func (*DeleteNoteRequest) ProtoReflect ¶
func (x *DeleteNoteRequest) ProtoReflect() protoreflect.Message
func (*DeleteNoteRequest) Reset ¶
func (x *DeleteNoteRequest) Reset()
func (*DeleteNoteRequest) String ¶
func (x *DeleteNoteRequest) String() string
func (*DeleteNoteRequest) Verbose ¶
func (x *DeleteNoteRequest) Verbose() string
type DeleteNoteResponse ¶
type DeleteNoteResponse struct {
// contains filtered or unexported fields
}
DeleteNoteResponse is the response message after deleting a note.
func (*DeleteNoteResponse) Descriptor
deprecated
func (*DeleteNoteResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteNoteResponse.ProtoReflect.Descriptor instead.
func (*DeleteNoteResponse) ProtoMessage ¶
func (*DeleteNoteResponse) ProtoMessage()
func (*DeleteNoteResponse) ProtoReflect ¶
func (x *DeleteNoteResponse) ProtoReflect() protoreflect.Message
func (*DeleteNoteResponse) Reset ¶
func (x *DeleteNoteResponse) Reset()
func (*DeleteNoteResponse) String ¶
func (x *DeleteNoteResponse) String() string
func (*DeleteNoteResponse) Verbose ¶
func (x *DeleteNoteResponse) Verbose() string
type Event ¶
type Event struct {
// Unique identifier of the event.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Type of the event.
Type EventType `protobuf:"varint,2,opt,name=type,proto3,enum=api.notes.v1.EventType" json:"type,omitempty"`
// ID of the note associated with this event.
NoteId *types.ID `protobuf:"bytes,3,opt,name=note_id,json=noteId,proto3" json:"note_id,omitempty"`
// Timestamp when the event occurred.
EventTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=event_time,json=eventTime,proto3" json:"event_time,omitempty"`
// contains filtered or unexported fields
}
Event represents a system notification about a change in notes.
func (*Event) Descriptor
deprecated
func (*Event) GetEventTime ¶
func (x *Event) GetEventTime() *timestamppb.Timestamp
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type EventType ¶
type EventType int32
EventType defines the type of action that occurred to a note.
func (EventType) Descriptor ¶
func (EventType) Descriptor() protoreflect.EnumDescriptor
func (EventType) EnumDescriptor
deprecated
func (EventType) Number ¶
func (x EventType) Number() protoreflect.EnumNumber
func (EventType) Type ¶
func (EventType) Type() protoreflect.EnumType
type ListNotesRequest ¶
type ListNotesRequest struct {
// contains filtered or unexported fields
}
ListNotesRequest is the request message for listing notes.
func (*ListNotesRequest) Descriptor
deprecated
func (*ListNotesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListNotesRequest.ProtoReflect.Descriptor instead.
func (*ListNotesRequest) ProtoMessage ¶
func (*ListNotesRequest) ProtoMessage()
func (*ListNotesRequest) ProtoReflect ¶
func (x *ListNotesRequest) ProtoReflect() protoreflect.Message
func (*ListNotesRequest) Reset ¶
func (x *ListNotesRequest) Reset()
func (*ListNotesRequest) String ¶
func (x *ListNotesRequest) String() string
func (*ListNotesRequest) Verbose ¶
func (x *ListNotesRequest) Verbose() string
type ListNotesResponse ¶
type ListNotesResponse struct {
// List of notes.
Notes []*Note `protobuf:"bytes,1,rep,name=notes,proto3" json:"notes,omitempty"`
// contains filtered or unexported fields
}
ListNotesResponse is the response message containing a list of notes.
func (*ListNotesResponse) Descriptor
deprecated
func (*ListNotesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListNotesResponse.ProtoReflect.Descriptor instead.
func (*ListNotesResponse) GetNotes ¶
func (x *ListNotesResponse) GetNotes() []*Note
func (*ListNotesResponse) ProtoMessage ¶
func (*ListNotesResponse) ProtoMessage()
func (*ListNotesResponse) ProtoReflect ¶
func (x *ListNotesResponse) ProtoReflect() protoreflect.Message
func (*ListNotesResponse) Reset ¶
func (x *ListNotesResponse) Reset()
func (*ListNotesResponse) String ¶
func (x *ListNotesResponse) String() string
func (*ListNotesResponse) Verbose ¶
func (x *ListNotesResponse) Verbose() string
type Note ¶
type Note struct {
// Unique identifier of the note.
Id *types.ID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Title of the note.
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
// Content/body of the note.
Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
// Timestamp when the note was created.
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
// Timestamp when the note was last updated.
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
// contains filtered or unexported fields
}
Note represents a single note entity.
func (*Note) Descriptor
deprecated
func (*Note) GetContent ¶
func (*Note) GetCreatedAt ¶
func (x *Note) GetCreatedAt() *timestamppb.Timestamp
func (*Note) GetUpdatedAt ¶
func (x *Note) GetUpdatedAt() *timestamppb.Timestamp
func (*Note) ProtoMessage ¶
func (*Note) ProtoMessage()
func (*Note) ProtoReflect ¶
func (x *Note) ProtoReflect() protoreflect.Message
type NotesServiceClient ¶
type NotesServiceClient interface {
// ListNotes returns a list of notes.
ListNotes(ctx context.Context, in *ListNotesRequest, opts ...grpc.CallOption) (*ListNotesResponse, error)
// RetrieveNote returns a single note by its unique identifier.
RetrieveNote(ctx context.Context, in *RetrieveNoteRequest, opts ...grpc.CallOption) (*RetrieveNoteResponse, error)
// CreateNote creates a new note and returns it with the unique identifier.
CreateNote(ctx context.Context, in *CreateNoteRequest, opts ...grpc.CallOption) (*CreateNoteResponse, error)
// DeleteNote deletes a note by its unique identifier.
DeleteNote(ctx context.Context, in *DeleteNoteRequest, opts ...grpc.CallOption) (*DeleteNoteResponse, error)
// SubscribeToEvents will notify about creation or deletion of notes.
SubscribeToEvents(ctx context.Context, in *SubscribeToEventsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SubscribeToEventsResponse], error)
}
NotesServiceClient is the client API for NotesService 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.
NotesService provides CRUD operations for managing notes.
func NewNotesServiceClient ¶
func NewNotesServiceClient(cc grpc.ClientConnInterface) NotesServiceClient
type NotesServiceServer ¶
type NotesServiceServer interface {
// ListNotes returns a list of notes.
ListNotes(context.Context, *ListNotesRequest) (*ListNotesResponse, error)
// RetrieveNote returns a single note by its unique identifier.
RetrieveNote(context.Context, *RetrieveNoteRequest) (*RetrieveNoteResponse, error)
// CreateNote creates a new note and returns it with the unique identifier.
CreateNote(context.Context, *CreateNoteRequest) (*CreateNoteResponse, error)
// DeleteNote deletes a note by its unique identifier.
DeleteNote(context.Context, *DeleteNoteRequest) (*DeleteNoteResponse, error)
// SubscribeToEvents will notify about creation or deletion of notes.
SubscribeToEvents(*SubscribeToEventsRequest, grpc.ServerStreamingServer[SubscribeToEventsResponse]) error
// contains filtered or unexported methods
}
NotesServiceServer is the server API for NotesService service. All implementations must embed UnimplementedNotesServiceServer for forward compatibility.
NotesService provides CRUD operations for managing notes.
type NotesService_SubscribeToEventsClient ¶
type NotesService_SubscribeToEventsClient = grpc.ServerStreamingClient[SubscribeToEventsResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type NotesService_SubscribeToEventsServer ¶
type NotesService_SubscribeToEventsServer = grpc.ServerStreamingServer[SubscribeToEventsResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type RetrieveNoteRequest ¶
type RetrieveNoteRequest struct {
// ID of the note to retrieve.
Id *types.ID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
RetrieveNoteRequest is the request message for fetching a single note by ID.
func (*RetrieveNoteRequest) Descriptor
deprecated
func (*RetrieveNoteRequest) Descriptor() ([]byte, []int)
Deprecated: Use RetrieveNoteRequest.ProtoReflect.Descriptor instead.
func (*RetrieveNoteRequest) GetId ¶
func (x *RetrieveNoteRequest) GetId() *types.ID
func (*RetrieveNoteRequest) ProtoMessage ¶
func (*RetrieveNoteRequest) ProtoMessage()
func (*RetrieveNoteRequest) ProtoReflect ¶
func (x *RetrieveNoteRequest) ProtoReflect() protoreflect.Message
func (*RetrieveNoteRequest) Reset ¶
func (x *RetrieveNoteRequest) Reset()
func (*RetrieveNoteRequest) String ¶
func (x *RetrieveNoteRequest) String() string
func (*RetrieveNoteRequest) Verbose ¶
func (x *RetrieveNoteRequest) Verbose() string
type RetrieveNoteResponse ¶
type RetrieveNoteResponse struct {
// The requested note.
Note *Note `protobuf:"bytes,1,opt,name=note,proto3" json:"note,omitempty"`
// contains filtered or unexported fields
}
RetrieveNoteResponse is the response message for a single note retrieval.
func (*RetrieveNoteResponse) Descriptor
deprecated
func (*RetrieveNoteResponse) Descriptor() ([]byte, []int)
Deprecated: Use RetrieveNoteResponse.ProtoReflect.Descriptor instead.
func (*RetrieveNoteResponse) GetNote ¶
func (x *RetrieveNoteResponse) GetNote() *Note
func (*RetrieveNoteResponse) ProtoMessage ¶
func (*RetrieveNoteResponse) ProtoMessage()
func (*RetrieveNoteResponse) ProtoReflect ¶
func (x *RetrieveNoteResponse) ProtoReflect() protoreflect.Message
func (*RetrieveNoteResponse) Reset ¶
func (x *RetrieveNoteResponse) Reset()
func (*RetrieveNoteResponse) String ¶
func (x *RetrieveNoteResponse) String() string
func (*RetrieveNoteResponse) Verbose ¶
func (x *RetrieveNoteResponse) Verbose() string
type SubscribeToEventsRequest ¶
type SubscribeToEventsRequest struct {
// contains filtered or unexported fields
}
SubscribeToEventsRequest is the request message for event stream subscription.
func (*SubscribeToEventsRequest) Descriptor
deprecated
func (*SubscribeToEventsRequest) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeToEventsRequest.ProtoReflect.Descriptor instead.
func (*SubscribeToEventsRequest) ProtoMessage ¶
func (*SubscribeToEventsRequest) ProtoMessage()
func (*SubscribeToEventsRequest) ProtoReflect ¶
func (x *SubscribeToEventsRequest) ProtoReflect() protoreflect.Message
func (*SubscribeToEventsRequest) Reset ¶
func (x *SubscribeToEventsRequest) Reset()
func (*SubscribeToEventsRequest) String ¶
func (x *SubscribeToEventsRequest) String() string
func (*SubscribeToEventsRequest) Verbose ¶
func (x *SubscribeToEventsRequest) Verbose() string
type SubscribeToEventsResponse ¶
type SubscribeToEventsResponse struct {
// The content of the subscription response.
//
// Types that are valid to be assigned to Payload:
//
// *SubscribeToEventsResponse_Event
// *SubscribeToEventsResponse_Unread
Payload isSubscribeToEventsResponse_Payload `protobuf_oneof:"payload"`
// contains filtered or unexported fields
}
SubscribeToEventsResponse is the response message in the event stream.
func (*SubscribeToEventsResponse) Descriptor
deprecated
func (*SubscribeToEventsResponse) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeToEventsResponse.ProtoReflect.Descriptor instead.
func (*SubscribeToEventsResponse) GetEvent ¶
func (x *SubscribeToEventsResponse) GetEvent() *Event
func (*SubscribeToEventsResponse) GetPayload ¶
func (x *SubscribeToEventsResponse) GetPayload() isSubscribeToEventsResponse_Payload
func (*SubscribeToEventsResponse) GetUnread ¶
func (x *SubscribeToEventsResponse) GetUnread() *Unread
func (*SubscribeToEventsResponse) ProtoMessage ¶
func (*SubscribeToEventsResponse) ProtoMessage()
func (*SubscribeToEventsResponse) ProtoReflect ¶
func (x *SubscribeToEventsResponse) ProtoReflect() protoreflect.Message
func (*SubscribeToEventsResponse) Reset ¶
func (x *SubscribeToEventsResponse) Reset()
func (*SubscribeToEventsResponse) String ¶
func (x *SubscribeToEventsResponse) String() string
func (*SubscribeToEventsResponse) Verbose ¶
func (x *SubscribeToEventsResponse) Verbose() string
type SubscribeToEventsResponse_Event ¶
type SubscribeToEventsResponse_Event struct {
// A specific event that just occurred.
Event *Event `protobuf:"bytes,1,opt,name=event,proto3,oneof"`
}
type SubscribeToEventsResponse_Unread ¶
type SubscribeToEventsResponse_Unread struct {
// Information about unread events (e.g., sent on initial connection).
Unread *Unread `protobuf:"bytes,2,opt,name=unread,proto3,oneof"`
}
type UnimplementedNotesServiceServer ¶
type UnimplementedNotesServiceServer struct{}
UnimplementedNotesServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedNotesServiceServer) CreateNote ¶
func (UnimplementedNotesServiceServer) CreateNote(context.Context, *CreateNoteRequest) (*CreateNoteResponse, error)
func (UnimplementedNotesServiceServer) DeleteNote ¶
func (UnimplementedNotesServiceServer) DeleteNote(context.Context, *DeleteNoteRequest) (*DeleteNoteResponse, error)
func (UnimplementedNotesServiceServer) ListNotes ¶
func (UnimplementedNotesServiceServer) ListNotes(context.Context, *ListNotesRequest) (*ListNotesResponse, error)
func (UnimplementedNotesServiceServer) RetrieveNote ¶
func (UnimplementedNotesServiceServer) RetrieveNote(context.Context, *RetrieveNoteRequest) (*RetrieveNoteResponse, error)
func (UnimplementedNotesServiceServer) SubscribeToEvents ¶
func (UnimplementedNotesServiceServer) SubscribeToEvents(*SubscribeToEventsRequest, grpc.ServerStreamingServer[SubscribeToEventsResponse]) error
type Unread ¶
type Unread struct {
// Total count of unread events.
Events int32 `protobuf:"varint,1,opt,name=events,proto3" json:"events,omitempty"`
// contains filtered or unexported fields
}
Unread represents information about the number of unread events.
func (*Unread) Descriptor
deprecated
func (*Unread) ProtoMessage ¶
func (*Unread) ProtoMessage()
func (*Unread) ProtoReflect ¶
func (x *Unread) ProtoReflect() protoreflect.Message
type UnsafeNotesServiceServer ¶
type UnsafeNotesServiceServer interface {
// contains filtered or unexported methods
}
UnsafeNotesServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NotesServiceServer will result in compilation errors.