code

package
v5.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const EmojiBytes = 4

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

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

func NewCode

func NewCode(token string, amount int, em emojies.Emojies, createdAt time.Time, expiresAt time.Time) (Code, error)

NewCode creates a new code

This is generally not for public usage.

func (Code) CreatedAt

func (code Code) CreatedAt() time.Time

func (Code) ExpiresAt

func (code Code) ExpiresAt() time.Time

func (Code) Slice

func (code Code) Slice() []string

func (Code) SpacedString

func (code Code) SpacedString() string

func (Code) String

func (code Code) String() string

func (Code) Token deprecated

func (code Code) Token() string

Deprecated: Insecure. Use `String`, `SpacedString` or `Slice` instead.

func (Code) Validate

func (code Code) Validate(emojies string) bool

func (Code) ValidateToken deprecated

func (code Code) ValidateToken(token string) bool

Deprecated: Insecure. Use `Validate` instead.

Jump to

Keyboard shortcuts

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