37 lines
715 B
Go
37 lines
715 B
Go
package enums
|
|
|
|
// SignPlatform 签署/认证平台
|
|
type SignPlatform string
|
|
|
|
const (
|
|
SignPlatformEsign SignPlatform = "esign"
|
|
SignPlatformFadada SignPlatform = "fadada"
|
|
)
|
|
|
|
// IsValidSignPlatform 是否为合法平台
|
|
func IsValidSignPlatform(p SignPlatform) bool {
|
|
switch p {
|
|
case SignPlatformEsign, SignPlatformFadada:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// GetSignPlatformName 平台中文名
|
|
func GetSignPlatformName(p SignPlatform) string {
|
|
switch p {
|
|
case SignPlatformEsign:
|
|
return "e签宝"
|
|
case SignPlatformFadada:
|
|
return "法大大"
|
|
default:
|
|
return string(p)
|
|
}
|
|
}
|
|
|
|
// DefaultSignPlatform 历史数据默认平台
|
|
func DefaultSignPlatform() SignPlatform {
|
|
return SignPlatformEsign
|
|
}
|