v5sdkgo/config/conf.go
2024-12-14 19:09:06 +08:00

33 lines
662 B
Go

package config
import "fmt"
type Env struct {
RestEndpoint string `yaml:"RestEndpoint"`
WsEndpoint string `yaml:"WsEndpoint"`
IsSimulation bool `yaml:"IsSimulation"`
}
type ApiInfo struct {
ApiKey string `yaml:"ApiKey"`
SecretKey string `yaml:"SecretKey"`
Passphrase string `yaml:"Passphrase"`
}
type MetaData struct {
Description string `yaml:"Description"`
}
type Config struct {
MetaData `yaml:"MetaData"`
Env `yaml:"Env"`
ApiInfo `yaml:"ApiInfo"`
}
func (s *ApiInfo) String() string {
res := "ApiInfo{"
res += fmt.Sprintf("ApiKey:%v,SecretKey:%v,Passphrase:%v", s.ApiKey, s.SecretKey, s.Passphrase)
res += "}"
return res
}