service

package
v0.0.0-...-379bff8 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ArgsParseFailed 参数解析失败 10001
	ArgsParseFailed = 10001 + iota
	// LoginRequired 用户未登录 10002
	LoginRequired
	// MethodNotFound 方法未找到 10003
	MethodNotFound
	// NoAvailableService 服务不存在10004
	NoAvailableService
	// RemoteCallFailed rpc调用失败 10005
	RemoteCallFailed
	// IntervalServerError 服务出错 10006
	IntervalServerError
)

Variables

View Source
var (
	InnerError              = errors.New("系统内部错误")
	SystemError             = errors.New("抱歉, 网络似乎开小差了")
	NoAvailableServiceError = errors.New("服务未响应,请检查请求地址是否正确")
	Marshaler               = jsonpb.Marshaler{
		EmitDefaults: false,
	}
)

Functions

func Invoke

func Invoke(ctx *gin.Context)

Types

type GrpcCache

type GrpcCache struct {
	// contains filtered or unexported fields
}

func (*GrpcCache) SetClient

func (g *GrpcCache) SetClient(service string, client *rpc.GrpcClient)

type Response

type Response interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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