Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Auth module storage Auth AuthStore // Comments module storage Comments CommentsStore // Reviews module storage Reviews ReviewsStore )
View Source
var ( // ErrUserExists returns in case of login is not free ErrUserExists = xerrors.New("User with such login already exists") )
Functions ¶
Types ¶
type AuthStore ¶
type AuthStore interface { FindUserByLogin(login string) (User, error) CreateUser(user User) error UpdateUser(user User) error FindUsers(query string, exclude string) ([]User, error) }
AuthStore provides access to auth module storage
type Comment ¶
type Comment struct { ID int `storm:"id,increment"` Author string Created int64 Text string ParentID int LineID string }
Comment represents information about comment
type CommentsStore ¶
type CommentsStore interface { CreateComment(reviewID int, comment *Comment) error FindCommentByID(reviewID, id int) (Comment, error) CheckExists(reviewID, commentID int) (bool, error) CommentsForReview(reviewID int) ([]Comment, error) }
CommentsStore provides access to comments module storage
type Review ¶
type Review struct { ID int `storm:"id,increment"` File []byte // TODO store id of versioned file Name string Updated int64 Closed bool Accepted bool Owner string `storm:"index"` // TODO create custom index for reviewers Reviewers []string }
Review represents information about review
type ReviewsStore ¶
type ReviewsStore interface { CreateReview(review *Review) error FindReviewByID(id int) (Review, error) FindReviewsByOwner(owner string) ([]Review, error) FindReviewsByReviewer(reviewer string) ([]Review, error) UpdateReview(review *Review) error }
ReviewsStore provides access to comments module storage
Click to show internal directories.
Click to hide internal directories.