common

package
v2.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2014 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func PanicOn

func PanicOn(err error)

func Slug

func Slug(str string) string

Types

type Commit

type Commit struct {
	Id           int64
	Sha          string `sql:"size(255)"`
	Message      string
	Date         time.Time
	RepositoryId int64
	UserId       int64
}

type CommitOrgStats

type CommitOrgStats struct {
	Id              int64
	Week            time.Time
	OrganizationId  int64
	CommitCount     int64
	NewPullCount    int64
	ClosedPullCount int64
}

type Organization

type Organization struct {
	Id     int64
	Name   string `sql:"size(255)"`
	Login  string `sql:"size(255)"`
	Ignore bool

	Repositories []Repository

	CreatedAt time.Time
}

type Pull

type Pull struct {
	Id           int64
	RepositoryId int64
	Title        string
	Body         string
	Admin        bool
	Number       int64
	State        string
	UserId       int64

	MergedAt    pq.NullTime
	GhCreatedAt pq.NullTime
	GhUpdatedAt pq.NullTime

	CreatedAt time.Time
}

type RepoAggStat

type RepoAggStat struct {
	Id           int64
	RepositoryId int64

	Week    time.Time
	Add     int64
	Del     int64
	Commits int64
}

type RepoStat

type RepoStat struct {
	Id           int64
	RepositoryId int64
	UserId       int64

	Week    time.Time
	Add     int64
	Del     int64
	Commits int64
}

type Repository

type Repository struct {
	Id          int64
	GhId        int64
	Name        string `sql:"size(255)"`
	Forks       int64
	Watchers    int64
	Stargazers  int64
	Size        int64
	OpenIssues  int64
	Description string
	Language    string

	// Stats
	LastCommit  pq.NullTime
	LastPull    pq.NullTime
	CommitCount int64

	OrganizationId int64

	// Accessor Fields
	OrganizationLogin string `sql:-`
	DaysSincePull     int64  `sql:-`
	DaysSinceCommit   int64  `sql:-`

	// Related fields
	Commits      []Commit
	Pulls        []Pull
	Organization Organization
	RepoStat     []RepoStat

	Ignore bool

	CreatedAt time.Time
	UpdatedAt time.Time
}

func (Repository) TableName

func (r Repository) TableName() string

type User

type User struct {
	Id          int64
	GhId        int64
	Login       string `sql:"size(255)"`
	AvatarUrl   string `sql:"size(255)"`
	CommitCount int64
	OrgList     string `sql:"size(255)"`

	Commits []Commit
}

func (*User) FromGhContrib

func (u *User) FromGhContrib(gh_contrib *github.Contributor)

func (*User) FromGhUser

func (u *User) FromGhUser(gh_user *github.User)

Jump to

Keyboard shortcuts

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