Documentation
¶
Index ¶
- Constants
- Variables
- type AccessCreate
- type AccessDelete
- type AccessRead
- type AccessRule
- type AccessUpdate
- type Entity
- type Group
- type Link
- type Model
- type Module
- func (m *Module) GroupLinks() map[*navigation.Group][]*navigation.Link
- func (m *Module) HttpHandler() (http.Handler, error)
- func (m *Module) HttpPrefix() string
- func (m *Module) Init(provider interfaces.DependencyProvider) error
- func (m *Module) Links() []*navigation.Link
- func (m *Module) Name() string
- type Repository
- type RepositoryCreatable
- type RepositoryDeletable
- type RepositoryReadable
- type RepositoryUpdatable
Constants ¶
View Source
const ( CreateRuleName = "create" ReadRuleName = "read" UpdateRuleName = "update" DeleteRuleName = "delete" )
Variables ¶
View Source
var ( AccessCreateRule = AccessRule(new(AccessCreate)) AccessReadRule = AccessRule(new(AccessRead)) AccessUpdateRule = AccessRule(new(AccessUpdate)) AccessDeleteRule = AccessRule(new(AccessDelete)) )
View Source
var ( ErrEntityNotRegistered = errors.New("entity not registered") ErrRepositoryNotSupportsCreate = errors.New("repository not supports create actions") ErrRepositoryNotSupportsRead = errors.New("repository not supports read actions") ErrRepositoryNotSupportsUpdate = errors.New("repository not supports update actions") ErrRepositoryNotSupportsDelete = errors.New("repository not supports delete actions") ErrAccessDenied = errors.New("access denied") ErrIdentifierNotConvertableToString = errors.New("identifier not convertable to string") ErrUnexpectedConvertingRecord = errors.New("something went wrong while converting record") )
Functions ¶
This section is empty.
Types ¶
type AccessCreate ¶
type AccessCreate struct{}
func (*AccessCreate) RuleName ¶
func (a *AccessCreate) RuleName() string
type AccessDelete ¶
type AccessDelete struct{}
func (*AccessDelete) RuleName ¶
func (a *AccessDelete) RuleName() string
type AccessRead ¶
type AccessRead struct{}
func (*AccessRead) RuleName ¶
func (a *AccessRead) RuleName() string
type AccessRule ¶
type AccessRule interface {
RuleName() string
}
type AccessUpdate ¶
type AccessUpdate struct{}
func (*AccessUpdate) RuleName ¶
func (a *AccessUpdate) RuleName() string
type Entity ¶
type Entity struct { Slug string Name string Repository Repository Link *navigation.Link Group *navigation.Group }
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func (*Module) GroupLinks ¶
func (m *Module) GroupLinks() map[*navigation.Group][]*navigation.Link
func (*Module) HttpPrefix ¶
func (*Module) Init ¶
func (m *Module) Init(provider interfaces.DependencyProvider) error
func (*Module) Links ¶
func (m *Module) Links() []*navigation.Link
type Repository ¶
type Repository interface { // AccessRules Must return a set of access rules, that allowed for context AccessRules(context.Context) ([]AccessRule, error) // NewModel Must return a new instance of model NewModel() Model }
type RepositoryCreatable ¶
type RepositoryDeletable ¶
type RepositoryReadable ¶
Click to show internal directories.
Click to hide internal directories.