config

package
v0.0.0-...-e980239 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ColorizeColors A list of color-names used for colorizing user-names
	ColorizeColors = []string{
		"maroon", "green", "olive", "navy", "purple", "teal", "silver", "red",
		"lime", "yellow", "blue", "fuchsia", "aqua", "aliceblue", "aquamarine",
		"azure", "blueviolet", "brown", "cadetblue", "chartreuse", "coral",
		"cornflowerblue", "cornsilk", "crimson", "darkolivegreen", "darkorange",
		"darkorchid", "lightgoldenrodyellow", "limegreen", "pink", "plum",
		"tomato", "powderblue", "rebeccapurple", "rosybrown", "royalblue",
		"saddlebrown", "salmon", "sandybrown", "seagreen", "seashell", "sienna",
		"skyblue", "slateblue", "snow", "springgreen", "steelblue", "tan",
		"thistle", "tomato", "turquoise", "violet", "yellowgreen",
	}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Debug    bool           `json:"debug"`
	Terminal TerminalConfig `json:"terminal"`
	Teams    []TeamConfig   `json:"teams"`
}

Config Main application Configuration

func Load

func Load(filename string) (*Config, error)

Load Load configuration structures from a file

func (*Config) GetTeamConfig

func (c *Config) GetTeamConfig(teamName string) (*TeamConfig, error)

GetTeamConfig Return configuration for a specific team

type History

type History struct {
	Fetch bool `json:"fetch"`
	Size  int  `json:"size"`
}

History Configuration parameters regarding conversation history

type TeamConfig

type TeamConfig struct {
	Name           string  `json:"name"`
	Token          string  `json:"slack_token"`
	AutoConnect    bool    `json:"auto_connect"`
	AutoJoin       bool    `json:"auto_join"`
	Colorize       bool    `json:"colorize"`
	ColorizeInline bool    `json:"colorize_inline"`
	History        History `json:"history"`
}

TeamConfig Configuration of a slack team

type TerminalConfig

type TerminalConfig struct {
	Notify bool `json:"notify"`
	Title  bool `json:"title"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳