model

package
v0.0.0-...-e115b17 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Rand

func Rand() string

Rand generates a 32-bit random string.

Types

type Comment

type Comment struct {
	Author string
	Body   string
}

type Config

type Config struct {
	Approvals       int    `json:"approvals"         toml:"approvals"`
	Pattern         string `json:"pattern"           toml:"pattern"`
	Team            string `json:"team"              toml:"team"`
	SelfApprovalOff bool   `json:"self_approval_off" toml:"self_approval_off"`
	// contains filtered or unexported fields
}

func ParseConfig

func ParseConfig(data []byte) (*Config, error)

ParseConfig parses a projects .lgtm file

func ParseConfigStr

func ParseConfigStr(data string) (*Config, error)

ParseConfigStr parses a projects .lgtm file in string format.

func (*Config) IsMatch

func (c *Config) IsMatch(text string) bool

IsMatch returns true if the text matches the regular epxression pattern.

type Hook

type Hook struct {
	Repo    *Repo
	Issue   *Issue
	Comment *Comment
}

type Issue

type Issue struct {
	Number int
	Title  string
	Author string
}

type Maintainer

type Maintainer struct {
	People map[string]*Person `json:"people"    toml:"people"`
	Org    map[string]*Org    `json:"org"       toml:"org"`
}

Maintainer represents a MAINTAINERS file.

func FromOrg

func FromOrg(from *Maintainer, name string) (*Maintainer, error)

FromOrg returns a new Maintainer file with a subset of people that are part of the specified org.

func ParseMaintainer

func ParseMaintainer(data []byte) (*Maintainer, error)

ParseMaintainer parses a projects MAINTAINERS file and returns the list of maintainers.

func ParseMaintainerStr

func ParseMaintainerStr(data string) (*Maintainer, error)

ParseMaintainerStr parses a projects MAINTAINERS file in string format and returns the list of maintainers.

type Member

type Member struct {
	Login string `json:"login"`
}

type Org

type Org struct {
	People []string `json:"people" toml:"people"`
}

Org represents a group, team or subset of users.

type Perm

type Perm struct {
	Pull  bool
	Push  bool
	Admin bool
}

type Person

type Person struct {
	Name  string `json:"name"  toml:"name"`
	Email string `json:"email" toml:"email"`
	Login string `json:"login" toml:"login"`
}

Person represets an individual in the MAINTAINERS file.

type Repo

type Repo struct {
	ID      int64  `json:"id,omitempty"       meddler:"repo_id,pk"`
	UserID  int64  `json:"-"                  meddler:"repo_user_id"`
	Owner   string `json:"owner"              meddler:"repo_owner"`
	Name    string `json:"name"               meddler:"repo_name"`
	Slug    string `json:"slug"               meddler:"repo_slug"`
	Link    string `json:"link_url"           meddler:"repo_link"`
	Private bool   `json:"private"            meddler:"repo_private"`
	Secret  string `json:"-"                  meddler:"repo_secret"`
}

type Team

type Team struct {
	Login  string `json:"login"`
	Avatar string `json:"avatar"`
}

type User

type User struct {
	ID     int64  `json:"id"      meddler:"user_id,pk"`
	Login  string `json:"login"   meddler:"user_login"`
	Email  string `json:"email"   meddler:"user_email"`
	Token  string `json:"-"       meddler:"user_token"`
	Avatar string `json:"avatar"  meddler:"user_avatar"`
	Secret string `json:"-"       meddler:"user_secret"`
}

Jump to

Keyboard shortcuts

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