package models type UnisHttpRequest struct { ResC chan *UnisHttpResponse Id string Msg interface{} } type UnisHttpResponse struct { Code int Msg interface{} Data interface{} } type UnisHttpUrl string const ( UNIS_HTTP_URL_CONFIG_ADD UnisHttpUrl = "/api/unis/config/v1/add" ) func (u UnisHttpUrl) GetMsgId() string { return mapHttpUrlId[u] } type UnisHttpMsgId string const ( UNIS_HTTP_ID_CONFIG_ADD UnisHttpMsgId = "/api/unis/config/v1/add" ) var mapHttpUrlId = map[UnisHttpUrl]string{ UNIS_HTTP_URL_CONFIG_ADD: string(UNIS_HTTP_ID_CONFIG_ADD), } var UnisHttpResponseOk = &UnisHttpResponse{Code: int(CodeSuccess), Msg: CodeSuccess.String()}