types

package
v0.0.0-...-dace950 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2016 License: GPL-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package types contains shareable types between sub-modules.

Package types contains shareable types between sub-modules.

Package types contains shareable types between sub-modules.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminsConfig

type AdminsConfig struct {
	Admins []string `json:"admins"`
}

type BotsConfig

type BotsConfig struct {
	Personality PersonalityConfig `json:"personality"`
	Listeners   []ListenerConfig  `json:"listeners"`
}

type BrainConfig

type BrainConfig struct {
	Backend string `json:"backend"`
	Replies string `json:"replies"`
}

type CommunicationChannel

type CommunicationChannel struct {
	Data interface{}
}

type ListenerConfig

type ListenerConfig struct {
	Id       string            `json:"id"`
	Type     string            `json:"type"`
	Enabled  bool              `json:"enabled"`
	Settings map[string]string `json:"settings"`
}

func (*ListenerConfig) Get

func (self *ListenerConfig) Get(name, fallback string) string

Get safely gets an optional config key or falls back to a default value.

type PersonalityConfig

type PersonalityConfig struct {
	Name  string      `json:"name"`
	Brain BrainConfig `json:"brain"`
}

type ReplyAnswer

type ReplyAnswer struct {
	Username string
	Message  string
}

ReplyAnswer is an outgoing message to a listener to send to a user.

type ReplyRequest

type ReplyRequest struct {
	Listener    string
	GroupChat   bool
	BotUsername string
	Username    string
	Message     string
}

ReplyRequest is a channel for a listener requesting a response for a user.

type Stop

type Stop struct{}

Stop is a request for a listener to shut down.

type Stopped

type Stopped struct {
	ListenerId string
}

Stopped is a message from a listener communicating that it has been stopped.

type UservarsConfig

type UservarsConfig struct {
	Username string            `json:"username"`
	Data     map[string]string `json:"data"`
}

Jump to

Keyboard shortcuts

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