models

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2025 License: MIT Imports: 2 Imported by: 1

Documentation ยถ

Index ยถ

Constants ยถ

This section is empty.

Variables ยถ

View Source
var ValidEmojis = []string{
	"๐Ÿ˜€", "๐Ÿ˜", "๐Ÿ˜†", "๐Ÿคฃ", "๐Ÿ˜‰", "๐Ÿคฉ", "๐Ÿคช", "๐Ÿค”", "๐Ÿ˜Ž",
	"๐Ÿ˜ฎ", "๐Ÿ‘ฑ", "๐Ÿง”", "๐Ÿ‘จโ€๐Ÿฆฑ", "๐Ÿง‘โ€๐Ÿฆณ", "๐Ÿง‘โ€๐Ÿฆฐ", "๐Ÿ‘จโ€๐Ÿฆฒ", "๐Ÿ‘ฉ", "๐Ÿ‘ฉโ€๐Ÿฆฐ",
	"๐Ÿ‘ฉโ€๐Ÿฆณ", "๐Ÿ‘ฉโ€๐Ÿฆฑ", "๐Ÿ‘ฉโ€๐Ÿฆฒ", "๐Ÿ‘ฑโ€โ™€๏ธ", "๐Ÿ‘ต", "๐Ÿ‘ด", "๐Ÿฆ", "๐Ÿฏ", "๐ŸฆŠ",
	"๐Ÿคก", "๐Ÿ‘ป", "๐Ÿ‘ฝ", "๐Ÿ‘พ", "๐Ÿค–", "๐Ÿ˜บ", "๐Ÿต", "๐Ÿถ", "๐Ÿฆ„", "๐Ÿ",
	"๐Ÿบ", "๐Ÿฆ", "๐Ÿง", "๐Ÿ”", "๐Ÿฆ‰", "๐Ÿธ", "๐Ÿข", "๐Ÿง ", "๐Ÿ‘€",
}

Functions ยถ

func ValidateEmoji ยถ

func ValidateEmoji(fl validator.FieldLevel) bool

ValidateEmoji checks if the input string is a valid emoji, based on a predefined list of valid emojis.

Types ยถ

type User ยถ

type User struct {
	ID         string `validate:"required,uuid5"`
	Nickname   string `validate:"required,lte=20" redis:"nickname"`
	Emoji      string `validate:"allowedEmoji" redis:"emoji"`
	PrivateKey string `validate:"omitempty,sha256"`
}

func New ยถ

func New(userNickname string, userEmoji string) (*User, error)

func NewWithId ยถ

func NewWithId(userID string, userNickname string, userEmoji string, privateKey string) (*User, error)

func (*User) Validate ยถ

func (u *User) Validate() error

Validate checks if the User struct is valid.

Jump to

Keyboard shortcuts

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