Documentation ¶
Index ¶
Constants ¶
View Source
const CommentCollection = "comments"
CommentCollection is the MongoDB collection name that holds all comments.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface { // Create creates a new comment. Create(ctx context.Context, key string, userId, message string) (string, error) // Reply replies to a comment. Reply(ctx context.Context, id string, userId, message string) (string, error) // ByID returns a singel comment by ID. ByID(ctx context.Context, id string) (*v1alpha.Comment, error) // ByKey returns all comments that are associated with key. ByKey(ctx context.Context, key string, prefix bool) ([]v1alpha.Comment, error) }
Click to show internal directories.
Click to hide internal directories.