repo

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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 (r *Repository) CreateComment(ctx context.Context, model models.Comment) (string, error)

func (*Repository) CreateScope

func (r *Repository) CreateScope(ctx context.Context, model *models.Scope) (id string, err error)

func (*Repository) DeleteScope

func (r *Repository) DeleteScope(ctx context.Context, id string, recurseComment bool) error

func (*Repository) GetComment

func (r *Repository) GetComment(ctx context.Context, id string) (models.Comment, error)

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 (r *Repository) GetParentComments(ctx context.Context, id string) ([]models.Comment, error)

func (*Repository) GetScopeByID

func (r *Repository) GetScopeByID(ctx context.Context, id string) (models.Scope, error)

func (*Repository) ListScopes

func (r *Repository) ListScopes(ctx context.Context) ([]models.Scope, error)

func (*Repository) UpdateScope

func (r *Repository) UpdateScope(ctx context.Context, id string, model *models.Scope) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL