app

package
v0.0.0-...-5cbf6eb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package app api程式常用小工具

Index

Constants

This section is empty.

Variables

View Source
var ErrCodePrefix = "APP00"

ErrCodePrefix 錯誤代碼追蹤

Functions

func GetTokenVia

func GetTokenVia(c *gin.Context)

GetTokenVia ...

Types

type IDump

type IDump interface {
	DumpAnything(i interface{})
}

IDump ...

type SooonFunc

type SooonFunc struct {
	APIAuthorizedKey string
}

SooonFunc ...

var SFunc *SooonFunc

SFunc ...

func (*SooonFunc) APIAuthorized

func (s *SooonFunc) APIAuthorized() string

APIAuthorized ...

func (*SooonFunc) Dump

func (s *SooonFunc) Dump(d IDump, i interface{})

Dump implement IDump interface

func (*SooonFunc) DumpAnything

func (s *SooonFunc) DumpAnything(i interface{})

DumpAnything dumping your stuff like a boss

func (*SooonFunc) DumpErrorCode

func (s *SooonFunc) DumpErrorCode(codePrefix string) string

DumpErrorCode debug印出function name

func (*SooonFunc) Init

func (s *SooonFunc) Init(c *gin.Context)

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) Localizer

func (s *SooonFunc) Localizer(c *gin.Context, outputMsg string) string

Localizer 返回翻譯後的多語

func (*SooonFunc) NewMd5String

func (s *SooonFunc) NewMd5String(len int) string

NewMd5String BD密碼salt產生器 會產生len * 2長度的字串 最多16*2

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL