Documentation ¶
Index ¶
- Variables
- func RegisterArticleServiceServer(s grpc.ServiceRegistrar, srv ArticleServiceServer)
- type Article
- func (*Article) Descriptor() ([]byte, []int)deprecated
- func (x *Article) GetCreatedAt() *timestamp.Timestamp
- func (x *Article) GetId() uint64
- func (x *Article) GetTitle() string
- func (x *Article) GetUpdatedAt() *timestamp.Timestamp
- func (*Article) ProtoMessage()
- func (x *Article) ProtoReflect() protoreflect.Message
- func (x *Article) Reset()
- func (x *Article) String() string
- type ArticleServiceClient
- type ArticleServiceServer
- type CreateArticleRequest
- func (*CreateArticleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateArticleRequest) GetTitle() string
- 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) GetArticle() *Article
- func (*CreateArticleResponse) ProtoMessage()
- func (x *CreateArticleResponse) ProtoReflect() protoreflect.Message
- func (x *CreateArticleResponse) Reset()
- func (x *CreateArticleResponse) 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 ListArticlesRequest
- type ListArticlesResponse
- func (*ListArticlesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListArticlesResponse) GetArticles() []*Article
- func (*ListArticlesResponse) ProtoMessage()
- func (x *ListArticlesResponse) ProtoReflect() protoreflect.Message
- func (x *ListArticlesResponse) Reset()
- func (x *ListArticlesResponse) String() string
- type UnimplementedArticleServiceServer
- func (UnimplementedArticleServiceServer) CreateArticle(context.Context, *CreateArticleRequest) (*CreateArticleResponse, error)
- func (UnimplementedArticleServiceServer) GetArticle(context.Context, *GetArticleRequest) (*GetArticleResponse, error)
- func (UnimplementedArticleServiceServer) ListArticles(context.Context, *ListArticlesRequest) (*ListArticlesResponse, error)
- type UnsafeArticleServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_proto_article_proto protoreflect.FileDescriptor
Functions ¶
func RegisterArticleServiceServer ¶
func RegisterArticleServiceServer(s grpc.ServiceRegistrar, srv ArticleServiceServer)
Types ¶
type Article ¶
type Article struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` CreatedAt *timestamp.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamp.Timestamp `protobuf:"bytes,4,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*Article) Descriptor
deprecated
func (*Article) GetCreatedAt ¶
func (*Article) GetUpdatedAt ¶
func (*Article) ProtoMessage ¶
func (*Article) ProtoMessage()
func (*Article) ProtoReflect ¶
func (x *Article) ProtoReflect() protoreflect.Message
type ArticleServiceClient ¶
type ArticleServiceClient interface { GetArticle(ctx context.Context, in *GetArticleRequest, opts ...grpc.CallOption) (*GetArticleResponse, error) ListArticles(ctx context.Context, in *ListArticlesRequest, opts ...grpc.CallOption) (*ListArticlesResponse, error) CreateArticle(ctx context.Context, in *CreateArticleRequest, opts ...grpc.CallOption) (*CreateArticleResponse, error) }
ArticleServiceClient is the client API for ArticleService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.golang.ir/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewArticleServiceClient ¶
func NewArticleServiceClient(cc grpc.ClientConnInterface) ArticleServiceClient
type ArticleServiceServer ¶
type ArticleServiceServer interface { GetArticle(context.Context, *GetArticleRequest) (*GetArticleResponse, error) ListArticles(context.Context, *ListArticlesRequest) (*ListArticlesResponse, error) CreateArticle(context.Context, *CreateArticleRequest) (*CreateArticleResponse, error) // contains filtered or unexported methods }
ArticleServiceServer is the server API for ArticleService service. All implementations must embed UnimplementedArticleServiceServer for forward compatibility
type CreateArticleRequest ¶
type CreateArticleRequest struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` // contains filtered or unexported fields }
func (*CreateArticleRequest) Descriptor
deprecated
func (*CreateArticleRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateArticleRequest.ProtoReflect.Descriptor instead.
func (*CreateArticleRequest) GetTitle ¶
func (x *CreateArticleRequest) GetTitle() string
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 { Article *Article `protobuf:"bytes,1,opt,name=article,proto3" json:"article,omitempty"` // contains filtered or unexported fields }
func (*CreateArticleResponse) Descriptor
deprecated
func (*CreateArticleResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateArticleResponse.ProtoReflect.Descriptor instead.
func (*CreateArticleResponse) GetArticle ¶
func (x *CreateArticleResponse) GetArticle() *Article
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 GetArticleRequest ¶
type GetArticleRequest struct { Id uint64 `protobuf:"varint,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() uint64
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 ListArticlesRequest ¶
type ListArticlesRequest struct {
// contains filtered or unexported fields
}
func (*ListArticlesRequest) Descriptor
deprecated
func (*ListArticlesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListArticlesRequest.ProtoReflect.Descriptor instead.
func (*ListArticlesRequest) ProtoMessage ¶
func (*ListArticlesRequest) ProtoMessage()
func (*ListArticlesRequest) ProtoReflect ¶
func (x *ListArticlesRequest) ProtoReflect() protoreflect.Message
func (*ListArticlesRequest) Reset ¶
func (x *ListArticlesRequest) Reset()
func (*ListArticlesRequest) String ¶
func (x *ListArticlesRequest) String() string
type ListArticlesResponse ¶
type ListArticlesResponse struct { Articles []*Article `protobuf:"bytes,1,rep,name=articles,proto3" json:"articles,omitempty"` // contains filtered or unexported fields }
func (*ListArticlesResponse) Descriptor
deprecated
func (*ListArticlesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListArticlesResponse.ProtoReflect.Descriptor instead.
func (*ListArticlesResponse) GetArticles ¶
func (x *ListArticlesResponse) GetArticles() []*Article
func (*ListArticlesResponse) ProtoMessage ¶
func (*ListArticlesResponse) ProtoMessage()
func (*ListArticlesResponse) ProtoReflect ¶
func (x *ListArticlesResponse) ProtoReflect() protoreflect.Message
func (*ListArticlesResponse) Reset ¶
func (x *ListArticlesResponse) Reset()
func (*ListArticlesResponse) String ¶
func (x *ListArticlesResponse) String() string
type UnimplementedArticleServiceServer ¶
type UnimplementedArticleServiceServer struct { }
UnimplementedArticleServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedArticleServiceServer) CreateArticle ¶
func (UnimplementedArticleServiceServer) CreateArticle(context.Context, *CreateArticleRequest) (*CreateArticleResponse, error)
func (UnimplementedArticleServiceServer) GetArticle ¶
func (UnimplementedArticleServiceServer) GetArticle(context.Context, *GetArticleRequest) (*GetArticleResponse, error)
func (UnimplementedArticleServiceServer) ListArticles ¶
func (UnimplementedArticleServiceServer) ListArticles(context.Context, *ListArticlesRequest) (*ListArticlesResponse, 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.