utils

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateThumbnail

func GenerateThumbnail(src image.Image, maxSize int) image.Image

GenerateThumbnail creates a thumbnail of the given image with a maximum size. It maintains the aspect ratio and returns a new image that fits within maxSize x maxSize.

func IsLetter

func IsLetter(s string) bool

Types

type BoardNameValidator

type BoardNameValidator struct{ Сfg *config.Public }

func New

func New(cfg *config.Public) *BoardNameValidator

func (*BoardNameValidator) Name

func (e *BoardNameValidator) Name(name string) error

func (*BoardNameValidator) ShortName

func (e *BoardNameValidator) ShortName(name string) error

type MessageValidator

type MessageValidator struct{ Сfg *config.Public }

func (*MessageValidator) PendingFiles

func (e *MessageValidator) PendingFiles(files []*domain.PendingFile) error

PendingFiles checks if pending files meet the configured constraints

func (*MessageValidator) Text

func (e *MessageValidator) Text(text string) error

type PasswordValidator

type PasswordValidator struct{ Сfg *config.Public }

func (*PasswordValidator) Password

func (v *PasswordValidator) Password(password string) error

type ThreadTitleValidator

type ThreadTitleValidator struct{ Сfg *config.Public }

func (*ThreadTitleValidator) Title

func (e *ThreadTitleValidator) Title(name string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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