tg

package
v0.0.0-...-361b1ce Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName        = "go-tg"
	AppVersion     = "0.1"
	AppDescription = "Command-line interface for Telegram in Go."
	AppTgName      = "Federator"
	AppId          = 10604
	AppHash        = "34be6d99874fb9607fe932dbb86fe4a3"
)

Application constants.

View Source
const (
	ConfigDirectory    = "." + AppName
	DownloadsDirectory = "downloads"
	ConfigFile         = "config"
	AuthKeyFile        = "auth"
	StateFile          = "state"
	SecretChatFile     = "secret"
	BinlogFile         = "binlog"
)

Directories and file locations.

Variables

View Source
var AppAuthors = []cli.Author{
	{Name: "Alejandro Leiva", Email: "gloob@litio.org"},
}

Arrays aren't immutable so we are defining this outside of the const declaration.

Functions

func LoadConfig

func LoadConfig(filename string, config interface{}) (err error)

Types

type Config

type Config struct {
	TgPubKey string
}

type Terminal

type Terminal struct {
	Gui     *gocui.Gui
	Windows []*Window
}

func NewTerminal

func NewTerminal() *Terminal

func (*Terminal) AddWindow

func (term *Terminal) AddWindow(w *Window)

func (*Terminal) Destroy

func (term *Terminal) Destroy()

func (*Terminal) Init

func (term *Terminal) Init()

func (*Terminal) Loop

func (term *Terminal) Loop()

type Window

type Window struct {
	Layout     string
	Controller string
}

A window is similar to a page in a MCV environment. It's a set of Layout, meaning the definition of the display composition and a controller that handle the behaviour.

func NewWindow

func NewWindow() *Window

func (*Window) Destroy

func (w *Window) Destroy()

Directories

Path Synopsis
Godeps
_workspace/src/github.com/codegangsta/cli
Package cli provides a minimal framework for creating and organizing command line Go applications.
Package cli provides a minimal framework for creating and organizing command line Go applications.
_workspace/src/github.com/jroimartin/gocui
Package gocui allows to create console user interfaces.
Package gocui allows to create console user interfaces.
_workspace/src/github.com/nsf/termbox-go
termbox is a library for creating cross-platform text-based interfaces
termbox is a library for creating cross-platform text-based interfaces

Jump to

Keyboard shortcuts

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