Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterNotesServiceServer(s grpc.ServiceRegistrar, srv NotesServiceServer)
- type CreateNoteRequest
- func (*CreateNoteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateNoteRequest) GetAuthor() string
- func (x *CreateNoteRequest) GetNote() *Note
- func (*CreateNoteRequest) ProtoMessage()
- func (x *CreateNoteRequest) ProtoReflect() protoreflect.Message
- func (x *CreateNoteRequest) Reset()
- func (x *CreateNoteRequest) String() string
- type CreateNoteResponse
- func (*CreateNoteResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateNoteResponse) GetErrMessage() string
- func (*CreateNoteResponse) ProtoMessage()
- func (x *CreateNoteResponse) ProtoReflect() protoreflect.Message
- func (x *CreateNoteResponse) Reset()
- func (x *CreateNoteResponse) String() string
- type GetNoteRequest
- func (*GetNoteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetNoteRequest) GetAuthor() string
- func (x *GetNoteRequest) GetId() string
- func (*GetNoteRequest) ProtoMessage()
- func (x *GetNoteRequest) ProtoReflect() protoreflect.Message
- func (x *GetNoteRequest) Reset()
- func (x *GetNoteRequest) String() string
- type GetNoteResponse
- type GetNotesByAuthorRequest
- func (*GetNotesByAuthorRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetNotesByAuthorRequest) GetAuthor() string
- func (*GetNotesByAuthorRequest) ProtoMessage()
- func (x *GetNotesByAuthorRequest) ProtoReflect() protoreflect.Message
- func (x *GetNotesByAuthorRequest) Reset()
- func (x *GetNotesByAuthorRequest) String() string
- type GetNotesByAuthorResponse
- func (*GetNotesByAuthorResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetNotesByAuthorResponse) GetNotes() []*Note
- func (*GetNotesByAuthorResponse) ProtoMessage()
- func (x *GetNotesByAuthorResponse) ProtoReflect() protoreflect.Message
- func (x *GetNotesByAuthorResponse) Reset()
- func (x *GetNotesByAuthorResponse) String() string
- type Location
- func (*Location) Descriptor() ([]byte, []int)deprecated
- func (x *Location) GetAt() *timestamppb.Timestamp
- func (x *Location) GetLatitude() float64
- func (x *Location) GetLongitude() float64
- func (*Location) ProtoMessage()
- func (x *Location) ProtoReflect() protoreflect.Message
- func (x *Location) Reset()
- func (x *Location) String() string
- type Note
- func (*Note) Descriptor() ([]byte, []int)deprecated
- func (x *Note) GetAuthor() string
- func (x *Note) GetCreatedAt() *timestamppb.Timestamp
- func (x *Note) GetId() string
- func (x *Note) GetLastUpdated() *timestamppb.Timestamp
- func (x *Note) GetLocations() []*Location
- func (x *Note) GetText() string
- func (*Note) ProtoMessage()
- func (x *Note) ProtoReflect() protoreflect.Message
- func (x *Note) Reset()
- func (x *Note) String() string
- type NotesServiceClient
- type NotesServiceServer
- type UnimplementedNotesServiceServer
- func (UnimplementedNotesServiceServer) CreateNote(context.Context, *CreateNoteRequest) (*CreateNoteResponse, error)
- func (UnimplementedNotesServiceServer) GetNote(context.Context, *GetNoteRequest) (*GetNoteResponse, error)
- func (UnimplementedNotesServiceServer) GetNotesByAuthor(context.Context, *GetNotesByAuthorRequest) (*GetNotesByAuthorResponse, error)
- type UnsafeNotesServiceServer
Constants ¶
const ( NotesService_CreateNote_FullMethodName = "/notes.NotesService/CreateNote" NotesService_GetNote_FullMethodName = "/notes.NotesService/GetNote" NotesService_GetNotesByAuthor_FullMethodName = "/notes.NotesService/GetNotesByAuthor" )
Variables ¶
var File_notes_notes_proto protoreflect.FileDescriptor
var NotesService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "notes.NotesService", HandlerType: (*NotesServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateNote", Handler: _NotesService_CreateNote_Handler, }, { MethodName: "GetNote", Handler: _NotesService_GetNote_Handler, }, { MethodName: "GetNotesByAuthor", Handler: _NotesService_GetNotesByAuthor_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "notes/notes.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 RegisterNotesServiceServer ¶
func RegisterNotesServiceServer(s grpc.ServiceRegistrar, srv NotesServiceServer)
Types ¶
type CreateNoteRequest ¶
type CreateNoteRequest struct { Author string `protobuf:"bytes,1,opt,name=author,proto3" json:"author,omitempty"` // Creator name Note *Note `protobuf:"bytes,2,opt,name=note,proto3" json:"note,omitempty"` // contains filtered or unexported fields }
func (*CreateNoteRequest) Descriptor
deprecated
func (*CreateNoteRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateNoteRequest.ProtoReflect.Descriptor instead.
func (*CreateNoteRequest) GetAuthor ¶
func (x *CreateNoteRequest) GetAuthor() string
func (*CreateNoteRequest) GetNote ¶
func (x *CreateNoteRequest) GetNote() *Note
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
type CreateNoteResponse ¶
type CreateNoteResponse struct { ErrMessage *string `protobuf:"bytes,1,opt,name=err_message,json=errMessage,proto3,oneof" json:"err_message,omitempty"` // contains filtered or unexported fields }
func (*CreateNoteResponse) Descriptor
deprecated
func (*CreateNoteResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateNoteResponse.ProtoReflect.Descriptor instead.
func (*CreateNoteResponse) GetErrMessage ¶
func (x *CreateNoteResponse) GetErrMessage() string
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
type GetNoteRequest ¶
type GetNoteRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // UUID of the note Author string `protobuf:"bytes,2,opt,name=author,proto3" json:"author,omitempty"` // UUID of author // contains filtered or unexported fields }
func (*GetNoteRequest) Descriptor
deprecated
func (*GetNoteRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetNoteRequest.ProtoReflect.Descriptor instead.
func (*GetNoteRequest) GetAuthor ¶
func (x *GetNoteRequest) GetAuthor() string
func (*GetNoteRequest) GetId ¶
func (x *GetNoteRequest) GetId() string
func (*GetNoteRequest) ProtoMessage ¶
func (*GetNoteRequest) ProtoMessage()
func (*GetNoteRequest) ProtoReflect ¶
func (x *GetNoteRequest) ProtoReflect() protoreflect.Message
func (*GetNoteRequest) Reset ¶
func (x *GetNoteRequest) Reset()
func (*GetNoteRequest) String ¶
func (x *GetNoteRequest) String() string
type GetNoteResponse ¶
type GetNoteResponse struct { Note *Note `protobuf:"bytes,1,opt,name=note,proto3" json:"note,omitempty"` // contains filtered or unexported fields }
func (*GetNoteResponse) Descriptor
deprecated
func (*GetNoteResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetNoteResponse.ProtoReflect.Descriptor instead.
func (*GetNoteResponse) GetNote ¶
func (x *GetNoteResponse) GetNote() *Note
func (*GetNoteResponse) ProtoMessage ¶
func (*GetNoteResponse) ProtoMessage()
func (*GetNoteResponse) ProtoReflect ¶
func (x *GetNoteResponse) ProtoReflect() protoreflect.Message
func (*GetNoteResponse) Reset ¶
func (x *GetNoteResponse) Reset()
func (*GetNoteResponse) String ¶
func (x *GetNoteResponse) String() string
type GetNotesByAuthorRequest ¶
type GetNotesByAuthorRequest struct { Author string `protobuf:"bytes,1,opt,name=author,proto3" json:"author,omitempty"` // UUID of author // contains filtered or unexported fields }
func (*GetNotesByAuthorRequest) Descriptor
deprecated
func (*GetNotesByAuthorRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetNotesByAuthorRequest.ProtoReflect.Descriptor instead.
func (*GetNotesByAuthorRequest) GetAuthor ¶
func (x *GetNotesByAuthorRequest) GetAuthor() string
func (*GetNotesByAuthorRequest) ProtoMessage ¶
func (*GetNotesByAuthorRequest) ProtoMessage()
func (*GetNotesByAuthorRequest) ProtoReflect ¶
func (x *GetNotesByAuthorRequest) ProtoReflect() protoreflect.Message
func (*GetNotesByAuthorRequest) Reset ¶
func (x *GetNotesByAuthorRequest) Reset()
func (*GetNotesByAuthorRequest) String ¶
func (x *GetNotesByAuthorRequest) String() string
type GetNotesByAuthorResponse ¶
type GetNotesByAuthorResponse struct { Notes []*Note `protobuf:"bytes,1,rep,name=notes,proto3" json:"notes,omitempty"` // UUID of author // contains filtered or unexported fields }
NotesByAuthorResponse defines notes value returned
func (*GetNotesByAuthorResponse) Descriptor
deprecated
func (*GetNotesByAuthorResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetNotesByAuthorResponse.ProtoReflect.Descriptor instead.
func (*GetNotesByAuthorResponse) GetNotes ¶
func (x *GetNotesByAuthorResponse) GetNotes() []*Note
func (*GetNotesByAuthorResponse) ProtoMessage ¶
func (*GetNotesByAuthorResponse) ProtoMessage()
func (*GetNotesByAuthorResponse) ProtoReflect ¶
func (x *GetNotesByAuthorResponse) ProtoReflect() protoreflect.Message
func (*GetNotesByAuthorResponse) Reset ¶
func (x *GetNotesByAuthorResponse) Reset()
func (*GetNotesByAuthorResponse) String ¶
func (x *GetNotesByAuthorResponse) String() string
type Location ¶
type Location struct { Latitude float64 `protobuf:"fixed64,1,opt,name=latitude,proto3" json:"latitude,omitempty"` Longitude float64 `protobuf:"fixed64,2,opt,name=longitude,proto3" json:"longitude,omitempty"` At *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=at,proto3" json:"at,omitempty"` // contains filtered or unexported fields }
Location is latitude and longitude and time of location
func (*Location) Descriptor
deprecated
func (*Location) GetAt ¶
func (x *Location) GetAt() *timestamppb.Timestamp
func (*Location) GetLatitude ¶
func (*Location) GetLongitude ¶
func (*Location) ProtoMessage ¶
func (*Location) ProtoMessage()
func (*Location) ProtoReflect ¶
func (x *Location) ProtoReflect() protoreflect.Message
type Note ¶
type Note struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Unique UUID number for this Note. CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` LastUpdated *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` Author string `protobuf:"bytes,4,opt,name=author,proto3" json:"author,omitempty"` // UUID of the user that created this note Locations []*Location `protobuf:"bytes,5,rep,name=locations,proto3" json:"locations,omitempty"` Text string `protobuf:"bytes,6,opt,name=text,proto3" json:"text,omitempty"` // Content of the text // contains filtered or unexported fields }
Note data for a Request or response
func (*Note) Descriptor
deprecated
func (*Note) GetCreatedAt ¶
func (x *Note) GetCreatedAt() *timestamppb.Timestamp
func (*Note) GetLastUpdated ¶
func (x *Note) GetLastUpdated() *timestamppb.Timestamp
func (*Note) GetLocations ¶
func (*Note) ProtoMessage ¶
func (*Note) ProtoMessage()
func (*Note) ProtoReflect ¶
func (x *Note) ProtoReflect() protoreflect.Message
type NotesServiceClient ¶
type NotesServiceClient interface { CreateNote(ctx context.Context, in *CreateNoteRequest, opts ...grpc.CallOption) (*CreateNoteResponse, error) GetNote(ctx context.Context, in *GetNoteRequest, opts ...grpc.CallOption) (*GetNoteResponse, error) GetNotesByAuthor(ctx context.Context, in *GetNotesByAuthorRequest, opts ...grpc.CallOption) (*GetNotesByAuthorResponse, 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 defines the gRPC endpoints to be used
func NewNotesServiceClient ¶
func NewNotesServiceClient(cc grpc.ClientConnInterface) NotesServiceClient
type NotesServiceServer ¶
type NotesServiceServer interface { CreateNote(context.Context, *CreateNoteRequest) (*CreateNoteResponse, error) GetNote(context.Context, *GetNoteRequest) (*GetNoteResponse, error) GetNotesByAuthor(context.Context, *GetNotesByAuthorRequest) (*GetNotesByAuthorResponse, error) // contains filtered or unexported methods }
NotesServiceServer is the server API for NotesService service. All implementations must embed UnimplementedNotesServiceServer for forward compatibility
NotesService defines the gRPC endpoints to be used
type UnimplementedNotesServiceServer ¶
type UnimplementedNotesServiceServer struct { }
UnimplementedNotesServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedNotesServiceServer) CreateNote ¶
func (UnimplementedNotesServiceServer) CreateNote(context.Context, *CreateNoteRequest) (*CreateNoteResponse, error)
func (UnimplementedNotesServiceServer) GetNote ¶
func (UnimplementedNotesServiceServer) GetNote(context.Context, *GetNoteRequest) (*GetNoteResponse, error)
func (UnimplementedNotesServiceServer) GetNotesByAuthor ¶
func (UnimplementedNotesServiceServer) GetNotesByAuthor(context.Context, *GetNotesByAuthorRequest) (*GetNotesByAuthorResponse, error)
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.