Documentation ¶
Index ¶
- Variables
- func NewCommandValidationError(msg string) error
- type CommandValidationError
- type Commands
- func (c *Commands) SystemIncrementPostVoteCountsAggregate(ctx context.Context, timestamp time.Time, vote_value state.VoteValue) error
- func (c *Commands) UserAddCommentToPost(ctx context.Context, user *state.User, post *state.Post, content string) (state.Comment, error)
- func (c *Commands) UserSignIn(ctx context.Context, username string) (state.User, bool, error)
- func (c *Commands) UserSignUp(ctx context.Context, username string) (state.User, error)
- func (c *Commands) UserSubmitCommentForComment(ctx context.Context, user *state.User, parent_comment *state.Comment, ...) (state.Comment, error)
- func (c *Commands) UserVoteComment(ctx context.Context, user *state.User, comment_id int64, value state.VoteValue) (state.CommentVote, error)
- func (c *Commands) UserVotePost(ctx context.Context, user *state.User, post_id int64, ...) (state.PostVote, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUserSignInUserNotFound = NewCommandValidationError("user not found")
View Source
var ErrUserSignUpCommandUsernameAlreadyTaken = NewCommandValidationError("username is already taken")
View Source
var ErrUserSignUpCommandUsernameTooLong = NewCommandValidationError("username is too long")
View Source
var ErrUserSignUpCommandUsernameTooShort = NewCommandValidationError("username is too short")
View Source
var ErrUserSubmitCommentNotAuthorized = NewCommandValidationError("user is not authorized to comment")
View Source
var ErrUserSubmitCommentPostOrCommentMustBeProvided = NewCommandValidationError("post or comment must be provided")
View Source
var ErrVoteCommentCommandInvalidVoteValue = NewCommandValidationError("invalid vote value")
View Source
var ErrVoteCommentCommandUserNotAllowed = NewCommandValidationError("user is not allowed to vote")
View Source
var ErrVotePostCommandInvalidVoteValue = NewCommandValidationError("invalid vote value")
View Source
var ErrVotePostCommandUserNotAllowed = NewCommandValidationError("user is not allowed to vote")
View Source
var SystemIncrementPostVoteCountsAggregateInvalidTimestampErr = NewCommandValidationError("invalid timestamp")
Functions ¶
Types ¶
type CommandValidationError ¶
type CommandValidationError struct {
// contains filtered or unexported fields
}
func (*CommandValidationError) Error ¶
func (e *CommandValidationError) Error() string
type Commands ¶
func (*Commands) SystemIncrementPostVoteCountsAggregate ¶
func (*Commands) UserAddCommentToPost ¶
func (*Commands) UserSignIn ¶
func (*Commands) UserSignUp ¶
func (*Commands) UserSubmitCommentForComment ¶
func (*Commands) UserVoteComment ¶
Click to show internal directories.
Click to hide internal directories.