generator

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: GPL-3.0 Imports: 5 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 ChicagoCredentials added in v0.4.0

type ChicagoCredentials struct {
	Site string
	// Password can also be used for providing the 4 beginning bits
	Password string
	Build    string
}

ChicagoCredentials is exactly what it says on the tin

func (*ChicagoCredentials) Generate added in v0.4.0

func (c *ChicagoCredentials) Generate() error

Generate generates credentials for the build specified in c.Build

func (ChicagoCredentials) String added in v0.4.0

func (c ChicagoCredentials) String() string

type KeyGenerator added in v0.1.0

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

KeyGenerator is exactly what it says on the tin.

type Mod7CD

type Mod7CD struct {
	First  int
	Second int
}

Mod7CD is an 10-digit mod7 CD key

func (*Mod7CD) Generate

func (c *Mod7CD) Generate() 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  int
	Second int
}

Mod7ElevenCD is an 11-digit mod7 CD key

func (*Mod7ElevenCD) Generate

func (c *Mod7ElevenCD) Generate() 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 // This is a string instead of int to maintain generator simplicity and performance
	Second string
	Third  int // you must prepend 0 if using this field directly
	Fourth int
}

Mod7OEM is a mod7 OEM key

func (*Mod7OEM) Generate

func (o *Mod7OEM) Generate() error

Generate generates a mod7 OEM key

func (Mod7OEM) String added in v0.1.0

func (o Mod7OEM) String() string

type StarCraft added in v0.5.1

type StarCraft struct {
	Key string // 15-character key (including separators), of which the last digit is a check digit
}

func (*StarCraft) Generate added in v0.5.1

func (s *StarCraft) Generate() error

Generate generates a StarCraft key without separators

func (StarCraft) String added in v0.5.1

func (s StarCraft) String() string

String returns the key with separators in place

Jump to

Keyboard shortcuts

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