Documentation ¶
Index ¶
- func CreateService(name string) micro.Service
- func GatewayRespond(w http.ResponseWriter, data map[string]string, msg string, err error, ...)
- func GetMockUserData() (config.UserMain, config.UserExtra)
- func HandlePanic(log *zap.Logger)
- func UnmarshalMap(data map[string]interface{}, toValue interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateService ¶
CreateService is used to create a service defination
func GatewayRespond ¶
func GatewayRespond( w http.ResponseWriter, data map[string]string, msg string, err error, log *zap.Logger)
GatewayRespond is used to respond to client with json data
func GetMockUserData ¶
GetMockUserData returns mock user data for testing
func HandlePanic ¶
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.
Click to show internal directories.
Click to hide internal directories.