utils

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2019 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateGRPCClient

func CreateGRPCClient(name string, log *zap.Logger) *grpc.ClientConn

CreateGRPCClient is used to create a GRPC Service's client

func CreateGRPCServer

func CreateGRPCServer(name string, log *zap.Logger) (*grpc.Server, *net.Listener)

CreateGRPCServer is used to create a GRPC server for microservice

func CreateMongoDB

func CreateMongoDB(address string, log *zap.Logger) *mongo.Client

CreateMongoDB creates a mongoDB client

func HandlePanic

func HandlePanic(log *zap.Logger)

HandlePanic is used to handle panic when it occurs in a microservice

func UnmarshalMap

func UnmarshalMap(data map[string]interface{}, toValue interface{})

UnmarshalMap is used to convert map[string]interface{} to a struct

Types

This section is empty.

Jump to

Keyboard shortcuts

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