util

package
v0.0.0-...-ed3c475 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SocialNetworkTwitter = "twitter"
	SocialNetworkApple   = "apple"
)

Variables

View Source
var AnimalArray = []string{}/* 331 elements not displayed */

Rearranging this or adding to this will change participant names! Think twice before doing it!

Functions

func GenerateAnimalDisplayName

func GenerateAnimalDisplayName(seed uint64) string

Pull the entropy from bits 0-9 (most significant, big endian)

func GenerateDisplayNameIndex

func GenerateDisplayNameIndex(seed uint64) int

Pull the entropy from bits 16-25 (most significant)

func GenerateFullDisplayName

func GenerateFullDisplayName(seed uint64) string

func GenerateGradient

func GenerateGradient(seed uint64) model.GradientColor

Pull the entropy from bits 10-15 (most significant, big endian)

func GenerateParticipantSeed

func GenerateParticipantSeed(discussionID, participantID string, shuffleCount int) uint64

func RandomString

func RandomString(length int) string

func ReturnParsedEntityID

func ReturnParsedEntityID(entityID string) (*model.ParsedEntityID, error)

func UUIDv4

func UUIDv4() string

Types

type FrozenTime

type FrozenTime struct {
	NowTime time.Time
}

func (*FrozenTime) Now

func (ft *FrozenTime) Now() time.Time

type RealTime

type RealTime struct{}

func (*RealTime) Now

func (rt *RealTime) Now() time.Time

type TimeProvider

type TimeProvider interface {
	Now() time.Time
}

Jump to

Keyboard shortcuts

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