Documentation ¶
Index ¶
- func EchoCtxWithKeys(keys []string, values ...interface{}) echo.Context
- func HeaderInvalid() string
- func HeaderValid() string
- func InsertMultiple(db *pg.DB, models ...interface{}) error
- func NewDB(t *testing.T, con *dockertest.Container, models ...interface{}) *pg.DB
- func NewPGContainer(t *testing.T) *dockertest.Container
- func TestTime(year int) time.Time
- func TestTimePtr(year int) *time.Time
- type JWT
- type RBAC
- func (a *RBAC) AccountCreate(c echo.Context, roleID rest.AccessRole, 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 rest.AccessRole) error
- func (a *RBAC) EnforceUser(c echo.Context, id int) error
- func (a *RBAC) IsLowerRole(c echo.Context, role rest.AccessRole) error
- func (a *RBAC) User(c echo.Context) *rest.AuthUser
- type Secure
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EchoCtxWithKeys ¶
EchoCtxWithKeys returns new Echo context with keys
func InsertMultiple ¶
InsertMultiple inserts multiple values into database
func NewPGContainer ¶
func NewPGContainer(t *testing.T) *dockertest.Container
NewPGContainer instantiates new PostgreSQL docker container
func TestTimePtr ¶
TestTimePtr is used for testing pointer time fields
Types ¶
type RBAC ¶
type RBAC struct { UserFn func(echo.Context) *rest.AuthUser EnforceRoleFn func(echo.Context, rest.AccessRole) error EnforceUserFn func(echo.Context, int) error EnforceCompanyFn func(echo.Context, int) error EnforceLocationFn func(echo.Context, int) error AccountCreateFn func(echo.Context, rest.AccessRole, int) error IsLowerRoleFn func(echo.Context, rest.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
func (*RBAC) IsLowerRole ¶
IsLowerRole mock
Click to show internal directories.
Click to hide internal directories.