random

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 1 Imported by: 11

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 随机数来源

Jump to

Keyboard shortcuts

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