feat 改名
This commit is contained in:
16
Server/gateway/handler/http_handler/unique_id.go
Normal file
16
Server/gateway/handler/http_handler/unique_id.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package http_handler
|
||||
|
||||
import (
|
||||
"common/utils"
|
||||
"gateway/handler/http_handler/helper/render"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type UniqueIDResp struct {
|
||||
ID string `json:"id"`
|
||||
}
|
||||
|
||||
// GenSnowflake 生成雪花ID
|
||||
func GenSnowflake(c *gin.Context) {
|
||||
render.Json(c, render.OK, &UniqueIDResp{ID: utils.SnowflakeInstance().Generate().String()})
|
||||
}
|
||||
Reference in New Issue
Block a user