random

package
v1.0.29 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: MIT Imports: 2 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider interface {
	Source() Source
}

Provider 随机数提供方

type ProviderRegistration

type ProviderRegistration struct {
	Name     string
	Enabled  bool
	Provider Provider
}

ProviderRegistration 提供方注册信息

type ProviderRegistry

type ProviderRegistry interface {
	Registration() *ProviderRegistration
}

ProviderRegistry 提供方注册接口

type Service

type Service interface {
	Source() Source
	Reader() io.Reader

	NextString(length int) string
	NextBytes(length int) []byte
	NextInt() int
	NextInt64() int64
}

Service 随机数服务

type Source

type Source interface {
	Reader() io.Reader
}

Source 随机数来源

type UUIDBuilder added in v1.0.21

type UUIDBuilder interface {
	Generate() lang.UUID

	Others(value ...string) UUIDBuilder // 其它参数
	Class(value string) UUIDBuilder
	ID(value string) UUIDBuilder
}

UUIDBuilder ...

type UUIDService added in v1.0.21

type UUIDService interface {
	Build() UUIDBuilder
}

UUIDService 是 UUID 创建服务

Jump to

Keyboard shortcuts

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