Documentation
¶
Index ¶
- type Interface
- type Repository
- func (t *Repository) AddAccess(c context.Context, featureId uuid.UUID, serviceId uuid.UUID) error
- func (t *Repository) CreateService(c context.Context, name string) (uuid.UUID, error)
- func (t *Repository) DeleteService(c context.Context, id uuid.UUID) error
- func (t *Repository) GetNewByServiceName(c context.Context, serviceName string, lastVersion int64) []uuid.UUID
- func (t *Repository) GetServiceById(c context.Context, id uuid.UUID) (Service, bool)
- func (t *Repository) GetServicesByFeature(c context.Context, featureId uuid.UUID) []Service
- func (t *Repository) GetServicesByFeatureList(c context.Context, featureIds []uuid.UUID) map[uuid.UUID][]Service
- func (t *Repository) HasAnyAccessByService(c context.Context, id uuid.UUID) bool
- func (t *Repository) Init(app interfaces.IEngine, _ map[string]interface{}) error
- func (t *Repository) ListServices(c context.Context) []Service
- func (t *Repository) RemoveAccess(c context.Context, featureId uuid.UUID, serviceId uuid.UUID) error
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface {
GetNewByServiceName(c context.Context, serviceName string, lastVersion int64) []uuid.UUID
// Services CRUD
ListServices(c context.Context) []Service
CreateService(c context.Context, name string) (uuid.UUID, error)
DeleteService(c context.Context, id uuid.UUID) error
GetServiceById(c context.Context, id uuid.UUID) (Service, bool)
HasAnyAccessByService(c context.Context, id uuid.UUID) bool
// Feature-Service bindings
GetServicesByFeature(c context.Context, featureId uuid.UUID) []Service
GetServicesByFeatureList(c context.Context, featureIds []uuid.UUID) map[uuid.UUID][]Service
AddAccess(c context.Context, featureId uuid.UUID, serviceId uuid.UUID) error
RemoveAccess(c context.Context, featureId uuid.UUID, serviceId uuid.UUID) error
}
type Repository ¶
type Repository struct {
repository.Mock
// contains filtered or unexported fields
}
func New ¶
func New(name string) *Repository
func (*Repository) CreateService ¶
func (*Repository) DeleteService ¶
func (*Repository) GetNewByServiceName ¶
func (*Repository) GetServiceById ¶
func (*Repository) GetServicesByFeature ¶
Feature-Service bindings
func (*Repository) GetServicesByFeatureList ¶
func (*Repository) HasAnyAccessByService ¶
func (*Repository) Init ¶
func (t *Repository) Init(app interfaces.IEngine, _ map[string]interface{}) error
func (*Repository) ListServices ¶
func (t *Repository) ListServices(c context.Context) []Service
Services CRUD
func (*Repository) RemoveAccess ¶
Click to show internal directories.
Click to hide internal directories.