config

package
v0.0.0-...-2b0391e Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 8 Imported by: 0

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

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

Types

type Channel

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"`
	SlackXoxdToken string                `json:"slack_xoxd_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

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

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

type View

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