MCPcopy Index your code
hub / github.com/53AI/53AIHub / GetDecodedID

Function GetDecodedID

api/middleware/hashids.go:46–53  ·  view source on GitHub ↗

GetDecodedID 从上下文中获取解码后的ID

(c *gin.Context, paramName string)

Source from the content-addressed store, hash-verified

44
45// GetDecodedID 从上下文中获取解码后的ID
46func GetDecodedID(c *gin.Context, paramName string) (int64, bool) {
47 if value, exists := c.Get("decoded_" + paramName); exists {
48 if id, ok := value.(int64); ok {
49 return id, true
50 }
51 }
52 return 0, false
53}
54
55// GetOriginalID 从上下文中获取原始ID字符串
56func GetOriginalID(c *gin.Context, paramName string) (string, bool) {

Callers 1

ParseIDParamFunction · 0.85

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected