application

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name is a application name.
	Name = "duci"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Server *Server `yaml:"server" json:"server"`
	GitHub *GitHub `yaml:"github" json:"github"`
	Job    *Job    `yaml:"job" json:"job"`
}

Configuration of application.

var (
	// Config is a application configuration.
	Config *Configuration
)

func (*Configuration) Addr

func (c *Configuration) Addr() string

Addr returns a string of server port

func (*Configuration) Set

func (c *Configuration) Set(path string) error

Set configuration with file path

func (*Configuration) String

func (c *Configuration) String() string

String returns values of configuration

func (*Configuration) Timeout added in v0.2.0

func (c *Configuration) Timeout() time.Duration

Timeout returns timeout duration.

func (*Configuration) Type added in v0.6.0

func (c *Configuration) Type() string

Type returns value type of itself

type GitHub added in v0.3.0

type GitHub struct {
	SSHKeyPath string     `yaml:"ssh_key_path" json:"sshKeyPath"`
	APIToken   maskString `yaml:"api_token" json:"apiToken"`
}

GitHub describes a configuration of github.

type Job added in v0.2.0

type Job struct {
	Timeout     int64 `yaml:"timeout" json:"timeout"`
	Concurrency int   `yaml:"concurrency" json:"concurrency"`
}

Job describes a configuration of each jobs.

type Server

type Server struct {
	WorkDir      string `yaml:"workdir" json:"workdir"`
	Port         int    `yaml:"port" json:"port"`
	DatabasePath string `yaml:"database_path" json:"databasePath"`
}

Server describes a configuration of server.

Directories

Path Synopsis
service
docker/mock_docker
Package mock_docker is a generated GoMock package.
Package mock_docker is a generated GoMock package.
git
git/mock_git
Package mock_git is a generated GoMock package.
Package mock_git is a generated GoMock package.
github/mock_github
Package mock_github is a generated GoMock package.
Package mock_github is a generated GoMock package.
logstore/mock_logstore
Package mock_logstore is a generated GoMock package.
Package mock_logstore is a generated GoMock package.
runner/mock_runner
Package mock_runner is a generated GoMock package.
Package mock_runner is a generated GoMock package.

Jump to

Keyboard shortcuts

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