Documentation ¶
Index ¶
- func EchoCtx(r *http.Request, w http.ResponseWriter) echo.Context
- func EchoCtxWithKeys(keys []string, values ...interface{}) echo.Context
- func HeaderInvalid() string
- func HeaderValid() string
- func Str2Ptr(s string) *string
- func TestTime(year int) time.Time
- func TestTimePtr(year int) *time.Time
- type Auth
- type JWT
- type RBAC
- func (a *RBAC) AccountCreate(c echo.Context, roleID, companyID, locationID int) error
- func (a *RBAC) EnforceCompany(c echo.Context, id int) error
- func (a *RBAC) EnforceLocation(c echo.Context, id int) error
- func (a *RBAC) EnforceRole(c echo.Context, role model.AccessRole) error
- func (a *RBAC) EnforceUser(c echo.Context, id int) error
- func (a *RBAC) IsLowerRole(c echo.Context, role model.AccessRole) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EchoCtxWithKeys ¶
EchoCtxWithKeys returns new Echo context with keys
func TestTimePtr ¶
TestTimePtr is used for testing pointer time fields
Types ¶
type RBAC ¶
type RBAC struct { EnforceRoleFn func(echo.Context, model.AccessRole) error EnforceUserFn func(echo.Context, int) error EnforceCompanyFn func(echo.Context, int) error EnforceLocationFn func(echo.Context, int) error AccountCreateFn func(echo.Context, int, int, int) error IsLowerRoleFn func(echo.Context, model.AccessRole) error }
RBAC Mock
func (*RBAC) AccountCreate ¶
AccountCreate mock
func (*RBAC) EnforceCompany ¶
EnforceCompany mock
func (*RBAC) EnforceLocation ¶
EnforceLocation mock
func (*RBAC) EnforceRole ¶
EnforceRole mock
func (*RBAC) EnforceUser ¶
EnforceUser mock
Click to show internal directories.
Click to hide internal directories.