You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
1.5 KiB
74 lines
1.5 KiB
package common |
|
|
|
import "server/config" |
|
|
|
const ( |
|
ProviderZero = iota |
|
ProviderInhouse |
|
ProviderTada |
|
ProviderSexy |
|
ProviderPGSoft |
|
ProviderEvolutionGaming |
|
ProviderAllBet |
|
ProviderBigGaming |
|
ProviderSAGaming |
|
ProviderPragmaticPlay |
|
ProviderCQ9 |
|
ProviderPlayTech |
|
ProviderJoker |
|
ProviderDragonSoft |
|
ProviderTFGaming |
|
ProviderWMCasino |
|
ProviderKing855 |
|
ProviderAMAYA |
|
ProviderHabanero |
|
ProviderIBC |
|
ProviderReevo |
|
ProviderEvoPlay |
|
ProviderPlayStar |
|
ProviderDreamGaming |
|
ProviderNexus4D |
|
ProviderSlotXo |
|
ProviderBTI |
|
ProviderEzugi |
|
ProviderJili |
|
ProviderJDB |
|
ProviderCMD368 |
|
ProviderSBO |
|
ProviderPG2 |
|
ProviderJiLi2 |
|
ProviderPG3 |
|
ProviderAll |
|
) |
|
|
|
const ( |
|
ProviderAPIType = iota |
|
ProviderAPITypeJson |
|
ProviderAPITypePostform |
|
ProviderAPITypeAll |
|
) |
|
|
|
// ConfigServerFlag 配置服务器编号配置 |
|
type ConfigServerFlag struct { |
|
ID int `gorm:"primary_key;AUTO_INCREMENT;column:id"` |
|
Flag string `gorm:"column:flag;type:varchar(255);default:'b';uniqueIndex:flag;comment:服务器编号" web:"flag"` |
|
APIURL string `gorm:"column:api_url;type:varchar(255);default:'';comment:api请求地址" web:"api_url"` |
|
} |
|
|
|
func (c *ConfigServerFlag) TableName() string { |
|
return "config_server_flag" |
|
} |
|
|
|
func GetProviderUserName(name string) string { |
|
if config.GetBase().ServerFlag != "a" { |
|
name = config.GetBase().ServerFlag + name |
|
} |
|
return name |
|
} |
|
|
|
func GetProviderUserToken(token string) string { |
|
if config.GetBase().ServerFlag != "a" { |
|
token = config.GetBase().ServerFlag + token |
|
} |
|
return token |
|
}
|
|
|