generators

package
v0.3.21 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: GPL-3.0 Imports: 1 Imported by: 4

README

Key Generator

int64, string 형태의 키 생성기 동일한 인터페이스로 키를 생성할 수 있게 함 문자열 키로 생성할 키 타입을 지정

  • snowflake

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GeneratorMakerFunc

type GeneratorMakerFunc func(typeString string) IDGenerator

type IDGenerator

type IDGenerator interface {
	Generate() string
	GenerateInt64() int64
}

type IDGenerators

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

func New

func New(maker GeneratorMakerFunc, values ...interface{}) IDGenerators

func (*IDGenerators) Add

func (gen *IDGenerators) Add(v interface{}, maker GeneratorMakerFunc)

func (*IDGenerators) AddAll

func (gen *IDGenerators) AddAll(values []interface{}, maker GeneratorMakerFunc)

func (IDGenerators) Generate

func (gen IDGenerators) Generate(typeName string) string

func (IDGenerators) GenerateByType

func (gen IDGenerators) GenerateByType(v interface{}) string

func (IDGenerators) GenerateInt64

func (gen IDGenerators) GenerateInt64(typeName string) int64

func (IDGenerators) GenerateInt64ByType

func (gen IDGenerators) GenerateInt64ByType(v interface{}) int64

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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