config

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ENV_VAR = "CONFIG"

Variables

This section is empty.

Functions

This section is empty.

Types

type AtlassianConfig

type AtlassianConfig struct {
	Host                   string `json:"host"`
	MaxActivityLookup      int    `json:"max_activity_lookup"`
	ConcurrentIssueLookups int    `json:"concurrent_issue_lookups"`
	Auth                   struct {
		Username string `json:"username"`
		Password string `json:"password"`
	} `json:"auth"`
}

type Config

type Config struct {
	State            StateConfig             `json:"state"`
	Atlassian        AtlassianConfig         `json:"atlassian"`
	Slack            SlackConfig             `json:"slack"`
	Triggers         []*MessageTrigger       `json:"triggers"`
	CustomJiraFields []CustomJiraFieldConfig `json:"custom_jira_fields"`
	ResourceStorage  ResourceStorageConfig   `json:"resource_storage"`
}

func LoadConfig

func LoadConfig(input io.Reader) (*Config, error)

func LoadConfigEnv

func LoadConfigEnv() (*Config, error)

type CustomJiraFieldConfig

type CustomJiraFieldConfig struct {
	Name      string `json:"name"`
	JiraField string `json:"jira_field"`
}

type MessageTrigger

type MessageTrigger struct {
	SlackChannel string            `json:"slack_channel"`
	Match        map[string]string `json:"match"`
	// contains filtered or unexported fields
}

func (MessageTrigger) GetCompiledMatches

func (mt MessageTrigger) GetCompiledMatches() map[string]*regexp.Regexp

type ResourceStorageConfig

type ResourceStorageConfig struct {
	S3_Bucket             string `json:"s3_bucket"`
	S3_Region             string `json:"s3_region"`
	AWS_Access_Key_ID     string `json:"aws_key"`
	AWS_Secret_Access_Key string `json:"aws_secret"`
}

type SlackConfig

type SlackConfig struct {
	TeamDomain string `json:"team_domain"`
	Auth       struct {
		Token string `json:"token"`
	} `json:"auth"`
	Users map[string]SlackUser `json:"users"`
}

type SlackUser

type SlackUser struct {
	Name      string `json:"name"`
	IconUrl   string `json:"icon_url"`
	IconEmoji string `json:"icon_emoji"`
}

type StateConfig

type StateConfig struct {
	Driver string      `json:"redis"`
	Host   string      `json:"host"`
	Port   int         `json:"port"`
	DB     interface{} `json:"db"`
}

Jump to

Keyboard shortcuts

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