glas

package module
v0.0.0-...-b34d29d Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2018 License: Apache-2.0 Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Glas

Is a telnet based MUD client framework. User-facing interaction is handled in in a separate client (be it terminal or otherwise) which passes requirements needed for Glas to run during it's start.

Front-facing client implementations are found in the glas-cli repo.

Issues and pull requests are welcome.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alias

type Alias struct {
	// Match is the alias match.
	Match string
	// Action is the action performed on a match.
	Action []string
}

Alias is a command alias

type CharacterConfig

type CharacterConfig struct {
	// Name is the character name.
	Name string
	// Password is the character password. TODO: encrypt this? bare minimum, hash it.
	Password string
	// Address is the mud address
	Address string
	// AutoLogin is an optional auto-login sequence.
	AutoLogin []string `toml:"auto_login"`

	// Aliases are a characters aliases.
	Aliases map[string]*Alias `toml:"aliases"`
	// contains filtered or unexported fields
}

CharacterConfig is a character configuration.

func (*CharacterConfig) Validate

func (c *CharacterConfig) Validate() error

Validate a configuration, error if a required value is missing and set defaults (if a value is not provided) when not required.

type Config

type Config struct {
	// CmdPrefix is the prefix used for client commands, by default this
	// is `/`.
	CmdPrefix string
	// CharacterPath is the file path to look for characters in.
	CharacterPath string
}

Config houses non-character configuration options.

func (*Config) Validate

func (c *Config) Validate() error

Validate a configuration, error if a required value is missing and set defaults (if a value is not provided) when not required.

type Glas

type Glas struct {
	// contains filtered or unexported fields
}

Glas is our mud client.

func New

func New(config *Config, out io.Writer, errCh, stopCh chan error, log *logrus.Entry) (*Glas, error)

New returns a new instance of Glas.

func (*Glas) Send

func (g *Glas) Send(data ...interface{}) error

Send data to the mud.

func (*Glas) Start

func (g *Glas) Start(connectArg string)

Start starts our mud client.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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