simple.go 682 字节
Newer Older
E
eoLinker API Management 已提交
1 2 3 4 5
package balance

import (
	"net/http"

黄孟柱 已提交
6 7
	"github.com/eolinker/goku-api-gateway/console/controller"
	"github.com/eolinker/goku-api-gateway/console/module/balance"
E
eoLinker API Management 已提交
8 9
)

Y
Your Name 已提交
10
//GetSimpleList 获取简易列表
E
eoLinker API Management 已提交
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
func GetSimpleList(httpResponse http.ResponseWriter, httpRequest *http.Request) {
	_, e := controller.CheckLogin(httpResponse, httpRequest, controller.OperationLoadBalance, controller.OperationREAD)
	if e != nil {
		return
	}

	flag, result, err := balance.GetBalancNames()

	if !flag {
		controller.WriteError(httpResponse, "260000,", "balance", "[ERROR]Empty balance list!", err)
		return
	}
	controller.WriteResultInfo(httpResponse, "balance", "balanceNames", result)

	return

}