db

package
v0.0.0-...-0f939d0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckRepos

func CheckRepos(repos []string, user *User, dbpath string, apikey string)

func GetDashboardsToUpdate

func GetDashboardsToUpdate() ([]string, *terr.Trace)

func GetRepos

func GetRepos() ([]map[string]string, *terr.Trace)

func Init

func Init(dbpath string)

func SaveActivity

func SaveActivity(activities []Activity, staticPath string)

func SaveFeedUrl

func SaveFeedUrl(user *User, url string)

Types

type Activity

type Activity struct {
	Id        int64
	Title     string
	Content   string
	EventId   string `xorm:"not null unique"`
	EventType string
	Published string
	Updated   string
	Author    int64
	Link      string
}

func GetActivity

func GetActivity() []Activity

type GhCommit

type GhCommit struct {
	Id           int64
	Message      string
	Author       int64  `xorm:"not null"`
	Date         string `xorm:"not null"`
	Hash         string `xorm:"not null unique"`
	Url          string
	Repository   int64 `xorm:"not null"`
	ChangedFiles int64
	Additions    int64
	Deletions    int64
}

type Repository

type Repository struct {
	Id                    int64
	Name                  string `xorm:"not null index"`
	Owner                 int64  `xorm:"not null"`
	CreatedAt             string
	UpdatedAt             string
	Description           string
	DiskUsage             int64
	IsFork                bool
	ForksCount            int64
	LicenseInfo           string
	CommitsCount          int64
	PrimaryLanguage       string
	PushedAt              string
	ReadmeSize            int64
	ReleasesCount         int64
	StarsCount            int64
	WatchersCount         int64
	IssuesCount           int64
	PullRequestsCount     int64
	MentionableUsersCount int64
	CollaboratorsCount    int64
}

func GetRepo

func GetRepo(name string) (Repository, *terr.Trace)

type Result

type Result struct {
	Id         int64
	RepoId     int64
	NumCommits int64
}

type ResultDetails

type ResultDetails struct {
	Commits  int64
	RepoName string
	Owner    string
}

type User

type User struct {
	Id      int64
	Name    string `xorm:"varchar(120) not null unique index"`
	FeedUrl string
}

func GetOrCreateUser

func GetOrCreateUser(username string) (*User, *terr.Trace)

Jump to

Keyboard shortcuts

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