27 lines
342 B
Go
27 lines
342 B
Go
package utils
|
|
|
|
import (
|
|
"github.com/spf13/viper"
|
|
)
|
|
|
|
// 获取ticket
|
|
func GetJxApiTicket() (result string) {
|
|
|
|
ticket := viper.GetString("tuilan_ticket")
|
|
result = ticket
|
|
return
|
|
}
|
|
|
|
// 是否在白名单
|
|
func IsWhiteIp(ip string) (result bool) {
|
|
|
|
result = false
|
|
|
|
whiteList := []string{}
|
|
|
|
result = IsInStringList(ip, whiteList)
|
|
|
|
return
|
|
|
|
}
|