Documentation
¶
Index ¶
- Variables
- type Auth
- func (a *Auth) Add(name string, password string, email string, role store.Role) error
- func (a *Auth) CheckPermissions(c echo.Context) error
- func (a *Auth) GenerateToken(c echo.Context, u store.User) error
- func (a *Auth) Login(c echo.Context, name, password string) error
- func (a *Auth) Middleware(f func(error, echo.Context) error) echo.MiddlewareFunc
- type Claims
- type Server
- type Template
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidData = fmt.Errorf("invalid data")
View Source
var (
ErrNotAuthorized = fmt.Errorf("user not authorized")
)
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
func (*Auth) Middleware ¶
type Claims ¶
type Claims struct {
jwt.StandardClaims
Name string `json:"name"`
Role store.Role `json:"role"`
}
Click to show internal directories.
Click to hide internal directories.