Documentation ¶
Index ¶
- Constants
- type Repository
- func (r *Repository) CreateComment(ctx context.Context, model models.Comment) (string, error)
- func (r *Repository) CreateScope(ctx context.Context, model *models.Scope) (id string, err error)
- func (r *Repository) DeleteScope(ctx context.Context, id string, recurseComment bool) error
- func (r *Repository) GetComment(ctx context.Context, id string) (models.Comment, error)
- func (r *Repository) GetCommentTreeByScope(ctx context.Context, scopeId string, reference string) ([]*models.CommentTree, error)
- func (r *Repository) GetCommentTreeFromCommentID(ctx context.Context, id string) (*models.CommentTree, error)
- func (r *Repository) GetParentComments(ctx context.Context, id string) ([]models.Comment, error)
- func (r *Repository) GetScopeByID(ctx context.Context, id string) (models.Scope, error)
- func (r *Repository) ListScopes(ctx context.Context) ([]models.Scope, error)
- func (r *Repository) UpdateScope(ctx context.Context, id string, model *models.Scope) error
Constants ¶
View Source
const ( ScopeCollection = "scopes" CommentCollection = "comments" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(ctx context.Context, databaseURL string) (*Repository, error)
func (*Repository) CreateComment ¶
func (*Repository) CreateScope ¶
func (*Repository) DeleteScope ¶
func (*Repository) GetComment ¶
func (*Repository) GetCommentTreeByScope ¶
func (r *Repository) GetCommentTreeByScope(ctx context.Context, scopeId string, reference string) ([]*models.CommentTree, error)
func (*Repository) GetCommentTreeFromCommentID ¶
func (r *Repository) GetCommentTreeFromCommentID(ctx context.Context, id string) (*models.CommentTree, error)
func (*Repository) GetParentComments ¶
func (*Repository) GetScopeByID ¶
func (*Repository) ListScopes ¶
func (*Repository) UpdateScope ¶
Click to show internal directories.
Click to hide internal directories.