config

package
v0.0.0-...-8f0272f Latest Latest
Warning

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

Go to latest
Published: May 7, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GithubFilterMilestone = "milestone"
	GithubFilterState     = "state"
	GithubFilterAssignee  = "assignee"
	GithubFilterCreator   = "creator"
	GithubFilterMentioned = "mentioned"
	GithubFilterLabels    = "lables"
	GithubFilterSort      = "sort"
	GithubFilterDirection = "direction"
	GithubFilterPeriod    = "period"
)
View Source
const (
	OutputFormatText = "text"
	OutputFormatJSON = "json"

	OutputTargetStdout = "stdout"
	OutputTargetFile   = "file"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	Name     string   `yaml:"name"`
	Coeff    int      `yaml:"coeff"`
	Size     int      `yaml:"size"`
	Issues   Issues   `yaml:"issues"`
	Comments Comments `yaml:"comments"`
}

type Comments

type Comments struct {
	Author    int      `yaml:"author"`
	Activity  int      `yaml:"activity"`
	Reactions Reaction `yaml:"reaction"`
}

type Config

type Config struct {
	Github   *Github
	Output   *Output
	Strategy *Strategy
}

func Load

func Load(body []byte) (Config, error)

func LoadFile

func LoadFile(file string) (Config, error)

type Filters

type Filters map[string]string

func (*Filters) Check

func (f *Filters) Check() error

type Github

type Github struct {
	AccessToken string  `yaml:"access_token"`
	Owner       string  `yaml:"owner"`
	Repository  string  `yaml:"repo"`
	Filters     Filters `yaml:"filters"`
}

type Issues

type Issues struct {
	Author    int      `yaml:"author"`
	Activity  int      `yaml:"activity"`
	Reactions Reaction `yaml:"reaction"`
}

type Output

type Output struct {
	Format   string `yaml:"format"`
	Target   string `yaml:"target"`
	FileName string `yaml:"file_name"`
}

type Reaction

type Reaction struct {
	Plus     int `yaml:"plus"`
	Heart    int `yaml:"heart"`
	Laugh    int `yaml:"laugh"`
	Hooray   int `yaml:"hooray"`
	Minus    int `yaml:"minus"`
	Confused int `yaml:"confused"`
	Total    int `yaml:"total"`
}

func (*Reaction) HasCoeff

func (r *Reaction) HasCoeff() bool

type Strategy

type Strategy struct {
	PerPage      int        `yaml:"per_page"`
	PriorAuthors []string   `yaml:"prior_authors"`
	Categories   []Category `yaml:"categories"`
}

func (*Strategy) IsPriorAuthor

func (s *Strategy) IsPriorAuthor(author string) bool

Jump to

Keyboard shortcuts

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