"github.com/gin-gonic/gin"
)
+var CONFIG Config
+
+type Config struct {
+ JwtSecret string `toml:"jwt_secret"`
+ PasswordResetSecret string `toml:"password_reset_secret"`
+ FreeSMSUser string `toml:"free_sms_user"`
+ FreeSMSPass string `toml:"free_sms_pass"`
+}
+
+func SetConfig(config Config) {
+ CONFIG = config
+
+ JWT_SECRET = []byte(config.JwtSecret)
+ PASSWORD_RESET_SECRET = []byte(config.PasswordResetSecret)
+}
+
type Error struct {
Code ErrorCode
UserMessage string