notes

package module
v0.0.0-...-5ee94b0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: BSD-3-Clause Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	NotesService_CreateNote_FullMethodName       = "/notes.NotesService/CreateNote"
	NotesService_GetNote_FullMethodName          = "/notes.NotesService/GetNote"
	NotesService_GetNotesByAuthor_FullMethodName = "/notes.NotesService/GetNotesByAuthor"
)

Variables

View Source
var File_notes_notes_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Location.ProtoReflect.Descriptor instead.

func (*Location) GetAt

func (x *Location) GetAt() *timestamppb.Timestamp

func (*Location) GetLatitude

func (x *Location) GetLatitude() float64

func (*Location) GetLongitude

func (x *Location) GetLongitude() float64

func (*Location) ProtoMessage

func (*Location) ProtoMessage()

func (*Location) ProtoReflect

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

func (*Location) Reset

func (x *Location) Reset()

func (*Location) String

func (x *Location) String() string

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

Deprecated: Use Note.ProtoReflect.Descriptor instead.

func (*Note) GetAuthor

func (x *Note) GetAuthor() string

func (*Note) GetCreatedAt

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

func (*Note) GetId

func (x *Note) GetId() string

func (*Note) GetLastUpdated

func (x *Note) GetLastUpdated() *timestamppb.Timestamp

func (*Note) GetLocations

func (x *Note) GetLocations() []*Location

func (*Note) GetText

func (x *Note) GetText() string

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 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

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) GetNote

func (UnimplementedNotesServiceServer) GetNotesByAuthor

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.

Jump to

Keyboard shortcuts

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