pictures

package
v1.76.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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 ListOptions struct {
	Status         Status
	AncestorItemID int64
	HasCopyrights  bool
}

type ModerVoteTemplate

type ModerVoteTemplate struct {
	ID      int64
	UserID  int64
	Message string
	Vote    int32
}

func (*ModerVoteTemplate) Validate

type RatingFan added in v1.75.0

type RatingFan struct {
	UserID int64 `db:"user_id"`
	Volume int64 `db:"volume"`
}

type RatingUser added in v1.75.0

type RatingUser struct {
	OwnerID int64 `db:"owner_id"`
	Volume  int64 `db:"volume"`
}

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 (s *Repository) DeleteModerVoteTemplate(ctx context.Context, id int64, userID int64) error

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)

func (*Repository) IncView

func (s *Repository) IncView(ctx context.Context, id int64) error

func (*Repository) Status added in v1.41.0

func (s *Repository) Status(ctx context.Context, id int64) (Status, error)

func (*Repository) TopLikes added in v1.75.0

func (s *Repository) TopLikes(ctx context.Context, limit uint) ([]RatingUser, error)

func (*Repository) TopOwnerFans added in v1.75.0

func (s *Repository) TopOwnerFans(ctx context.Context, userID int64, limit uint) ([]RatingFan, error)

func (*Repository) Vote

func (s *Repository) Vote(ctx context.Context, id int64, value int32, userID int64) error

type Status

type Status string
const (
	StatusAccepted Status = "accepted"
	StatusRemoving Status = "removing"
	StatusRemoved  Status = "removed"
	StatusInbox    Status = "inbox"
)

type VoteSummary

type VoteSummary struct {
	Value    int32
	Positive int32
	Negative int32
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL