conf

package
v0.0.0-...-e37b44a Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LocalSourceType = "local"
	GitSourceType   = "git"

	DefaultBaseUrl = "https://api.atlassian.com"
)

Variables

This section is empty.

Functions

func AddRepositoryPathToGitActionFilepaths

func AddRepositoryPathToGitActionFilepaths(mappings ActionMappings, repositories git.Repositories)

func PrepareLogFormat

func PrepareLogFormat() logrus.Formatter

Types

type ActionMappings

type ActionMappings map[ActionName]MappedAction

func (ActionMappings) GitActions

func (m ActionMappings) GitActions() []git.Options

type ActionName

type ActionName string

type ActionSpecifications

type ActionSpecifications struct {
	ActionMappings ActionMappings `json:"actionMappings" yaml:"actionMappings"`
	GlobalFlags    Flags          `json:"globalFlags" yaml:"globalFlags"`
	GlobalArgs     []string       `json:"globalArgs" yaml:"globalArgs"`
	GlobalEnv      []string       `json:"globalEnv" yaml:"globalEnv"`
}

type Configuration

type Configuration struct {
	ActionSpecifications `yaml:",inline"`
	AppName              string     `json:"appName" yaml:"appName"`
	ApiKey               string     `json:"apiKey" yaml:"apiKey"`
	BaseUrl              string     `json:"baseUrl" yaml:"baseUrl"`
	PollerConf           PollerConf `json:"pollerConf" yaml:"pollerConf"`
	PoolConf             PoolConf   `json:"poolConf" yaml:"poolConf"`
	LogLevel             string     `json:"logLevel" yaml:"logLevel"`
	LogrusLevel          logrus.Level
}

func Read

func Read() (*Configuration, error)

type Flags

type Flags map[string]string

func (Flags) Args

func (f Flags) Args() []string

type MappedAction

type MappedAction struct {
	Type       string      `json:"type" yaml:"type"`
	SourceType string      `json:"sourceType" yaml:"sourceType"`
	GitOptions git.Options `json:"gitOptions" yaml:"gitOptions"`
	Filepath   string      `json:"filepath" yaml:"filepath"`
	Flags      Flags       `json:"flags" yaml:"flags"`
	Args       []string    `json:"args" yaml:"args"`
	Env        []string    `json:"env" yaml:"env"`
	Stdout     string      `json:"stdout" yaml:"stdout"`
	Stderr     string      `json:"stderr" yaml:"stderr"`
}

func (*MappedAction) UnmarshalJSON

func (action *MappedAction) UnmarshalJSON(b []byte) error

func (*MappedAction) UnmarshalYAML

func (action *MappedAction) UnmarshalYAML(unmarshal func(interface{}) error) error

type PollerConf

type PollerConf struct {
	PollingWaitIntervalInMillis time.Duration `json:"pollingWaitIntervalInMillis" yaml:"pollingWaitIntervalInMillis"`
	VisibilityTimeoutInSeconds  int64         `json:"visibilityTimeoutInSeconds" yaml:"visibilityTimeoutInSeconds"`
	MaxNumberOfMessages         int64         `json:"maxNumberOfMessages" yaml:"maxNumberOfMessages"`
}

type PoolConf

type PoolConf struct {
	MaxNumberOfWorker        int32         `json:"maxNumberOfWorker" yaml:"maxNumberOfWorker"`
	MinNumberOfWorker        int32         `json:"minNumberOfWorker" yaml:"minNumberOfWorker"`
	QueueSize                int32         `json:"queueSize" yaml:"queueSize"`
	KeepAliveTimeInMillis    time.Duration `json:"keepAliveTimeInMillis" yaml:"keepAliveTimeInMillis"`
	MonitoringPeriodInMillis time.Duration `json:"monitoringPeriodInMillis" yaml:"monitoringPeriodInMillis"`
}

Jump to

Keyboard shortcuts

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