Documentation
¶
Index ¶
- func GetCurrentApDomain(username string, config MicrosoftAuthenticateConfig) string
- func GetUuid() string
- func Throw(exception interface{})
- func Try(try func()) (err error)
- func TryCatch(try func(), catch func(exception error))
- func VerifyEmailFormat(email string) bool
- type MicrosoftAuthenticateConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCurrentApDomain ¶
func GetCurrentApDomain(username string, config MicrosoftAuthenticateConfig) string
func Throw ¶ added in v0.0.4
func Throw(exception interface{})
Throw throws out an exception, which can be caught be TryCatch or recover.
func Try ¶ added in v0.0.4
func Try(try func()) (err error)
Try implements try... logistics using internal panic...recover. It returns error if any exception occurs, or else it returns nil.
func TryCatch ¶ added in v0.0.4
func TryCatch(try func(), catch func(exception error))
TryCatch implements `try...catch..`. logistics using internal `panic...recover`. It automatically calls function `catch` if any exception occurs and passes the exception as an error. If `catch` is given nil, it ignores the panic from `try` and no panic will throw to parent goroutine.
But, note that, if function `catch` also throws panic, the current goroutine will panic.
func VerifyEmailFormat ¶
Types ¶
type MicrosoftAuthenticateConfig ¶
type MicrosoftAuthenticateConfig struct { Domain map[string]string `json:"domain"` IsTLS bool `json:"is_tls"` }
func GetMicrosoftAuthenticateConfig ¶
func GetMicrosoftAuthenticateConfig() MicrosoftAuthenticateConfig
Click to show internal directories.
Click to hide internal directories.