configs

package
v0.0.0-...-8a6ce60 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cipher

func Cipher()

Cipher is to decrypt encrypted value of toml file

func New

func New(file string, cipherFlg bool)

New is for creating config instance

func SetTomlPath

func SetTomlPath(path string)

SetTomlPath is to set toml file path

Types

type Config

type Config struct {
	Git   *GitConfig
	Slack *SlackConfig
}

Config is root of toml config

func GetConf

func GetConf() *Config

GetConf is to get config instance by singleton architecture

type GitBranchConfig

type GitBranchConfig struct {
	From string `toml:"from"`
	To   string `toml:"to"`
}

GitRepoConfig is for git repository

type GitConfig

type GitConfig struct {
	Encrypted bool            `toml:"encrypted"`
	Repo      []GitRepoConfig `toml:"repository"`
}

GitConfig is for github

type GitRepoConfig

type GitRepoConfig struct {
	Url    string            `toml:"url"`
	Name   string            `toml:"name"`
	Branch []GitBranchConfig `toml:"branch"`
}

GitRepoConfig is for git repository

type SlackConfig

type SlackConfig struct {
	Encrypted bool   `toml:"encrypted"`
	Key       string `toml:"key"`
}

SlackConfig is for slack

Jump to

Keyboard shortcuts

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