etc

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigDirName added in v0.0.2

func GetConfigDirName() string

func GetConfigDirPath added in v0.0.2

func GetConfigDirPath() (string, error)

func GetConfigFileName added in v0.0.2

func GetConfigFileName() string

func GetConfigFilePath added in v0.0.2

func GetConfigFilePath() (string, error)

func PanicIfErrorExist

func PanicIfErrorExist(err error)

Types

type Config

type Config struct {
	Services []*ServiceConfig
}

func (*Config) FindServiceConfig added in v0.0.2

func (c *Config) FindServiceConfig(host string) (*ServiceConfig, bool)

func (*Config) FindServiceConfigs added in v0.0.2

func (c *Config) FindServiceConfigs(host string) *Config

func (*Config) FindServiceConfigsByType added in v0.0.2

func (c *Config) FindServiceConfigsByType(serviceType string) *Config

func (*Config) ListServiceConfigHost added in v0.0.2

func (c *Config) ListServiceConfigHost() (hosts []string)

type HostType

type HostType int
const (
	HOST_TYPE_GITHUB HostType = iota + 1
	HOST_TYPE_GITLAB
	HOST_TYPE_BITBUCKET
	HOST_TYPE_GITBUCKET
)

func (HostType) String

func (s HostType) String() string

type ServiceConfig

type ServiceConfig struct {
	Host     string
	Type     string
	Token    string `mapstructure:"oauth_token" yaml:"oauth_token"`
	Protocol string
}

Jump to

Keyboard shortcuts

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