utilities

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2018 License: AGPL-3.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigMagic = []byte("WcCf")

Functions

func FriendCodeIsValid

func FriendCodeIsValid(wiiID string) bool

friendCodeIsValid determines if a friend code is valid by checking not empty, is 17 in length, starts with w. BUG(spotlightishere): does not actually determine at a numerical level if valid.

func GenMailErrorCode

func GenMailErrorCode(mailNumber string, error int, reason string) string

GenMailErrorCode formulates a proper response needed for mail-specific errors.

func GenNormalErrorCode

func GenNormalErrorCode(error int, reason string) string

GenNormalErrorCode formulates a proper response for overall errors.

func GenSuccessResponse

func GenSuccessResponse() string

GenSuccessResponse returns a successful message, using = as the divider between characters.

func GenSuccessResponseTyped

func GenSuccessResponseTyped(divider string) string

GenSuccessResponseTyped returns a successful message, using the specified character as a divider.

func GenerateBoundary

func GenerateBoundary() string

GenerateBoundary returns a string with the format Nintendo used for boundaries.

func LogError

func LogError(ravenClient *raven.Client, reason string, err error)

func RandStringBytesMaskImprSrc

func RandStringBytesMaskImprSrc(n int) string

RandStringBytesMaskImprSrc makes a random string with the specified size.

Types

type Config

type Config struct {
	Port            int
	Host            string
	Username        string
	Password        string
	DBName          string
	Interval        int
	BindTo          string
	SendGridKey     string
	SendGridDomain  string
	Debug           bool
	PatchBaseDomain string
	RavenDSN        string
}

Config structure for `config.json`.

type ConfigFormat

type ConfigFormat struct {
	Magic             [4]byte
	Version           int32
	FriendCode        int64
	AmountOfCreations int32
	HasRegistered     int32
	MailDomain        [64]byte
	Passwd            [32]byte
	Mlchkid           [36]byte
	AccountURL        [128]byte
	CheckURL          [128]byte
	ReceiveURL        [128]byte
	DeleteURL         [128]byte
	SendURL           [128]byte

	TitleBooting int32
	Checksum     [4]byte
	// contains filtered or unexported fields
}

Notes

Bugs

  • does not actually determine at a numerical level if valid.

Jump to

Keyboard shortcuts

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