internal

package
v0.0.0-...-3ea7b7b Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ANumberedCode               OnetimecodeType = "ANumberedCode"
	AnAlphaNumericCode                          = "AnAlphaNumericCode"
	AnAlphaNumericUpperCaseCode                 = "AnAlphaNumericUpperCaseCode"
)

Variables

This section is empty.

Functions

func Ksuid

func Ksuid() string

Ksuid returns a KSUID code.

func LogRequestToPlausible

func LogRequestToPlausible(lrb *logRequestBody, statsApiUrl string)

func NewLogRequestBody

func NewLogRequestBody(path string, address string, domain string) *logRequestBody

func Ulid

func Ulid() string

Ulid returns an ULID code.

func Uuid

func Uuid() string

Uuid returns an UUID code.

Types

type Onetimecode

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

func NewAlphanumericalCode

func NewAlphanumericalCode(opts ...OnetimecodeConfig) *Onetimecode

func NewKsuidCode

func NewKsuidCode(opts ...OnetimecodeConfig) *Onetimecode

func NewNumericalCode

func NewNumericalCode(opts ...OnetimecodeConfig) *Onetimecode

func NewUlidCode

func NewUlidCode(opts ...OnetimecodeConfig) *Onetimecode

func NewUuidCode

func NewUuidCode(opts ...OnetimecodeConfig) *Onetimecode

func (*Onetimecode) NumberCode

func (otc *Onetimecode) NumberCode() int64

func (*Onetimecode) ResultAsString

func (otc *Onetimecode) ResultAsString() string

type OnetimecodeConfig

type OnetimecodeConfig func(code *Onetimecode)

func WithAlphaNumericCode

func WithAlphaNumericCode() OnetimecodeConfig

func WithCase

func WithCase(caseStr string) OnetimecodeConfig

func WithGrouping

func WithGrouping(groupEvery int, groupBy string) OnetimecodeConfig

func WithLength

func WithLength(length int) OnetimecodeConfig

func WithLowerCase

func WithLowerCase() OnetimecodeConfig

func WithMax

func WithMax(max int) OnetimecodeConfig

func WithMin

func WithMin(min int) OnetimecodeConfig

func WithMinMax

func WithMinMax(min, max int) OnetimecodeConfig

func WithUpperCase

func WithUpperCase() OnetimecodeConfig

func WithoutDashes

func WithoutDashes() OnetimecodeConfig

func WithoutDashesFromBoolean

func WithoutDashesFromBoolean(withoutDashes bool) OnetimecodeConfig

type OnetimecodeType

type OnetimecodeType string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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