domain

package
v0.0.0-...-a30bc99 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllAppearancesForDomains

func AllAppearancesForDomains(domains []Domain) []string

AllAppearancesForDomains returns a string slice of all the appearances from a set of domains

func AllPersonalitiesForDomains

func AllPersonalitiesForDomains(domains []Domain) []string

AllPersonalitiesForDomains returns a string slice of all the personalities from a set of domains

func InSlice

func InSlice(domain Domain, domains []Domain) bool

InSlice returns true if a given domain is in a given slice of domains

func RandomAppearanceFromDomains

func RandomAppearanceFromDomains(domains []Domain) (string, error)

RandomAppearanceFromDomains returns a random appearance given a set of domains

func RandomPersonalityFromDomains

func RandomPersonalityFromDomains(domains []Domain) (string, error)

RandomPersonalityFromDomains returns a random personality given a set of domains

Types

type Data

type Data struct {
	Domains []Domain `json:"domains"`
}

Data is a collection of domains

type Domain

type Domain struct {
	Name              string   `json:"name"`
	AppearanceTraits  []string `json:"appearance_traits"`
	PersonalityTraits []string `json:"personality_traits"`
	HolyItems         []string `json:"holy_items"`
	HolySymbols       []string `json:"holy_symbols"`
}

Domain is an area of control

func All

func All() ([]Domain, error)

All returns all pre-defined domains

func ByName

func ByName(name string) (Domain, error)

ByName returns a specific domain by name

func Exclude

func Exclude(domainsToRemove []Domain, superset []Domain) []Domain

Exclude removes a slice of domains from the given slice of domains

func Random

func Random(domains []Domain) (Domain, error)

Random returns a random domain from a slice of domains

Jump to

Keyboard shortcuts

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