Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterArticleServiceServer(s grpc.ServiceRegistrar, srv ArticleServiceServer)
- type Article
- func (*Article) Descriptor() ([]byte, []int)deprecated
- func (x *Article) GetBody() string
- func (x *Article) GetCreatedAt() *timestamppb.Timestamp
- func (x *Article) GetId() string
- func (x *Article) GetTitle() string
- func (x *Article) GetUpdatedAt() *timestamppb.Timestamp
- func (x *Article) GetUserId() string
- func (*Article) ProtoMessage()
- func (x *Article) ProtoReflect() protoreflect.Message
- func (x *Article) Reset()
- func (x *Article) String() string
- type ArticleServiceClient
- type ArticleServiceServer
- type ArticleService_GetStreamClient
- type ArticleService_GetStreamServer
- type CreateArticleRequest
- func (*CreateArticleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateArticleRequest) GetArticle() *Article
- func (*CreateArticleRequest) ProtoMessage()
- func (x *CreateArticleRequest) ProtoReflect() protoreflect.Message
- func (x *CreateArticleRequest) Reset()
- func (x *CreateArticleRequest) String() string
- type CreateArticleResponse
- func (*CreateArticleResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateArticleResponse) GetId() string
- func (*CreateArticleResponse) ProtoMessage()
- func (x *CreateArticleResponse) ProtoReflect() protoreflect.Message
- func (x *CreateArticleResponse) Reset()
- func (x *CreateArticleResponse) String() string
- type DeleteArticleRequest
- func (*DeleteArticleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteArticleRequest) GetId() string
- func (*DeleteArticleRequest) ProtoMessage()
- func (x *DeleteArticleRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteArticleRequest) Reset()
- func (x *DeleteArticleRequest) String() string
- type GetArticleRequest
- type GetArticleResponse
- func (*GetArticleResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetArticleResponse) GetArticle() *Article
- func (*GetArticleResponse) ProtoMessage()
- func (x *GetArticleResponse) ProtoReflect() protoreflect.Message
- func (x *GetArticleResponse) Reset()
- func (x *GetArticleResponse) String() string
- type GetArticlesRequest
- func (*GetArticlesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetArticlesRequest) GetLimit() string
- func (x *GetArticlesRequest) GetOffset() string
- func (*GetArticlesRequest) ProtoMessage()
- func (x *GetArticlesRequest) ProtoReflect() protoreflect.Message
- func (x *GetArticlesRequest) Reset()
- func (x *GetArticlesRequest) String() string
- type UnimplementedArticleServiceServer
- func (UnimplementedArticleServiceServer) Create(context.Context, *CreateArticleRequest) (*CreateArticleResponse, error)
- func (UnimplementedArticleServiceServer) Delete(context.Context, *DeleteArticleRequest) (*emptypb.Empty, error)
- func (UnimplementedArticleServiceServer) Get(context.Context, *GetArticleRequest) (*GetArticleResponse, error)
- func (UnimplementedArticleServiceServer) GetStream(*GetArticlesRequest, ArticleService_GetStreamServer) error
- func (UnimplementedArticleServiceServer) Update(context.Context, *UpdateArticleRequest) (*emptypb.Empty, error)
- type UnsafeArticleServiceServer
- type UpdateArticleRequest
- func (*UpdateArticleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateArticleRequest) GetArticle() *Article
- func (*UpdateArticleRequest) ProtoMessage()
- func (x *UpdateArticleRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateArticleRequest) Reset()
- func (x *UpdateArticleRequest) String() string
Constants ¶
const ( ArticleService_Create_FullMethodName = "/article.ArticleService/Create" ArticleService_Update_FullMethodName = "/article.ArticleService/Update" ArticleService_Delete_FullMethodName = "/article.ArticleService/Delete" ArticleService_Get_FullMethodName = "/article.ArticleService/Get" ArticleService_GetStream_FullMethodName = "/article.ArticleService/GetStream" )
Variables ¶
var ArticleService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "article.ArticleService", HandlerType: (*ArticleServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _ArticleService_Create_Handler, }, { MethodName: "Update", Handler: _ArticleService_Update_Handler, }, { MethodName: "Delete", Handler: _ArticleService_Delete_Handler, }, { MethodName: "Get", Handler: _ArticleService_Get_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "GetStream", Handler: _ArticleService_GetStream_Handler, ServerStreams: true, }, }, Metadata: "article_service.proto", }
ArticleService_ServiceDesc is the grpc.ServiceDesc for ArticleService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_article_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterArticleServiceServer ¶
func RegisterArticleServiceServer(s grpc.ServiceRegistrar, srv ArticleServiceServer)
Types ¶
type Article ¶
type Article struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"` Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*Article) Descriptor
deprecated
func (*Article) GetCreatedAt ¶
func (x *Article) GetCreatedAt() *timestamppb.Timestamp
func (*Article) GetUpdatedAt ¶
func (x *Article) GetUpdatedAt() *timestamppb.Timestamp
func (*Article) ProtoMessage ¶
func (*Article) ProtoMessage()
func (*Article) ProtoReflect ¶
func (x *Article) ProtoReflect() protoreflect.Message
type ArticleServiceClient ¶
type ArticleServiceClient interface { Create(ctx context.Context, in *CreateArticleRequest, opts ...grpc.CallOption) (*CreateArticleResponse, error) Update(ctx context.Context, in *UpdateArticleRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) Delete(ctx context.Context, in *DeleteArticleRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) Get(ctx context.Context, in *GetArticleRequest, opts ...grpc.CallOption) (*GetArticleResponse, error) GetStream(ctx context.Context, in *GetArticlesRequest, opts ...grpc.CallOption) (ArticleService_GetStreamClient, error) }
ArticleServiceClient is the client API for ArticleService 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 NewArticleServiceClient ¶
func NewArticleServiceClient(cc grpc.ClientConnInterface) ArticleServiceClient
type ArticleServiceServer ¶
type ArticleServiceServer interface { Create(context.Context, *CreateArticleRequest) (*CreateArticleResponse, error) Update(context.Context, *UpdateArticleRequest) (*emptypb.Empty, error) Delete(context.Context, *DeleteArticleRequest) (*emptypb.Empty, error) Get(context.Context, *GetArticleRequest) (*GetArticleResponse, error) GetStream(*GetArticlesRequest, ArticleService_GetStreamServer) error // contains filtered or unexported methods }
ArticleServiceServer is the server API for ArticleService service. All implementations must embed UnimplementedArticleServiceServer for forward compatibility
type ArticleService_GetStreamClient ¶
type ArticleService_GetStreamClient interface { Recv() (*Article, error) grpc.ClientStream }
type ArticleService_GetStreamServer ¶
type ArticleService_GetStreamServer interface { Send(*Article) error grpc.ServerStream }
type CreateArticleRequest ¶
type CreateArticleRequest struct { Article *Article `protobuf:"bytes,1,opt,name=article,proto3" json:"article,omitempty"` // contains filtered or unexported fields }
func (*CreateArticleRequest) Descriptor
deprecated
func (*CreateArticleRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateArticleRequest.ProtoReflect.Descriptor instead.
func (*CreateArticleRequest) GetArticle ¶
func (x *CreateArticleRequest) GetArticle() *Article
func (*CreateArticleRequest) ProtoMessage ¶
func (*CreateArticleRequest) ProtoMessage()
func (*CreateArticleRequest) ProtoReflect ¶
func (x *CreateArticleRequest) ProtoReflect() protoreflect.Message
func (*CreateArticleRequest) Reset ¶
func (x *CreateArticleRequest) Reset()
func (*CreateArticleRequest) String ¶
func (x *CreateArticleRequest) String() string
type CreateArticleResponse ¶
type CreateArticleResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*CreateArticleResponse) Descriptor
deprecated
func (*CreateArticleResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateArticleResponse.ProtoReflect.Descriptor instead.
func (*CreateArticleResponse) GetId ¶
func (x *CreateArticleResponse) GetId() string
func (*CreateArticleResponse) ProtoMessage ¶
func (*CreateArticleResponse) ProtoMessage()
func (*CreateArticleResponse) ProtoReflect ¶
func (x *CreateArticleResponse) ProtoReflect() protoreflect.Message
func (*CreateArticleResponse) Reset ¶
func (x *CreateArticleResponse) Reset()
func (*CreateArticleResponse) String ¶
func (x *CreateArticleResponse) String() string
type DeleteArticleRequest ¶
type DeleteArticleRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DeleteArticleRequest) Descriptor
deprecated
func (*DeleteArticleRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteArticleRequest.ProtoReflect.Descriptor instead.
func (*DeleteArticleRequest) GetId ¶
func (x *DeleteArticleRequest) GetId() string
func (*DeleteArticleRequest) ProtoMessage ¶
func (*DeleteArticleRequest) ProtoMessage()
func (*DeleteArticleRequest) ProtoReflect ¶
func (x *DeleteArticleRequest) ProtoReflect() protoreflect.Message
func (*DeleteArticleRequest) Reset ¶
func (x *DeleteArticleRequest) Reset()
func (*DeleteArticleRequest) String ¶
func (x *DeleteArticleRequest) String() string
type GetArticleRequest ¶
type GetArticleRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetArticleRequest) Descriptor
deprecated
func (*GetArticleRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetArticleRequest.ProtoReflect.Descriptor instead.
func (*GetArticleRequest) GetId ¶
func (x *GetArticleRequest) GetId() string
func (*GetArticleRequest) ProtoMessage ¶
func (*GetArticleRequest) ProtoMessage()
func (*GetArticleRequest) ProtoReflect ¶
func (x *GetArticleRequest) ProtoReflect() protoreflect.Message
func (*GetArticleRequest) Reset ¶
func (x *GetArticleRequest) Reset()
func (*GetArticleRequest) String ¶
func (x *GetArticleRequest) String() string
type GetArticleResponse ¶
type GetArticleResponse struct { Article *Article `protobuf:"bytes,1,opt,name=article,proto3" json:"article,omitempty"` // contains filtered or unexported fields }
func (*GetArticleResponse) Descriptor
deprecated
func (*GetArticleResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetArticleResponse.ProtoReflect.Descriptor instead.
func (*GetArticleResponse) GetArticle ¶
func (x *GetArticleResponse) GetArticle() *Article
func (*GetArticleResponse) ProtoMessage ¶
func (*GetArticleResponse) ProtoMessage()
func (*GetArticleResponse) ProtoReflect ¶
func (x *GetArticleResponse) ProtoReflect() protoreflect.Message
func (*GetArticleResponse) Reset ¶
func (x *GetArticleResponse) Reset()
func (*GetArticleResponse) String ¶
func (x *GetArticleResponse) String() string
type GetArticlesRequest ¶
type GetArticlesRequest struct { Offset string `protobuf:"bytes,1,opt,name=offset,proto3" json:"offset,omitempty"` Limit string `protobuf:"bytes,2,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
func (*GetArticlesRequest) Descriptor
deprecated
func (*GetArticlesRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetArticlesRequest.ProtoReflect.Descriptor instead.
func (*GetArticlesRequest) GetLimit ¶
func (x *GetArticlesRequest) GetLimit() string
func (*GetArticlesRequest) GetOffset ¶
func (x *GetArticlesRequest) GetOffset() string
func (*GetArticlesRequest) ProtoMessage ¶
func (*GetArticlesRequest) ProtoMessage()
func (*GetArticlesRequest) ProtoReflect ¶
func (x *GetArticlesRequest) ProtoReflect() protoreflect.Message
func (*GetArticlesRequest) Reset ¶
func (x *GetArticlesRequest) Reset()
func (*GetArticlesRequest) String ¶
func (x *GetArticlesRequest) String() string
type UnimplementedArticleServiceServer ¶
type UnimplementedArticleServiceServer struct { }
UnimplementedArticleServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedArticleServiceServer) Create ¶
func (UnimplementedArticleServiceServer) Create(context.Context, *CreateArticleRequest) (*CreateArticleResponse, error)
func (UnimplementedArticleServiceServer) Delete ¶
func (UnimplementedArticleServiceServer) Delete(context.Context, *DeleteArticleRequest) (*emptypb.Empty, error)
func (UnimplementedArticleServiceServer) Get ¶
func (UnimplementedArticleServiceServer) Get(context.Context, *GetArticleRequest) (*GetArticleResponse, error)
func (UnimplementedArticleServiceServer) GetStream ¶
func (UnimplementedArticleServiceServer) GetStream(*GetArticlesRequest, ArticleService_GetStreamServer) error
func (UnimplementedArticleServiceServer) Update ¶
func (UnimplementedArticleServiceServer) Update(context.Context, *UpdateArticleRequest) (*emptypb.Empty, error)
type UnsafeArticleServiceServer ¶
type UnsafeArticleServiceServer interface {
// contains filtered or unexported methods
}
UnsafeArticleServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ArticleServiceServer will result in compilation errors.
type UpdateArticleRequest ¶
type UpdateArticleRequest struct { Article *Article `protobuf:"bytes,1,opt,name=article,proto3" json:"article,omitempty"` // contains filtered or unexported fields }
func (*UpdateArticleRequest) Descriptor
deprecated
func (*UpdateArticleRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateArticleRequest.ProtoReflect.Descriptor instead.
func (*UpdateArticleRequest) GetArticle ¶
func (x *UpdateArticleRequest) GetArticle() *Article
func (*UpdateArticleRequest) ProtoMessage ¶
func (*UpdateArticleRequest) ProtoMessage()
func (*UpdateArticleRequest) ProtoReflect ¶
func (x *UpdateArticleRequest) ProtoReflect() protoreflect.Message
func (*UpdateArticleRequest) Reset ¶
func (x *UpdateArticleRequest) Reset()
func (*UpdateArticleRequest) String ¶
func (x *UpdateArticleRequest) String() string