Documentation ¶
Overview ¶
Package thread provides APIs for working with threads which are sequences of posts. Threads can be created with one post, listed, searched and updated.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Service ¶
type Service interface { // Create a new thread in the specified category. Create( ctx context.Context, title string, body string, authorID account.AccountID, categoryID category.CategoryID, tags []string, ) (*thread.Thread, error) // ListAll returns all threads. ListAll( ctx context.Context, before time.Time, max int, ) ([]*thread.Thread, error) // Get one thread and the posts within it. Get( ctx context.Context, threadID post.PostID, ) (*thread.Thread, error) }
func New ¶
func New( l *zap.Logger, rbac *restrict.AccessManager, account_repo account.Repository, thread_repo thread.Repository, ) Service
Click to show internal directories.
Click to hide internal directories.