Documentation ¶
Index ¶
- Constants
- type Code
- func (code Code) CreatedAt() time.Time
- func (code Code) ExpiresAt() time.Time
- func (code Code) Slice() []string
- func (code Code) SpacedString() string
- func (code Code) String() string
- func (code Code) Token() stringdeprecated
- func (code Code) Validate(emojies string) bool
- func (code Code) ValidateToken(token string) booldeprecated
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) SpacedString ¶
func (Code) ValidateToken
deprecated
Click to show internal directories.
Click to hide internal directories.