Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterNotesServiceServer(s grpc.ServiceRegistrar, srv NotesServiceServer)
- type AddRequest
- type AddResponse
- type Kind
- type ListRequest
- type ListResponse
- type Note
- func (*Note) Descriptor() ([]byte, []int)deprecated
- func (x *Note) GetCreated() *timestamppb.Timestamp
- func (x *Note) GetDigest() []byte
- func (x *Note) GetExtra() *structpb.Struct
- func (x *Note) GetId() string
- func (x *Note) GetKind() Kind
- func (x *Note) GetLabels() map[string]string
- func (x *Note) GetPinned() bool
- func (x *Note) GetPriority() *wrapperspb.Int64Value
- func (x *Note) GetSequence() int64
- func (x *Note) GetTags() []string
- func (x *Note) GetText() string
- func (x *Note) GetWeight() float64
- func (*Note) ProtoMessage()
- func (x *Note) ProtoReflect() protoreflect.Message
- func (x *Note) Reset()
- func (x *Note) String() string
- type NotesServiceClient
- type NotesServiceServer
- type NotesService_WatchClient
- type NotesService_WatchServer
- type UnimplementedNotesServiceServer
- func (UnimplementedNotesServiceServer) Add(context.Context, *AddRequest) (*AddResponse, error)
- func (UnimplementedNotesServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
- func (UnimplementedNotesServiceServer) Wait(context.Context, *WaitRequest) (*WaitResponse, error)
- func (UnimplementedNotesServiceServer) Watch(*WatchRequest, grpc.ServerStreamingServer[WatchResponse]) error
- type UnsafeNotesServiceServer
- type WaitRequest
- type WaitResponse
- type WatchRequest
- type WatchResponse
Constants ¶
const ( NotesService_List_FullMethodName = "/notes.v1.NotesService/List" NotesService_Add_FullMethodName = "/notes.v1.NotesService/Add" NotesService_Wait_FullMethodName = "/notes.v1.NotesService/Wait" NotesService_Watch_FullMethodName = "/notes.v1.NotesService/Watch" )
Variables ¶
var ( Kind_name = map[int32]string{ 0: "KIND_UNSPECIFIED", 1: "KIND_TODO", 2: "KIND_DONE", } Kind_value = map[string]int32{ "KIND_UNSPECIFIED": 0, "KIND_TODO": 1, "KIND_DONE": 2, } )
Enum value maps for Kind.
var File_notes_v1_notes_proto protoreflect.FileDescriptor
var NotesService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "notes.v1.NotesService", HandlerType: (*NotesServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "List", Handler: _NotesService_List_Handler, }, { MethodName: "Add", Handler: _NotesService_Add_Handler, }, { MethodName: "Wait", Handler: _NotesService_Wait_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Watch", Handler: _NotesService_Watch_Handler, ServerStreams: true, }, }, Metadata: "notes/v1/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 AddRequest ¶
type AddRequest struct {
Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
Kind Kind `protobuf:"varint,2,opt,name=kind,proto3,enum=notes.v1.Kind" json:"kind,omitempty"`
// contains filtered or unexported fields
}
func (*AddRequest) Descriptor
deprecated
func (*AddRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddRequest.ProtoReflect.Descriptor instead.
func (*AddRequest) GetKind ¶
func (x *AddRequest) GetKind() Kind
func (*AddRequest) GetText ¶
func (x *AddRequest) GetText() string
func (*AddRequest) ProtoMessage ¶
func (*AddRequest) ProtoMessage()
func (*AddRequest) ProtoReflect ¶
func (x *AddRequest) ProtoReflect() protoreflect.Message
func (*AddRequest) Reset ¶
func (x *AddRequest) Reset()
func (*AddRequest) String ¶
func (x *AddRequest) String() string
type AddResponse ¶
type AddResponse struct {
Note *Note `protobuf:"bytes,1,opt,name=note,proto3" json:"note,omitempty"`
// contains filtered or unexported fields
}
func (*AddResponse) Descriptor
deprecated
func (*AddResponse) Descriptor() ([]byte, []int)
Deprecated: Use AddResponse.ProtoReflect.Descriptor instead.
func (*AddResponse) GetNote ¶
func (x *AddResponse) GetNote() *Note
func (*AddResponse) ProtoMessage ¶
func (*AddResponse) ProtoMessage()
func (*AddResponse) ProtoReflect ¶
func (x *AddResponse) ProtoReflect() protoreflect.Message
func (*AddResponse) Reset ¶
func (x *AddResponse) Reset()
func (*AddResponse) String ¶
func (x *AddResponse) String() string
type Kind ¶
type Kind int32
func (Kind) Descriptor ¶
func (Kind) Descriptor() protoreflect.EnumDescriptor
func (Kind) EnumDescriptor
deprecated
func (Kind) Number ¶
func (x Kind) Number() protoreflect.EnumNumber
func (Kind) Type ¶
func (Kind) Type() protoreflect.EnumType
type ListRequest ¶
type ListRequest struct {
Limit int32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
// contains filtered or unexported fields
}
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetLimit ¶
func (x *ListRequest) GetLimit() int32
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
type ListResponse ¶
type ListResponse struct {
Notes []*Note `protobuf:"bytes,1,rep,name=notes,proto3" json:"notes,omitempty"`
// contains filtered or unexported fields
}
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetNotes ¶
func (x *ListResponse) GetNotes() []*Note
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶
func (x *ListResponse) Reset()
func (*ListResponse) String ¶
func (x *ListResponse) String() string
type Note ¶
type Note struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
Kind Kind `protobuf:"varint,3,opt,name=kind,proto3,enum=notes.v1.Kind" json:"kind,omitempty"`
Created *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created,proto3" json:"created,omitempty"`
Labels map[string]string `` /* 139-byte string literal not displayed */
Priority *wrapperspb.Int64Value `protobuf:"bytes,6,opt,name=priority,proto3" json:"priority,omitempty"`
Sequence int64 `protobuf:"varint,7,opt,name=sequence,proto3" json:"sequence,omitempty"`
Tags []string `protobuf:"bytes,8,rep,name=tags,proto3" json:"tags,omitempty"`
Extra *structpb.Struct `protobuf:"bytes,9,opt,name=extra,proto3" json:"extra,omitempty"`
Pinned bool `protobuf:"varint,10,opt,name=pinned,proto3" json:"pinned,omitempty"`
Weight float64 `protobuf:"fixed64,11,opt,name=weight,proto3" json:"weight,omitempty"`
Digest []byte `protobuf:"bytes,12,opt,name=digest,proto3" json:"digest,omitempty"`
// contains filtered or unexported fields
}
Note carries one field of every shape the schema derivation must handle.
func (*Note) Descriptor
deprecated
func (*Note) GetCreated ¶
func (x *Note) GetCreated() *timestamppb.Timestamp
func (*Note) GetPriority ¶
func (x *Note) GetPriority() *wrapperspb.Int64Value
func (*Note) GetSequence ¶
func (*Note) ProtoMessage ¶
func (*Note) ProtoMessage()
func (*Note) ProtoReflect ¶
func (x *Note) ProtoReflect() protoreflect.Message
type NotesServiceClient ¶
type NotesServiceClient interface {
List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddResponse, error)
Wait(ctx context.Context, in *WaitRequest, opts ...grpc.CallOption) (*WaitResponse, error)
Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[WatchResponse], 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 is the fixture service the gRPC binding tests run: two unary methods, one that blocks so deadlines and cancellation can be observed, and one streaming method so refusal at registration can be shown.
func NewNotesServiceClient ¶
func NewNotesServiceClient(cc grpc.ClientConnInterface) NotesServiceClient
type NotesServiceServer ¶
type NotesServiceServer interface {
List(context.Context, *ListRequest) (*ListResponse, error)
Add(context.Context, *AddRequest) (*AddResponse, error)
Wait(context.Context, *WaitRequest) (*WaitResponse, error)
Watch(*WatchRequest, grpc.ServerStreamingServer[WatchResponse]) error
// contains filtered or unexported methods
}
NotesServiceServer is the server API for NotesService service. All implementations must embed UnimplementedNotesServiceServer for forward compatibility.
NotesService is the fixture service the gRPC binding tests run: two unary methods, one that blocks so deadlines and cancellation can be observed, and one streaming method so refusal at registration can be shown.
type NotesService_WatchClient ¶
type NotesService_WatchClient = grpc.ServerStreamingClient[WatchResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type NotesService_WatchServer ¶
type NotesService_WatchServer = grpc.ServerStreamingServer[WatchResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
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) Add ¶
func (UnimplementedNotesServiceServer) Add(context.Context, *AddRequest) (*AddResponse, error)
func (UnimplementedNotesServiceServer) List ¶
func (UnimplementedNotesServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
func (UnimplementedNotesServiceServer) Wait ¶
func (UnimplementedNotesServiceServer) Wait(context.Context, *WaitRequest) (*WaitResponse, error)
func (UnimplementedNotesServiceServer) Watch ¶
func (UnimplementedNotesServiceServer) Watch(*WatchRequest, grpc.ServerStreamingServer[WatchResponse]) 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.
type WaitRequest ¶
type WaitRequest struct {
// contains filtered or unexported fields
}
func (*WaitRequest) Descriptor
deprecated
func (*WaitRequest) Descriptor() ([]byte, []int)
Deprecated: Use WaitRequest.ProtoReflect.Descriptor instead.
func (*WaitRequest) ProtoMessage ¶
func (*WaitRequest) ProtoMessage()
func (*WaitRequest) ProtoReflect ¶
func (x *WaitRequest) ProtoReflect() protoreflect.Message
func (*WaitRequest) Reset ¶
func (x *WaitRequest) Reset()
func (*WaitRequest) String ¶
func (x *WaitRequest) String() string
type WaitResponse ¶
type WaitResponse struct {
DeadlineSeen bool `protobuf:"varint,1,opt,name=deadline_seen,json=deadlineSeen,proto3" json:"deadline_seen,omitempty"`
// contains filtered or unexported fields
}
func (*WaitResponse) Descriptor
deprecated
func (*WaitResponse) Descriptor() ([]byte, []int)
Deprecated: Use WaitResponse.ProtoReflect.Descriptor instead.
func (*WaitResponse) GetDeadlineSeen ¶
func (x *WaitResponse) GetDeadlineSeen() bool
func (*WaitResponse) ProtoMessage ¶
func (*WaitResponse) ProtoMessage()
func (*WaitResponse) ProtoReflect ¶
func (x *WaitResponse) ProtoReflect() protoreflect.Message
func (*WaitResponse) Reset ¶
func (x *WaitResponse) Reset()
func (*WaitResponse) String ¶
func (x *WaitResponse) String() string
type WatchRequest ¶
type WatchRequest struct {
// contains filtered or unexported fields
}
func (*WatchRequest) Descriptor
deprecated
func (*WatchRequest) Descriptor() ([]byte, []int)
Deprecated: Use WatchRequest.ProtoReflect.Descriptor instead.
func (*WatchRequest) ProtoMessage ¶
func (*WatchRequest) ProtoMessage()
func (*WatchRequest) ProtoReflect ¶
func (x *WatchRequest) ProtoReflect() protoreflect.Message
func (*WatchRequest) Reset ¶
func (x *WatchRequest) Reset()
func (*WatchRequest) String ¶
func (x *WatchRequest) String() string
type WatchResponse ¶
type WatchResponse struct {
Note *Note `protobuf:"bytes,1,opt,name=note,proto3" json:"note,omitempty"`
// contains filtered or unexported fields
}
func (*WatchResponse) Descriptor
deprecated
func (*WatchResponse) Descriptor() ([]byte, []int)
Deprecated: Use WatchResponse.ProtoReflect.Descriptor instead.
func (*WatchResponse) GetNote ¶
func (x *WatchResponse) GetNote() *Note
func (*WatchResponse) ProtoMessage ¶
func (*WatchResponse) ProtoMessage()
func (*WatchResponse) ProtoReflect ¶
func (x *WatchResponse) ProtoReflect() protoreflect.Message
func (*WatchResponse) Reset ¶
func (x *WatchResponse) Reset()
func (*WatchResponse) String ¶
func (x *WatchResponse) String() string