config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: MIT Imports: 8 Imported by: 48

Documentation

Index

Constants

View Source
const (
	NotifyAll     = "all"
	NotifyMention = "mention"
)

Variables

View Source
var EmojiCodemap = map[string]string{}/* 1506 elements not displayed */

Referenced from: https://github.com/kyokomi/emoji

Functions

func CreateConfigFile added in v0.5.0

func CreateConfigFile(filepath string) (*os.File, error)

Types

type Channel added in v0.3.0

type Channel struct {
	Prefix string `json:"prefix"`
	Icon   string `json:"icon"`
	Text   string `json:"text"`
}

type Config

type Config struct {
	SlackToken   string                `json:"slack_token"`
	Notify       string                `json:"notify"`
	Emoji        bool                  `json:"emoji"`
	SidebarWidth int                   `json:"sidebar_width"`
	MainWidth    int                   `json:"-"`
	ThreadsWidth int                   `json:"threads_width"`
	KeyMap       map[string]keyMapping `json:"key_map"`
	Theme        Theme                 `json:"theme"`
}

Config is the definition of a Config struct

func NewConfig

func NewConfig(filepath string) (*Config, error)

NewConfig loads the config file and returns a Config struct

type Message added in v0.3.0

type Message struct {
	Time       string `json:"time"`
	Name       string `json:"name"`
	Thread     string `json:"thread"`
	Text       string `json:"text"`
	TimeFormat string `json:"time_format"`
}

type Theme added in v0.3.0

type Theme struct {
	View    View    `json:"view"`
	Channel Channel `json:"channel"`
	Message Message `json:"message"`
}

type View added in v0.3.0

type View struct {
	Fg       string `json:"fg"`        // Foreground text
	Bg       string `json:"bg"`        // Background text
	BorderFg string `json:"border_fg"` // Border foreground
	BorderBg string `json:"border_bg"` // Border background
	LabelFg  string `json:"label_fg"`  // Label text foreground
	LabelBg  string `json:"label_bg"`  // Label text background
}

Jump to

Keyboard shortcuts

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