Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterQuoteServiceServer(s grpc.ServiceRegistrar, srv QuoteServiceServer)
- type CreateQuoteRequest
- func (*CreateQuoteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateQuoteRequest) GetQuote() *Quote
- func (*CreateQuoteRequest) ProtoMessage()
- func (x *CreateQuoteRequest) ProtoReflect() protoreflect.Message
- func (x *CreateQuoteRequest) Reset()
- func (x *CreateQuoteRequest) String() string
- type DeleteQuoteRequest
- type DeleteQuoteResponse
- func (*DeleteQuoteResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteQuoteResponse) GetSuccess() bool
- func (*DeleteQuoteResponse) ProtoMessage()
- func (x *DeleteQuoteResponse) ProtoReflect() protoreflect.Message
- func (x *DeleteQuoteResponse) Reset()
- func (x *DeleteQuoteResponse) String() string
- type DeleteQuotesByAuthorRequest
- func (*DeleteQuotesByAuthorRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteQuotesByAuthorRequest) GetAuthorId() string
- func (*DeleteQuotesByAuthorRequest) ProtoMessage()
- func (x *DeleteQuotesByAuthorRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteQuotesByAuthorRequest) Reset()
- func (x *DeleteQuotesByAuthorRequest) String() string
- type GetQuoteRequest
- type GetQuotesByAuthorRequest
- func (*GetQuotesByAuthorRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetQuotesByAuthorRequest) GetAuthorId() string
- func (*GetQuotesByAuthorRequest) ProtoMessage()
- func (x *GetQuotesByAuthorRequest) ProtoReflect() protoreflect.Message
- func (x *GetQuotesByAuthorRequest) Reset()
- func (x *GetQuotesByAuthorRequest) String() string
- type ListQuotesResponse
- func (*ListQuotesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListQuotesResponse) GetQuotes() []*Quote
- func (*ListQuotesResponse) ProtoMessage()
- func (x *ListQuotesResponse) ProtoReflect() protoreflect.Message
- func (x *ListQuotesResponse) Reset()
- func (x *ListQuotesResponse) String() string
- type Quote
- func (*Quote) Descriptor() ([]byte, []int)deprecated
- func (x *Quote) GetAuthorId() string
- func (x *Quote) GetId() string
- func (x *Quote) GetText() string
- func (x *Quote) GetTimestamp() int64
- func (*Quote) ProtoMessage()
- func (x *Quote) ProtoReflect() protoreflect.Message
- func (x *Quote) Reset()
- func (x *Quote) String() string
- type QuoteServiceClient
- type QuoteServiceServer
- type UnimplementedQuoteServiceServer
- func (UnimplementedQuoteServiceServer) CreateQuote(context.Context, *CreateQuoteRequest) (*Quote, error)
- func (UnimplementedQuoteServiceServer) DeleteAllQuotesByAuthor(context.Context, *DeleteQuotesByAuthorRequest) (*DeleteQuoteResponse, error)
- func (UnimplementedQuoteServiceServer) DeleteQuote(context.Context, *DeleteQuoteRequest) (*DeleteQuoteResponse, error)
- func (UnimplementedQuoteServiceServer) GetQuote(context.Context, *GetQuoteRequest) (*Quote, error)
- func (UnimplementedQuoteServiceServer) GetQuotesByAuthor(context.Context, *GetQuotesByAuthorRequest) (*ListQuotesResponse, error)
- func (UnimplementedQuoteServiceServer) ListQuotes(context.Context, *emptypb.Empty) (*ListQuotesResponse, error)
- func (UnimplementedQuoteServiceServer) UpdateQuote(context.Context, *UpdateQuoteRequest) (*Quote, error)
- type UnsafeQuoteServiceServer
- type UpdateQuoteRequest
- func (*UpdateQuoteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateQuoteRequest) GetQuote() *Quote
- func (*UpdateQuoteRequest) ProtoMessage()
- func (x *UpdateQuoteRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateQuoteRequest) Reset()
- func (x *UpdateQuoteRequest) String() string
Constants ¶
const ( QuoteService_GetQuote_FullMethodName = "/quoteservice.QuoteService/GetQuote" QuoteService_ListQuotes_FullMethodName = "/quoteservice.QuoteService/ListQuotes" QuoteService_CreateQuote_FullMethodName = "/quoteservice.QuoteService/CreateQuote" QuoteService_UpdateQuote_FullMethodName = "/quoteservice.QuoteService/UpdateQuote" QuoteService_DeleteQuote_FullMethodName = "/quoteservice.QuoteService/DeleteQuote" QuoteService_GetQuotesByAuthor_FullMethodName = "/quoteservice.QuoteService/GetQuotesByAuthor" QuoteService_DeleteAllQuotesByAuthor_FullMethodName = "/quoteservice.QuoteService/DeleteAllQuotesByAuthor" )
Variables ¶
var File_protos_quoteservice_quote_proto protoreflect.FileDescriptor
var QuoteService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "quoteservice.QuoteService", HandlerType: (*QuoteServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetQuote", Handler: _QuoteService_GetQuote_Handler, }, { MethodName: "ListQuotes", Handler: _QuoteService_ListQuotes_Handler, }, { MethodName: "CreateQuote", Handler: _QuoteService_CreateQuote_Handler, }, { MethodName: "UpdateQuote", Handler: _QuoteService_UpdateQuote_Handler, }, { MethodName: "DeleteQuote", Handler: _QuoteService_DeleteQuote_Handler, }, { MethodName: "GetQuotesByAuthor", Handler: _QuoteService_GetQuotesByAuthor_Handler, }, { MethodName: "DeleteAllQuotesByAuthor", Handler: _QuoteService_DeleteAllQuotesByAuthor_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "protos/quoteservice/quote.proto", }
QuoteService_ServiceDesc is the grpc.ServiceDesc for QuoteService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterQuoteServiceServer ¶
func RegisterQuoteServiceServer(s grpc.ServiceRegistrar, srv QuoteServiceServer)
Types ¶
type CreateQuoteRequest ¶
type CreateQuoteRequest struct { Quote *Quote `protobuf:"bytes,1,opt,name=quote,proto3" json:"quote,omitempty"` // contains filtered or unexported fields }
The CreateQuoteRequest message
func (*CreateQuoteRequest) Descriptor
deprecated
func (*CreateQuoteRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateQuoteRequest.ProtoReflect.Descriptor instead.
func (*CreateQuoteRequest) GetQuote ¶
func (x *CreateQuoteRequest) GetQuote() *Quote
func (*CreateQuoteRequest) ProtoMessage ¶
func (*CreateQuoteRequest) ProtoMessage()
func (*CreateQuoteRequest) ProtoReflect ¶
func (x *CreateQuoteRequest) ProtoReflect() protoreflect.Message
func (*CreateQuoteRequest) Reset ¶
func (x *CreateQuoteRequest) Reset()
func (*CreateQuoteRequest) String ¶
func (x *CreateQuoteRequest) String() string
type DeleteQuoteRequest ¶
type DeleteQuoteRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
The DeleteQuoteRequest message
func (*DeleteQuoteRequest) Descriptor
deprecated
func (*DeleteQuoteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteQuoteRequest.ProtoReflect.Descriptor instead.
func (*DeleteQuoteRequest) GetId ¶
func (x *DeleteQuoteRequest) GetId() string
func (*DeleteQuoteRequest) ProtoMessage ¶
func (*DeleteQuoteRequest) ProtoMessage()
func (*DeleteQuoteRequest) ProtoReflect ¶
func (x *DeleteQuoteRequest) ProtoReflect() protoreflect.Message
func (*DeleteQuoteRequest) Reset ¶
func (x *DeleteQuoteRequest) Reset()
func (*DeleteQuoteRequest) String ¶
func (x *DeleteQuoteRequest) String() string
type DeleteQuoteResponse ¶
type DeleteQuoteResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
The DeleteQuoteResponse message
func (*DeleteQuoteResponse) Descriptor
deprecated
func (*DeleteQuoteResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteQuoteResponse.ProtoReflect.Descriptor instead.
func (*DeleteQuoteResponse) GetSuccess ¶
func (x *DeleteQuoteResponse) GetSuccess() bool
func (*DeleteQuoteResponse) ProtoMessage ¶
func (*DeleteQuoteResponse) ProtoMessage()
func (*DeleteQuoteResponse) ProtoReflect ¶
func (x *DeleteQuoteResponse) ProtoReflect() protoreflect.Message
func (*DeleteQuoteResponse) Reset ¶
func (x *DeleteQuoteResponse) Reset()
func (*DeleteQuoteResponse) String ¶
func (x *DeleteQuoteResponse) String() string
type DeleteQuotesByAuthorRequest ¶
type DeleteQuotesByAuthorRequest struct { AuthorId string `protobuf:"bytes,1,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty"` // contains filtered or unexported fields }
func (*DeleteQuotesByAuthorRequest) Descriptor
deprecated
func (*DeleteQuotesByAuthorRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteQuotesByAuthorRequest.ProtoReflect.Descriptor instead.
func (*DeleteQuotesByAuthorRequest) GetAuthorId ¶
func (x *DeleteQuotesByAuthorRequest) GetAuthorId() string
func (*DeleteQuotesByAuthorRequest) ProtoMessage ¶
func (*DeleteQuotesByAuthorRequest) ProtoMessage()
func (*DeleteQuotesByAuthorRequest) ProtoReflect ¶
func (x *DeleteQuotesByAuthorRequest) ProtoReflect() protoreflect.Message
func (*DeleteQuotesByAuthorRequest) Reset ¶
func (x *DeleteQuotesByAuthorRequest) Reset()
func (*DeleteQuotesByAuthorRequest) String ¶
func (x *DeleteQuotesByAuthorRequest) String() string
type GetQuoteRequest ¶
type GetQuoteRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
The GetQuoteRequest message
func (*GetQuoteRequest) Descriptor
deprecated
func (*GetQuoteRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetQuoteRequest.ProtoReflect.Descriptor instead.
func (*GetQuoteRequest) GetId ¶
func (x *GetQuoteRequest) GetId() string
func (*GetQuoteRequest) ProtoMessage ¶
func (*GetQuoteRequest) ProtoMessage()
func (*GetQuoteRequest) ProtoReflect ¶
func (x *GetQuoteRequest) ProtoReflect() protoreflect.Message
func (*GetQuoteRequest) Reset ¶
func (x *GetQuoteRequest) Reset()
func (*GetQuoteRequest) String ¶
func (x *GetQuoteRequest) String() string
type GetQuotesByAuthorRequest ¶
type GetQuotesByAuthorRequest struct { AuthorId string `protobuf:"bytes,1,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty"` // contains filtered or unexported fields }
The GetQuoteByAuthorRequest message
func (*GetQuotesByAuthorRequest) Descriptor
deprecated
func (*GetQuotesByAuthorRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetQuotesByAuthorRequest.ProtoReflect.Descriptor instead.
func (*GetQuotesByAuthorRequest) GetAuthorId ¶
func (x *GetQuotesByAuthorRequest) GetAuthorId() string
func (*GetQuotesByAuthorRequest) ProtoMessage ¶
func (*GetQuotesByAuthorRequest) ProtoMessage()
func (*GetQuotesByAuthorRequest) ProtoReflect ¶
func (x *GetQuotesByAuthorRequest) ProtoReflect() protoreflect.Message
func (*GetQuotesByAuthorRequest) Reset ¶
func (x *GetQuotesByAuthorRequest) Reset()
func (*GetQuotesByAuthorRequest) String ¶
func (x *GetQuotesByAuthorRequest) String() string
type ListQuotesResponse ¶
type ListQuotesResponse struct { Quotes []*Quote `protobuf:"bytes,1,rep,name=quotes,proto3" json:"quotes,omitempty"` // contains filtered or unexported fields }
The ListQuotesResponse message
func (*ListQuotesResponse) Descriptor
deprecated
func (*ListQuotesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListQuotesResponse.ProtoReflect.Descriptor instead.
func (*ListQuotesResponse) GetQuotes ¶
func (x *ListQuotesResponse) GetQuotes() []*Quote
func (*ListQuotesResponse) ProtoMessage ¶
func (*ListQuotesResponse) ProtoMessage()
func (*ListQuotesResponse) ProtoReflect ¶
func (x *ListQuotesResponse) ProtoReflect() protoreflect.Message
func (*ListQuotesResponse) Reset ¶
func (x *ListQuotesResponse) Reset()
func (*ListQuotesResponse) String ¶
func (x *ListQuotesResponse) String() string
type Quote ¶
type Quote struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` AuthorId string `protobuf:"bytes,2,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty"` Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"` Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
The Quote message
func (*Quote) Descriptor
deprecated
func (*Quote) GetAuthorId ¶
func (*Quote) GetTimestamp ¶
func (*Quote) ProtoMessage ¶
func (*Quote) ProtoMessage()
func (*Quote) ProtoReflect ¶
func (x *Quote) ProtoReflect() protoreflect.Message
type QuoteServiceClient ¶
type QuoteServiceClient interface { // GetQuote returns a quote by id GetQuote(ctx context.Context, in *GetQuoteRequest, opts ...grpc.CallOption) (*Quote, error) // ListQuotes returns a list of quotes ListQuotes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListQuotesResponse, error) // CreateQuote creates a new quote CreateQuote(ctx context.Context, in *CreateQuoteRequest, opts ...grpc.CallOption) (*Quote, error) // UpdateQuote updates a quote UpdateQuote(ctx context.Context, in *UpdateQuoteRequest, opts ...grpc.CallOption) (*Quote, error) // DeleteQuote deletes a quote DeleteQuote(ctx context.Context, in *DeleteQuoteRequest, opts ...grpc.CallOption) (*DeleteQuoteResponse, error) // GetQuoteByAuthor returns a list of quotes by author id GetQuotesByAuthor(ctx context.Context, in *GetQuotesByAuthorRequest, opts ...grpc.CallOption) (*ListQuotesResponse, error) // DeleteAllQuotesByAuthor deletes all quotes by author id DeleteAllQuotesByAuthor(ctx context.Context, in *DeleteQuotesByAuthorRequest, opts ...grpc.CallOption) (*DeleteQuoteResponse, error) }
QuoteServiceClient is the client API for QuoteService 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.
func NewQuoteServiceClient ¶
func NewQuoteServiceClient(cc grpc.ClientConnInterface) QuoteServiceClient
type QuoteServiceServer ¶
type QuoteServiceServer interface { // GetQuote returns a quote by id GetQuote(context.Context, *GetQuoteRequest) (*Quote, error) // ListQuotes returns a list of quotes ListQuotes(context.Context, *emptypb.Empty) (*ListQuotesResponse, error) // CreateQuote creates a new quote CreateQuote(context.Context, *CreateQuoteRequest) (*Quote, error) // UpdateQuote updates a quote UpdateQuote(context.Context, *UpdateQuoteRequest) (*Quote, error) // DeleteQuote deletes a quote DeleteQuote(context.Context, *DeleteQuoteRequest) (*DeleteQuoteResponse, error) // GetQuoteByAuthor returns a list of quotes by author id GetQuotesByAuthor(context.Context, *GetQuotesByAuthorRequest) (*ListQuotesResponse, error) // DeleteAllQuotesByAuthor deletes all quotes by author id DeleteAllQuotesByAuthor(context.Context, *DeleteQuotesByAuthorRequest) (*DeleteQuoteResponse, error) // contains filtered or unexported methods }
QuoteServiceServer is the server API for QuoteService service. All implementations must embed UnimplementedQuoteServiceServer for forward compatibility
type UnimplementedQuoteServiceServer ¶
type UnimplementedQuoteServiceServer struct { }
UnimplementedQuoteServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedQuoteServiceServer) CreateQuote ¶
func (UnimplementedQuoteServiceServer) CreateQuote(context.Context, *CreateQuoteRequest) (*Quote, error)
func (UnimplementedQuoteServiceServer) DeleteAllQuotesByAuthor ¶
func (UnimplementedQuoteServiceServer) DeleteAllQuotesByAuthor(context.Context, *DeleteQuotesByAuthorRequest) (*DeleteQuoteResponse, error)
func (UnimplementedQuoteServiceServer) DeleteQuote ¶
func (UnimplementedQuoteServiceServer) DeleteQuote(context.Context, *DeleteQuoteRequest) (*DeleteQuoteResponse, error)
func (UnimplementedQuoteServiceServer) GetQuote ¶
func (UnimplementedQuoteServiceServer) GetQuote(context.Context, *GetQuoteRequest) (*Quote, error)
func (UnimplementedQuoteServiceServer) GetQuotesByAuthor ¶
func (UnimplementedQuoteServiceServer) GetQuotesByAuthor(context.Context, *GetQuotesByAuthorRequest) (*ListQuotesResponse, error)
func (UnimplementedQuoteServiceServer) ListQuotes ¶
func (UnimplementedQuoteServiceServer) ListQuotes(context.Context, *emptypb.Empty) (*ListQuotesResponse, error)
func (UnimplementedQuoteServiceServer) UpdateQuote ¶
func (UnimplementedQuoteServiceServer) UpdateQuote(context.Context, *UpdateQuoteRequest) (*Quote, error)
type UnsafeQuoteServiceServer ¶
type UnsafeQuoteServiceServer interface {
// contains filtered or unexported methods
}
UnsafeQuoteServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to QuoteServiceServer will result in compilation errors.
type UpdateQuoteRequest ¶
type UpdateQuoteRequest struct { Quote *Quote `protobuf:"bytes,1,opt,name=quote,proto3" json:"quote,omitempty"` // contains filtered or unexported fields }
The UpdateQuoteRequest message
func (*UpdateQuoteRequest) Descriptor
deprecated
func (*UpdateQuoteRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateQuoteRequest.ProtoReflect.Descriptor instead.
func (*UpdateQuoteRequest) GetQuote ¶
func (x *UpdateQuoteRequest) GetQuote() *Quote
func (*UpdateQuoteRequest) ProtoMessage ¶
func (*UpdateQuoteRequest) ProtoMessage()
func (*UpdateQuoteRequest) ProtoReflect ¶
func (x *UpdateQuoteRequest) ProtoReflect() protoreflect.Message
func (*UpdateQuoteRequest) Reset ¶
func (x *UpdateQuoteRequest) Reset()
func (*UpdateQuoteRequest) String ¶
func (x *UpdateQuoteRequest) String() string