Documentation
¶
Index ¶
- func ExtractAddrFromSessionID(sessionID string) string
- func GenerateSessionID(addr string) string
- func ResponseBadRequest(c *gin.Context, err error)
- func ResponseCreated(c *gin.Context, data interface{})
- func ResponseError(c *gin.Context, err error)
- func ResponseNoContent(c *gin.Context)
- func ResponseOK(c *gin.Context, data interface{})
- type Error
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractAddrFromSessionID ¶
extractAddrFromSessionID decodes the session ID to the addr.
func GenerateSessionID ¶
generateSessionID encodes the addr to a session ID, which is used to identify the session. And then can be used to parse the leader listening address back.
func ResponseBadRequest ¶
func ResponseCreated ¶
func ResponseError ¶
func ResponseNoContent ¶
func ResponseOK ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.