Documentation ¶
Index ¶
- Constants
- Variables
- func FailedPrecondition(module, code, message string) *status.Status
- func LocalIP() string
- func LoggingInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- func NextString() (string, error)
- func NextUint64() (uint64, error)
- func PwdEncrypt(pwd string) (encryptPwd, salt string)
- func PwdEquals(pwd, encryptPwd, salt string) bool
- func RecoveryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (resp interface{}, err error)
- func RemoteIp(req *http.Request) string
- func UuidV4() string
- func ValidateInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- type App
- type Port
- type Server
Constants ¶
View Source
const ( XForwardedFor = "X-Forwarded-For" XRealIP = "X-Real-IP" )
Variables ¶
View Source
var (
Config config
)
Functions ¶
func FailedPrecondition ¶
func LoggingInterceptor ¶
func LoggingInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
func NextString ¶
func NextUint64 ¶
func PwdEncrypt ¶
func RecoveryInterceptor ¶
func RecoveryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)
func ValidateInterceptor ¶
func ValidateInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
Types ¶
Click to show internal directories.
Click to hide internal directories.