server

package
v0.0.0-...-75939a1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// MarshalOptions is a configurable JSON format marshaler.
	MarshalOptions = protojson.MarshalOptions{
		EmitUnpopulated: true,
		UseProtoNames:   true,
	}
	// UnmarshalOptions is a configurable JSON format parser.
	UnmarshalOptions = protojson.UnmarshalOptions{
		DiscardUnknown: true,
	}
)

ProviderSet is server providers.

Functions

func NewCronServer

func NewCronServer(c *conf.Data, service *service.CronService) *cron.CronManager

定时任务

func NewGRPCServer

func NewGRPCServer(c *conf.Server, logger log.Logger,
	authUc *biz.AuthUseCase,
	authV1 userV1.AuthServiceServer,
	user userV1.UserServiceServer,
	volume *storage.VolumeService,
) *grpc.Server

NewGRPCServer new a gRPC server.

func NewHTTPServer

func NewHTTPServer(c *conf.Server, logger log.Logger,
	authUc *biz.AuthUseCase,
	authV1 userV1.AuthServiceServer,
	user userV1.UserServiceServer,
	volume *storage.VolumeService,
) *http.Server

NewGRPCServer new a gRPC server.

Types

type Success

type Success struct {
	Code    uint32      `json:"code"`
	Data    interface{} `json:"data"`
	Message string      `json:"message"`
}

Jump to

Keyboard shortcuts

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