numcat

package module
Version: v0.0.0-...-f0d5dad Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCatalogueExhasted     error = fmt.Errorf("catalogue exhasted")
	ErrInvalidCandiates      error = fmt.Errorf("invalid candiate count")
	ErrInvalidCatalogue      error = fmt.Errorf("invalid catalogue")
	ErrMinGreaterThanMax     error = fmt.Errorf("min >= max")
	ErrMinLessThanZero       error = fmt.Errorf("min < 0")
	ErrInvalidNumberPer      error = fmt.Errorf("invalid number per value, must be > 0")
	ErrMustBeGreaterThanZero error = fmt.Errorf("must be greater than 0")
)

Functions

This section is empty.

Types

type CatData

type CatData struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewCatData

func NewCatData(cat Cataloguer) (*CatData, error)

func (*CatData) Increment

func (d *CatData) Increment(n int) int

func (*CatData) Next

func (d *CatData) Next(roll bool) error

func (*CatData) Read

func (d *CatData) Read(list []int) int

type Cataloguer

type Cataloguer interface {
	Seek(int) error
	Read([]byte) (int, error)
	Pos() int
	Len() int
}

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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