react

package
v0.0.0-...-75026ef Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

Package react facilitates the processing of user feedback expressed by an emoji.

Copyright (c) 2018 - 2024 PhotoPrism UG. All rights reserved.

This program is free software: you can redistribute it and/or modify
it under Version 3 of the GNU Affero General Public License (the "AGPL"):
<https://docs.photoprism.app/license/agpl>

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

The AGPL is supplemented by our Trademark and Brand Guidelines,
which describe how our Brand Assets may be used:
<https://www.photoprism.app/trademark>

Feel free to send an email to hello@photoprism.app if you have questions, want to support our work, or just want to say hello.

Additional information can be found in our Developer Guide: <https://docs.photoprism.app/developer-guide/>

Index

Constants

This section is empty.

Variables

View Source
var Names = map[Emoji]string{
	Love:      "love",
	Like:      "+1",
	CatLove:   "cat-love",
	LoveIt:    "love-it",
	InLove:    "in-love",
	Heart:     "heart",
	Cheers:    "cheers",
	Hot:       "hot",
	Party:     "party",
	Birthday:  "birthday",
	Sparkles:  "sparkles",
	Rainbow:   "rainbow",
	Pride:     "pride",
	SeeNoEvil: "see-no-evil",
}

Names specifies the reaction names by emoji.

View Source
var Reactions = map[string]Emoji{
	"love":        Love,
	"+1":          Like,
	"cat-love":    CatLove,
	"love-it":     LoveIt,
	"in-love":     InLove,
	"heart":       Heart,
	"cheers":      Cheers,
	"hot":         Hot,
	"party":       Party,
	"birthday":    Birthday,
	"sparkles":    Sparkles,
	"rainbow":     Rainbow,
	"pride":       Pride,
	"see-no-evil": SeeNoEvil,
}

Reactions specifies reaction emojis by name.

Functions

func Known

func Known(reaction string) bool

Known checks if the emoji represents a known reaction.

Types

type Emoji

type Emoji string

Emoji represents user feedback expressed by an emoji: https://www.unicode.org/Public/emoji/14.0/emoji-sequences.txt

var (
	Love      Emoji = "❤️"
	Like      Emoji = "👍"
	CatLove   Emoji = "😻"
	LoveIt    Emoji = "😍"
	InLove    Emoji = "🥰"
	Heart     Emoji = Love
	Cheers    Emoji = "🥂"
	Hot       Emoji = "🔥"
	Party     Emoji = "🎉"
	Birthday  Emoji = "🎂️"
	Sparkles  Emoji = "✨"
	Rainbow   Emoji = "🌈"
	Pride     Emoji = "🏳️‍🌈"
	SeeNoEvil Emoji = "🙈"
	Unknown   Emoji = ""
)

func Find

func Find(reaction string) Emoji

Find finds a reaction by name and emoji.

func (Emoji) Bytes

func (emo Emoji) Bytes() (b []byte)

Bytes returns the reaction emoji as a slice with a maximum size of 64 bytes.

func (Emoji) Name

func (emo Emoji) Name() string

Name returns the ASCII name of the reaction.

func (Emoji) String

func (emo Emoji) String() string

String returns the reaction as string.

func (Emoji) Unknown

func (emo Emoji) Unknown() bool

Unknown checks if the reaction is unknown.

Jump to

Keyboard shortcuts

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