config

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RedisChannel - name of a channel for publishing the message to Redis
	RedisChannel = "autodeploy"

	// RepAutodeploy - name the repository on github.com
	RepAutodeploy = "autodeploy"
)

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig()

LoadConfig collects data and writes to variable

Types

type Config

type Config struct {
	Secret       string // Github hook
	Addr         string // Run app
	Destroy      string // Remove all data
	Ssl          Ssl
	Telegram     Telegram
	Repositories Repositories
}

Config for the application

var Data *Config

Data - collected from the config file/.env/default

type Repositories

type Repositories struct {
	Main      Repository
	Docs      Repository
	Websocket Repository
}

Repositories this data from organization

type Repository

type Repository struct {
	Name   string
	Branch string
	Path   string
}

Repository this data from org/rep

type Ssl

type Ssl struct {
	Enable bool
	Crt    string
	Key    string
}

Ssl on "enable" is true, run the server on https

type Telegram

type Telegram struct {
	Enable      bool
	AccessToken string
	UserID      int64
}

Telegram on "enable" is true - send message logs for user in Telegram

Jump to

Keyboard shortcuts

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