You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
801 B
20 lines
801 B
package scopes
|
|
|
|
import (
|
|
"context"
|
|
"git.aiterp.net/stufflog3/stufflog3/entities"
|
|
"git.aiterp.net/stufflog3/stufflog3/models"
|
|
)
|
|
|
|
type Repository interface {
|
|
Find(ctx context.Context, id int) (*entities.Scope, error)
|
|
List(ctx context.Context) ([]entities.Scope, error)
|
|
ListUser(ctx context.Context, userID string) ([]entities.Scope, error)
|
|
Create(ctx context.Context, scope entities.Scope, ownerID string) (*entities.Scope, error)
|
|
Update(ctx context.Context, scope entities.Scope, update models.ScopeUpdate) error
|
|
Delete(ctx context.Context, scope entities.Scope) error
|
|
|
|
ListMembers(ctx context.Context, scopeIDs ...int) ([]entities.ScopeMember, error)
|
|
SaveMember(ctx context.Context, member entities.ScopeMember) error
|
|
DeleteMember(ctx context.Context, member entities.ScopeMember) error
|
|
}
|