Documentation ¶
Index ¶
- Constants
- func Ksuid() string
- func LogRequestToPlausible(lrb *logRequestBody, statsApiUrl string)
- func NewLogRequestBody(path string, address string, domain string) *logRequestBody
- func Ulid() string
- func Uuid() string
- type Onetimecode
- func NewAlphanumericalCode(opts ...OnetimecodeConfig) *Onetimecode
- func NewKsuidCode(opts ...OnetimecodeConfig) *Onetimecode
- func NewNumericalCode(opts ...OnetimecodeConfig) *Onetimecode
- func NewUlidCode(opts ...OnetimecodeConfig) *Onetimecode
- func NewUuidCode(opts ...OnetimecodeConfig) *Onetimecode
- type OnetimecodeConfig
- func WithAlphaNumericCode() OnetimecodeConfig
- func WithCase(caseStr string) OnetimecodeConfig
- func WithGrouping(groupEvery int, groupBy string) OnetimecodeConfig
- func WithLength(length int) OnetimecodeConfig
- func WithLowerCase() OnetimecodeConfig
- func WithMax(max int) OnetimecodeConfig
- func WithMin(min int) OnetimecodeConfig
- func WithMinMax(min, max int) OnetimecodeConfig
- func WithUpperCase() OnetimecodeConfig
- func WithoutDashes() OnetimecodeConfig
- func WithoutDashesFromBoolean(withoutDashes bool) OnetimecodeConfig
- type OnetimecodeType
Constants ¶
View Source
const ( ANumberedCode OnetimecodeType = "ANumberedCode" AnAlphaNumericCode = "AnAlphaNumericCode" AnAlphaNumericUpperCaseCode = "AnAlphaNumericUpperCaseCode" )
Variables ¶
This section is empty.
Functions ¶
func LogRequestToPlausible ¶
func LogRequestToPlausible(lrb *logRequestBody, statsApiUrl string)
func NewLogRequestBody ¶
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
Click to show internal directories.
Click to hide internal directories.