Documentation
      ¶
    
    
  
    
  
    Index ¶
- func Argon2Hash(password string) (string, error)
 - func Argon2Verify(password, encodedHash string) (bool, error)
 - func Bcrypt(password string, optionalCost ...int) string
 - func Blake2b(data string) string
 - func Blake2s(data string) string
 - func CompareBcrypt(password, hashed string) bool
 - func CreateLogFile(fileName string) error
 - func FakeData(filename string, count int)
 - func Info()
 - func LogError(function string, message string)
 - func Md5(args ...string) string
 - func Sha256(args ...string) string
 - func Sha3_256(args ...string) string
 - func Sha3_512(args ...string) string
 - func Sha512(args ...string) string
 - func Version()
 - type Context
 - func (c *Context) Default404()
 - func (c *Context) Default405()
 - func (c *Context) Delete() bool
 - func (c *Context) File(filepath string)
 - func (c *Context) FormArgon2(key string) string
 - func (c *Context) FormBcrypt(key string) string
 - func (c *Context) FormData(key string) string
 - func (c *Context) FormFile(key string) (multipart.File, *multipart.FileHeader, error)
 - func (c *Context) FormInt(key string) int
 - func (c *Context) FormMD5(key string) string
 - func (c *Context) FormSHA256(key string) string
 - func (c *Context) FormSHA512(key string) string
 - func (c *Context) Get() bool
 - func (c *Context) HTML(status int, tmplPath string, data interface{})
 - func (c *Context) JSON(status int, data interface{})
 - func (c *Context) Post() bool
 - func (c *Context) Put() bool
 - func (c *Context) Query(key string) string
 - func (c *Context) QueryFloat(key string, defaultVal float64) float64
 - func (c *Context) QueryInt(key string) (int, error)
 - func (c *Context) QueryIntDefault(key string, defaulVal int) int
 - func (c *Context) Redirect(status int, url string)
 - func (c *Context) String(status int, text string)
 - func (c *Context) Stringf(status int, text string, a ...any)
 - func (c *Context) Template404(templatePath string, data ...any)
 - func (c *Context) Template405(templatePath string, data ...any)
 - func (c *Context) UserAgent() string
 
- type FakeUser
 - type HandlerFunc
 - type Router
 - type Server
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Argon2Hash ¶
func Argon2Verify ¶
func CompareBcrypt ¶
func CreateLogFile ¶
Types ¶
type Context ¶
type Context struct {
	Writer  http.ResponseWriter
	Request *http.Request
}
    func (*Context) Default404 ¶
func (c *Context) Default404()
func (*Context) Default405 ¶ added in v1.2.0
func (c *Context) Default405()
func (*Context) FormArgon2 ¶ added in v1.2.0
func (*Context) FormBcrypt ¶
func (*Context) FormSHA256 ¶
func (*Context) FormSHA512 ¶
func (*Context) QueryFloat ¶ added in v1.1.0
func (*Context) QueryIntDefault ¶ added in v1.1.0
func (*Context) Template404 ¶
func (*Context) Template405 ¶ added in v1.2.0
type HandlerFunc ¶
type HandlerFunc func(ctx *Context)
type Router ¶
type Router struct {
	// contains filtered or unexported fields
}
    func (*Router) Handle ¶
func (r *Router) Handle(path string, handler HandlerFunc)
type Server ¶
type Server struct {
	// contains filtered or unexported fields
}
    func (*Server) Handle ¶
func (s *Server) Handle(path string, handler HandlerFunc)
func (*Server) SetNotFound ¶
func (s *Server) SetNotFound(handler HandlerFunc)
      
      Directories
      ¶
    
    | Path | Synopsis | 
|---|---|
| 
       examples
        | 
      |
| 
         
          
            basic
            
            command
          
          
         
       | 
      |
| 
         
          
            basic/useragent
            
            command
          
          
         
       | 
      |
| 
         
          
            register_app
            
            command
          
          
         
       | 
      |
| 
         
          
            search
            
            command
          
          
         
       | 
      |
| 
         
          
            simple_restapi
            
            command
          
          
         
       | 
      |
| 
         
          
            simple_restapi/users
            
            command
          
          
         
       | 
      |
| 
       test
        | 
      |
| 
         
          
            run_test
            
            command
          
          
         
       | 
      
 Click to show internal directories. 
   Click to hide internal directories.