Documentation ¶
Overview ¶
Package app api程式常用小工具
Index ¶
- Variables
- func GetTokenVia(c *gin.Context)
- type IDump
- type SooonFunc
- func (s *SooonFunc) APIAuthorized() string
- func (s *SooonFunc) Dump(d IDump, i interface{})
- func (s *SooonFunc) DumpAnything(i interface{})
- func (s *SooonFunc) DumpErrorCode(codePrefix string) string
- func (s *SooonFunc) Init(c *gin.Context)
- func (s *SooonFunc) Localizer(c *gin.Context, outputMsg string) string
- func (s *SooonFunc) NewMd5String(len int) string
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCodePrefix = "APP00"
ErrCodePrefix 錯誤代碼追蹤
Functions ¶
Types ¶
type SooonFunc ¶
type SooonFunc struct {
APIAuthorizedKey string
}
SooonFunc ...
var SFunc *SooonFunc
SFunc ...
func (*SooonFunc) DumpAnything ¶
func (s *SooonFunc) DumpAnything(i interface{})
DumpAnything dumping your stuff like a boss
func (*SooonFunc) DumpErrorCode ¶
DumpErrorCode debug印出function name
func (*SooonFunc) Init ¶
Init APP基本認證 過了APP才能去要JWT token @Summary APP基本認證 過了APP才能去要JWT token @Tags App @param hash formData string true "sha256" @version 1.0 @produce json @Success 200 {object} initSuccessResponse "登入紀錄" @Failure 400 {object} apiFailResponse @host localhost:3000 @Router /init [post]
func (*SooonFunc) NewMd5String ¶
NewMd5String BD密碼salt產生器 會產生len * 2長度的字串 最多16*2
Click to show internal directories.
Click to hide internal directories.