Documentation ¶
Index ¶
- Constants
- func AccessAuth(c iris.Context)
- func FtpListAll(cfg *Config, folder string) (interface{}, error)
- func FtpWriteImage(cfg *Config, folder string, data string) (string, error)
- func FtpWriteText(cfg *Config, folder string, data string) (string, error)
- func GenRSA(bits int) (*rsa.PrivateKey, error)
- func GenerateSmartID(systemCode int, nodeCode int, size int) (id uint64, err error)
- func Hash(password string, salt int) (string, error)
- func LuhnValidate(luhnString string) bool
- func PasswordCompare(rawPassword string, passwordHash string, salt int) bool
- func PreFlight(c iris.Context)
- func ReadPrivateKey(file string) (*rsa.PrivateKey, error)
- func ReadPublicKey(file string) (*rsa.PublicKey, error)
- func ReadTemplate(file string) (string, error)
- func RsaConfigSetup(rsaPrivateKeyLocation, rsaPrivateKeyPassword string, ...) (*rsa.PrivateKey, error)
- func ValidateUsername(username string) (int, error)
- type Auth
- type CfgDb
- type CfgFTP
- type CfgMg
- type CfgPg
- type CfgRd
- type Config
- type Context
- type IRIS
- type MailSender
- type Option
- type OtpModel
- type Request
- type Result
- type Service
- type TokenClaims
Constants ¶
View Source
const (
Salt = 11
)
Variables ¶
This section is empty.
Functions ¶
func AccessAuth ¶
func FtpListAll ¶
func GenerateSmartID ¶
GenerateSmartID function Generate an account id base in Luhn algorithm
func LuhnValidate ¶
LuhnValidate function to check luhn string
func PasswordCompare ¶
PasswordCompare method
func ReadPrivateKey ¶
func ReadPrivateKey(file string) (*rsa.PrivateKey, error)
func ReadTemplate ¶
func RsaConfigSetup ¶
func RsaConfigSetup(rsaPrivateKeyLocation, rsaPrivateKeyPassword string, rsaPublicKeyLocation string) (*rsa.PrivateKey, error)
RsaConfigSetup method
func ValidateUsername ¶
Types ¶
type Config ¶
type Config struct { Database *CfgDb `yaml:"Database"` Service *Service `yaml:"Service"` Option *Option `yaml:"Option"` SmsIris IRIS `yaml:"SmsIris"` }
func LoadConfig ¶
type MailSender ¶
type Option ¶
type Option struct { SmsUrl string `yaml:"SmsUrl"` SmsApiToken string `yaml:"SmsApiToken"` FireBaseUrl string `yaml:"FireBaseUrl"` FireBaseToken string `yaml:"FireBaseToken"` EmailSender *MailSender `yaml:"EmailSender"` ActivateURL string `yaml:"ActivateURL"` UpdateContactURL string `yaml:"UpdateContactURL"` }
type OtpModel ¶
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
Request struct
func NewRequest ¶
func (*Request) ParseTemplate ¶
type Result ¶
type Result struct { System string `json:"system"` Version string `json:"version"` RequestTime int64 `json:"request_time"` Code int `json:"result_code"` Message string `json:"message"` Data interface{} `json:"data"` }
Result Struct for return
Source Files ¶
Click to show internal directories.
Click to hide internal directories.