fakehelper

package
v0.0.0-...-0a1b35b Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FakeAvatarGen

func FakeAvatarGen() (string, gofakeit.Info)

FakeAvatarGen generates and writes random user / project / org letter avatar Outputs the filepath to the generated image

func FakeAvatarGenBytes

func FakeAvatarGenBytes() (string, gofakeit.Info)

FakeAvatarGenBytes generates and writes random user / project / org letter avatar Outputs the filepath to the generated image

func FakeDropdownQuestion

func FakeDropdownQuestion(genFunc func() (interface{}, error)) (string, gofakeit.Info)

FakeDropdownQuestion generates dropdown question for the same question group

func FakeMailSequence

func FakeMailSequence(callFunc func(prefix, referral string, isRef, isUniqueRef bool) (interface{}, error)) (string, gofakeit.Info)

func FakeNameSequence

func FakeNameSequence(callFunc func(prefix, referral string, isRef, isUniqueRef, reset bool) (interface{}, error)) (string, gofakeit.Info)

func FakeQuestionGroup

func FakeQuestionGroup(genFunc func(int) (interface{}, error)) (string, gofakeit.Info)

FakeQuestionGroup creates / generates question group number useful for dropdown question generation

func FakeQuestionType

func FakeQuestionType(genFunc func() (interface{}, error)) (string, gofakeit.Info)

FakeQuestionType creates / generates question type (dropdown,singlecheckbox,textfield)

func FakeRandomTs

func FakeRandomTs() (string, gofakeit.Info)

func FakeYtUrls

func FakeYtUrls() (string, gofakeit.Info)

FakeYtUrls generates a random slice of royalty free youtube music video url Thanks to Audio Library Plus Channel (https://www.youtube.com/channel/UCht8qITGkBvXKsR1Byln-wA) TODO: fetch the channel and append it here instead of hardcoding it.

func GenFakeLogo(outDir string, size int) (string, error)

func GenFakeLogoBytes

func GenFakeLogoBytes(size int) ([]byte, error)

func UnmarshalFromFilepath

func UnmarshalFromFilepath(path string, any interface{}) error

Types

type QuestionGroup

type QuestionGroup struct {
	GroupAndType map[string]string // for example { question_group_1 : "dropdown" }, etc
}

type RefCount

type RefCount struct {
	Sequence      int
	Previous      int
	LastReference int
}

func NewRefCount

func NewRefCount() *RefCount

func (*RefCount) ResetLastReference

func (r *RefCount) ResetLastReference() *RefCount

Copies the refcount and resets the last reference

Jump to

Keyboard shortcuts

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