config

package
v3.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LineNotifyCallbackURL

func LineNotifyCallbackURL() string

LineNotifyCallbackURL returns LINE Notify callback URL

func Load

func Load(path string) error

Load loads config file

func MustLoad

func MustLoad(path string)

MustLoad loads config file it causes panic if failed

Types

type App

type App struct {
	BaseURL string
}

App represents app entire settings

type Config

type Config struct {
	App                App
	Twitter            Twitter
	LineBot            LineBot
	GoogleCustomSearch GoogleCustomSearch
	LineNotify         LineNotify
}

Config represents all settings

var (
	C   Config
	JST = time.FixedZone("Asia/Tokyo", 9*60*60)
)

type GoogleCustomSearch

type GoogleCustomSearch struct {
	ApiID  string
	ApiKey string
}

GoogleCustomSearch represents google custom search api settings

type LineBot

type LineBot struct {
	ChannelSecret string
	ChannelToken  string
}

LineBot represents LINE Bot settings

type LineNotify

type LineNotify struct {
	ClientID     string
	ClientSecret string
	TokenKey     string
	Disabled     bool
}

LineNotify represents LINE Notify settings

type Twitter

type Twitter struct {
	ConsumerKey       string
	ConsumerSecret    string
	AccessToken       string
	AccessTokenSecret string
	Disabled          bool
}

Twitter represents twitter settings

Jump to

Keyboard shortcuts

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