common

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveContributor

type ActiveContributor struct {
	Login          string    `json:"login"`
	Contributions  int       `json:"contributions"`
	LastActiveDate time.Time `json:"last_active_date"`
}

ActiveContributor represents a contributor's activity stats

type ActiveContributorsResponse

type ActiveContributorsResponse struct {
	RepoName           string              `json:"repo_name"`
	TimeRange          string              `json:"time_range"`
	ActiveContributors []ActiveContributor `json:"active_contributors"`
}

ActiveContributorsResponse represents the response for active contributors

type AssetStats

type AssetStats struct {
	Name          string `json:"name"`
	DownloadCount int    `json:"download_count"`
}

AssetStats represents download statistics for a single asset

type Config

type Config struct {
	GithubToken string
}

type Contributor

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

type DownloadStats

type DownloadStats struct {
	RepoName       string                 `json:"repo_name"`
	TotalDownloads int                    `json:"total_downloads"`
	Releases       []ReleaseDownloadStats `json:"releases"`
}

DownloadStats represents download statistics for all releases

type MultiRepoStarHistory

type MultiRepoStarHistory struct {
	Repositories []StarHistory `json:"repositories"`
}

MultiRepoStarHistory represents star history for multiple repositories

type OrganizationStats

type OrganizationStats struct {
	OrgName           string `json:"org_name"`
	TotalRepos        int    `json:"total_repos"`
	TotalContributors int    `json:"total_contributors"`
}

type PageData

type PageData struct {
	Stargazers []Stargazer
	RepoOwner  string
	RepoName   string
	Error      string
	HasMore    bool
	NextPage   int
	TotalCount int
}

type Release

type Release struct {
	ID        int            `json:"id"`
	TagName   string         `json:"tag_name"`
	CreatedAt time.Time      `json:"created_at"`
	Assets    []ReleaseAsset `json:"assets"`
}

Release represents a GitHub release

type ReleaseAsset

type ReleaseAsset struct {
	Name          string `json:"name"`
	DownloadCount int    `json:"download_count"`
}

ReleaseAsset represents a single asset in a release

type ReleaseDownloadStats

type ReleaseDownloadStats struct {
	TagName        string       `json:"tag_name"`
	CreatedAt      time.Time    `json:"created_at"`
	TotalDownloads int          `json:"total_downloads"`
	Assets         []AssetStats `json:"assets"`
}

ReleaseDownloadStats represents download statistics for a single release

type StarHistory

type StarHistory struct {
	RepoName string      `json:"repo_name"`
	History  []StarPoint `json:"history"`
}

type StarPoint

type StarPoint struct {
	Date  time.Time `json:"date"`
	Stars int       `json:"stars"`
}

StarPoint represents stars at a specific point in time

type Stargazer

type Stargazer struct {
	Login     string    `json:"login"`
	AvatarURL string    `json:"avatar_url"`
	HTMLURL   string    `json:"html_url"`
	Name      string    `json:"name,omitempty"`
	Location  string    `json:"location,omitempty"`
	StarredAt time.Time `json:"starred_at"`
}

type StargazerResponse

type StargazerResponse struct {
	User      User      `json:"user"`
	StarredAt time.Time `json:"starred_at"`
}

type User

type User struct {
	Login     string `json:"login"`
	AvatarURL string `json:"avatar_url"`
	Name      string `json:"name"`
	Location  string `json:"location"`
	HTMLURL   string `json:"html_url"`
}

Jump to

Keyboard shortcuts

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