repo

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const RepoDataFileName string = "gitdog_data.json"

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHubRepo

type GitHubRepo struct {
	Owner      string
	Repository string

	// All contributors, Login as primary key
	Contributors map[string]*github.Contributor

	// Login -> follower users
	Followers map[string][]string

	// Login -> following users
	Followings map[string][]string

	// Members, Login -> user info
	Members map[string]*github.User
}

GitHubRepo Contains all the data we need to analysis a given repository.

func BuildGitHubRepo

func BuildGitHubRepo(client *client.GitHubClient) *GitHubRepo

func Load

func Load(filePath string) *GitHubRepo

func NewRepo

func NewRepo(owner string, repository string) *GitHubRepo

func (*GitHubRepo) AppendFollowers

func (r *GitHubRepo) AppendFollowers(c *github.Contributor, followers []*github.User)

func (*GitHubRepo) AppendFollowings

func (r *GitHubRepo) AppendFollowings(c *github.Contributor, followings []*github.User)

func (*GitHubRepo) Save

func (r *GitHubRepo) Save(filePath string)

func (*GitHubRepo) SetContributors

func (r *GitHubRepo) SetContributors(cs []*github.Contributor)

func (*GitHubRepo) SetMembers

func (r *GitHubRepo) SetMembers(cs []*github.User)

Jump to

Keyboard shortcuts

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