Documentation ¶
Index ¶
- Constants
- type ItemPictureType
- type ListOptions
- type ModerVoteTemplate
- type Repository
- func (s *Repository) Count(ctx context.Context, options ListOptions) (int, error)
- func (s *Repository) CountSelect(options ListOptions) (*goqu.SelectDataset, error)
- func (s *Repository) CreateModerVoteTemplate(ctx context.Context, tpl ModerVoteTemplate) (ModerVoteTemplate, error)
- func (s *Repository) DeleteModerVoteTemplate(ctx context.Context, id int64, userID int64) error
- func (s *Repository) GetModerVoteTemplates(ctx context.Context, id int64) ([]ModerVoteTemplate, error)
- func (s *Repository) GetVote(ctx context.Context, id int64, userID int64) (*VoteSummary, error)
- func (s *Repository) IncView(ctx context.Context, id int64) error
- func (s *Repository) Status(ctx context.Context, id int64) (Status, error)
- func (s *Repository) Vote(ctx context.Context, id int64, value int32, userID int64) error
- type Status
- type VoteSummary
Constants ¶
View Source
const ModerVoteTemplateMessageMaxLength = 80
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ItemPictureType ¶
type ItemPictureType int
const ( ItemPictureContent ItemPictureType = 1 ItemPictureAuthor ItemPictureType = 2 ItemPictureCopyrights ItemPictureType = 3 )
type ListOptions ¶ added in v1.67.1
type ModerVoteTemplate ¶
func (*ModerVoteTemplate) Validate ¶
func (s *ModerVoteTemplate) Validate() ([]*errdetails.BadRequest_FieldViolation, error)
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db *goqu.Database) *Repository
func (*Repository) Count ¶ added in v1.67.1
func (s *Repository) Count(ctx context.Context, options ListOptions) (int, error)
func (*Repository) CountSelect ¶ added in v1.67.1
func (s *Repository) CountSelect(options ListOptions) (*goqu.SelectDataset, error)
func (*Repository) CreateModerVoteTemplate ¶
func (s *Repository) CreateModerVoteTemplate(ctx context.Context, tpl ModerVoteTemplate) (ModerVoteTemplate, error)
func (*Repository) DeleteModerVoteTemplate ¶
func (*Repository) GetModerVoteTemplates ¶
func (s *Repository) GetModerVoteTemplates(ctx context.Context, id int64) ([]ModerVoteTemplate, error)
func (*Repository) GetVote ¶
func (s *Repository) GetVote(ctx context.Context, id int64, userID int64) (*VoteSummary, error)
type VoteSummary ¶
Click to show internal directories.
Click to hide internal directories.