react

package
v0.0.0-...-8495beb Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidEmoji = errors.New("invalid emoji codepoint")

Functions

func IsValidEmoji

func IsValidEmoji(e string) (string, bool)

Types

type React

type React struct {
	ID     ReactID `json:"id"`
	Emoji  string  `json:"emoji"`
	UserID string  `json:"user"`
	PostID string  `json:"post"`
}

func FromModel

func FromModel(model *model.React) *React

type ReactID

type ReactID xid.ID

type Repository

type Repository interface {
	Add(ctx context.Context, userID xid.ID, postID xid.ID, emojiID string) (*React, error)
	Remove(ctx context.Context, userID xid.ID, reactID ReactID) (*React, error)
}

func New

func New(db *model.Client) Repository

Jump to

Keyboard shortcuts

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