iff

package
v0.0.0-...-4ee4993 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

iff: Identification, friend or foe.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOwner

func GetOwner(name string) string

func GetPets

func GetPets() map[string]string

func IsFoe

func IsFoe(name string) bool

func IsFriend

func IsFriend(name string) bool

func ListenPets

func ListenPets() (<-chan struct{}, func())

ListenPets lets us listen for changes to the pet mapping

func MakeFoe

func MakeFoe(name string)

func MakeFriend

func MakeFriend(name string)

func MakePet

func MakePet(pet string, owner string)

func UnlinkPet

func UnlinkPet(pet string)

Types

type Control

type Control interface {
	Unlink(pet string) error
	Link(pet string, owner string) error
}

IffControl instructs the main process to update some IFF status.

type IffFoe

type IffFoe struct{ Name string }

func (*IffFoe) Apply

func (i *IffFoe) Apply()

type IffFriend

type IffFriend struct{ Name string }

func (*IffFriend) Apply

func (i *IffFriend) Apply()

type IffNewPet

type IffNewPet struct {
	Pet   string
	Owner string
}

func (*IffNewPet) Apply

func (i *IffNewPet) Apply()

type IffUnlinkPet

type IffUnlinkPet struct {
	Pet string
}

func (*IffUnlinkPet) Apply

func (i *IffUnlinkPet) Apply()

type IffUpdate

type IffUpdate interface {
	Apply()
}

type IffUpdateHolder

type IffUpdateHolder struct {
	Update IffUpdate
}

Jump to

Keyboard shortcuts

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