Documentation ¶
Index ¶
- Variables
- type ResourceRepository
- type Usecase
- func (uc *Usecase) Create(ctx context.Context, m *model.Relationship) (*model.Relationship, error)
- func (uc *Usecase) Delete(ctx context.Context, id model.ReporterRelationshipId) error
- func (uc *Usecase) Update(ctx context.Context, m *model.Relationship, id model.ReporterRelationshipId) (*model.Relationship, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ResourceRepository ¶
type ResourceRepository interface { Save(ctx context.Context, resource *model.Relationship) (*model.Relationship, error) Update(context.Context, *model.Relationship, uuid.UUID) (*model.Relationship, error) Delete(context.Context, uuid.UUID) (*model.Relationship, error) FindByID(context.Context, uuid.UUID) (*model.Relationship, error) FindRelationship(ctx context.Context, subjectId, objectId uuid.UUID, relationshipType string) (*model.Relationship, error) FindResourceIdByReporterResourceId(ctx context.Context, id model.ReporterResourceId) (uuid.UUID, error) ListAll(context.Context) ([]*model.Relationship, error) }
type Usecase ¶
type Usecase struct { DisablePersistence bool // contains filtered or unexported fields }
func New ¶
func New(repository ResourceRepository, eventer eventingapi.Manager, logger log.Logger, disablePersistence bool) *Usecase
func (*Usecase) Create ¶
func (uc *Usecase) Create(ctx context.Context, m *model.Relationship) (*model.Relationship, error)
func (*Usecase) Update ¶
func (uc *Usecase) Update(ctx context.Context, m *model.Relationship, id model.ReporterRelationshipId) (*model.Relationship, error)
Click to show internal directories.
Click to hide internal directories.