idgener

package
v0.0.0-...-73b5ff1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

用于生成jwt的id

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDGen

type IDGen interface {
	Next() (string, error)
	String() string
}

func IDGenNameToIDGen

func IDGenNameToIDGen(idgen_name string) (IDGen, error)

type SonyflakeGen

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

func NewSonyflakeGen

func NewSonyflakeGen() *SonyflakeGen

func (*SonyflakeGen) Next

func (g *SonyflakeGen) Next() (string, error)

Next 随机生成key

func (*SonyflakeGen) String

func (g *SonyflakeGen) String() string

type UUID4Gen

type UUID4Gen struct{}

func (*UUID4Gen) Next

func (g *UUID4Gen) Next() (string, error)

func (*UUID4Gen) String

func (g *UUID4Gen) String() string

Jump to

Keyboard shortcuts

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