utils

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 12, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFile

func CreateFile(path string, content []byte) error

CreateFile : Save configuration file

func GetHomeDir

func GetHomeDir() (string, error)

GetHomeDir : Return $HOME Directory or Error

func ID

func ID(n int) string

ID : Generate Id String

func SaveFile

func SaveFile(path string, content []byte) error

SaveFile ...

func TwitterConnectionEstablished

func TwitterConnectionEstablished(httpClient *http.Client) bool

TwitterConnectionEstablished ...

Types

type Project

type Project struct {
	ID                 string    `json:"id" yaml:"id"`
	Name               string    `json:"name" yaml:"name"`
	ConsumerKey        string    `json:"consumer-key" yaml:"consumer-key"`
	ConsumerSecret     string    `json:"consumer-secret" yaml:"consumer-secret"`
	AccessToken        string    `json:"access-token" yaml:"access-token"`
	AccessTokenSecret  string    `json:"access-token-secret" yaml:"access-token-secret"`
	ElasticsearchHost  string    `json:"elasticsearch-host" yaml:"elasticsearch-host"`
	ElasticsearchIndex string    `json:"elasticsearch-index" yaml:"elasticsearch-index"`
	Keywords           string    `json:"keyword" yaml:"keyword"`
	DateCreated        time.Time `json:"date-created" yaml:"date-created"`
	PID                int       `json:"pid" yaml:"pid"`
}

Project ...

func ReadFile

func ReadFile(path string) *Project

ReadFile ...

Jump to

Keyboard shortcuts

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