Documentation ¶
Index ¶
- func GenerateToken(claims jwt.Claims, secret []byte) (string, error)
- func HttpFirstFile(c *gin.Context) (*multipart.FileHeader, error)
- func HttpSaveFile(body io.ReadCloser, length int64, path string) error
- func HttpSaveFirstFile(c *gin.Context, path string) (string, error)
- func ParseToken(token string, secret []byte, claims jwt.Claims) error
- type Config
- type Context
- type H
- type HandlerFunc
- type IRoutes
- type MethodFunc
- type Server
- func (s *Server) Auth(method MethodFunc, path string, handler ...gin.HandlerFunc)
- func (s *Server) AuthB(method MethodFunc, path string, handler ...gin.HandlerFunc)
- func (s *Server) AuthF(method MethodFunc, path string, handler ...gin.HandlerFunc)
- func (s *Server) Bind(method MethodFunc, path string, handler ...gin.HandlerFunc)
- func (s *Server) DELETE(relativePath string, handlers ...HandlerFunc) IRoutes
- func (s *Server) GET(relativePath string, handlers ...HandlerFunc) IRoutes
- func (s *Server) POST(relativePath string, handlers ...HandlerFunc) IRoutes
- func (s *Server) PUT(relativePath string, handlers ...HandlerFunc) IRoutes
- func (s *Server) Router() *gin.Engine
- func (s *Server) Run(addr string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HttpFirstFile ¶
func HttpFirstFile(c *gin.Context) (*multipart.FileHeader, error)
func HttpSaveFile ¶
func HttpSaveFile(body io.ReadCloser, length int64, path string) error
Types ¶
type Config ¶
type Config struct { Root string IndexPage string HandlerUse []HandlerFunc HandlerNoRoute HandlerFunc AuthCB HandlerFunc AuthFCB HandlerFunc AuthBCB HandlerFunc }
type HandlerFunc ¶
type HandlerFunc = gin.HandlerFunc
type MethodFunc ¶
type MethodFunc func(relativePath string, handlers ...HandlerFunc) IRoutes
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) Auth ¶
func (s *Server) Auth(method MethodFunc, path string, handler ...gin.HandlerFunc)
func (*Server) AuthB ¶
func (s *Server) AuthB(method MethodFunc, path string, handler ...gin.HandlerFunc)
func (*Server) AuthF ¶
func (s *Server) AuthF(method MethodFunc, path string, handler ...gin.HandlerFunc)
func (*Server) Bind ¶
func (s *Server) Bind(method MethodFunc, path string, handler ...gin.HandlerFunc)
Click to show internal directories.
Click to hide internal directories.