Documentation
¶
Index ¶
- type Repo
- func (r *Repo) Delete(ctx context.Context, id uuid.UUID) (*model.Relationship, error)
- func (r *Repo) FindByID(ctx context.Context, id uuid.UUID) (*model.Relationship, error)
- func (r *Repo) FindRelationship(ctx context.Context, subjectId, objectId uuid.UUID, relationshipType string) (*model.Relationship, error)
- func (r *Repo) FindResourceIdByReporterResourceId(ctx context.Context, id model.ReporterResourceId) (uuid.UUID, error)
- func (r *Repo) ListAll(context.Context) ([]*model.Relationship, error)
- func (r *Repo) Save(ctx context.Context, m *model.Relationship) (*model.Relationship, error)
- func (r *Repo) Update(ctx context.Context, m *model.Relationship, id uuid.UUID) (*model.Relationship, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repo ¶
type Repo struct { DB *gorm.DB Eventer eventingapi.Manager }
func (*Repo) Delete ¶
Delete deletes a model from the database, removes related tuples from the relations-api, and issues a delete event. The `id` is possibly of the form <reporter_type:local_resource_id>.
func (*Repo) FindRelationship ¶
func (*Repo) FindResourceIdByReporterResourceId ¶
func (*Repo) Save ¶
func (r *Repo) Save(ctx context.Context, m *model.Relationship) (*model.Relationship, error)
func (*Repo) Update ¶
func (r *Repo) Update(ctx context.Context, m *model.Relationship, id uuid.UUID) (*model.Relationship, error)
Update updates a model in the database, updates related tuples in the relations-api, and issues an update event. The `id` is possibly of the form <reporter_type:local_resource_id>.
Click to show internal directories.
Click to hide internal directories.