generator

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2020 License: GPL-3.0 Imports: 3 Imported by: 4

Documentation

Overview

Package generator implements all supported generators

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyGenerator added in v0.1.0

type KeyGenerator interface {
	Generate() (KeyGenerator, error)
	String() string
}

KeyGenerator is exactly what it says on the tin.

func Generate added in v0.1.0

func Generate(k KeyGenerator) (KeyGenerator, error)

Generate generates a key of the specified type

type Mod7CD

type Mod7CD struct {
	First  int
	Second int
}

Mod7CD is an 10-digit mod7 CD key

func (Mod7CD) Generate

func (c Mod7CD) Generate() (KeyGenerator, error)

Generate generates a 10-digit mod7 CD key.

func (Mod7CD) String added in v0.1.0

func (c Mod7CD) String() string

type Mod7ElevenCD

type Mod7ElevenCD struct {
	First  string
	Second int
}

Mod7ElevenCD is an 11-digit mod7 CD key

func (Mod7ElevenCD) Generate

func (c Mod7ElevenCD) Generate() (KeyGenerator, error)

Generate generates an 11-digit mod7 CD key.

func (Mod7ElevenCD) String added in v0.1.0

func (c Mod7ElevenCD) String() string

type Mod7OEM

type Mod7OEM struct {
	First  string
	Second string
	Third  int
	Fourth int
}

Mod7OEM is a mod7 OEM key

func (Mod7OEM) Generate

func (o Mod7OEM) Generate() (KeyGenerator, error)

Generate generates a mod7 OEM key

func (Mod7OEM) String added in v0.1.0

func (o Mod7OEM) String() string

Jump to

Keyboard shortcuts

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