pictures

package
v1.55.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2023 License: MIT Imports: 5 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 ModerVoteTemplate

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

func (*ModerVoteTemplate) Validate

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository(db *goqu.Database) *Repository

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) 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