Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct { // 是否将HTTP注册为gRPC中转,支持gRPC stream PreferRegisterHTTPFromEndpoint bool // Embed the unimplemented server v1.UnimplementedDateServiceServer }
func NewController ¶
func NewController() *Controller
func (*Controller) Error ¶
func (c *Controller) Error(_ context.Context, req *v1.DateRequest) (resp *v1.DateResponse, err error)
Error 日期查询,只返回错误,测试使用
func (*Controller) Now ¶
func (c *Controller) Now(ctx context.Context, req *v1.DateRequest) (resp *v1.DateResponse, err error)
Now 日期查询
func (*Controller) SetRoutes ¶
func (c *Controller) SetRoutes(ginRouter gin.IRouter, grpcRouter *grpcgateway.Gateway)
SetRoutes registers this handler's routes.
type HttpController ¶
type HttpController struct { *Controller // contains filtered or unexported fields }
func (*HttpController) Error ¶
func (c *HttpController) Error(ctx context.Context, req *v1.DateRequest) (resp *v1.DateResponse, err error)
Error Date Query, only return error, for test only
func (*HttpController) Now ¶
func (c *HttpController) Now(ctx context.Context, req *v1.DateRequest) (resp *v1.DateResponse, err error)
Now Date Query
Click to show internal directories.
Click to hide internal directories.