date

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2024 License: MIT Imports: 16 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL