gh_model

package
v0.0.0-...-cb0c101 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GroupRepoListByLang

func GroupRepoListByLang(repos []*Repository) map[string][]*Repository

func SortRepoListByLang

func SortRepoListByLang(repos []*Repository)

func StatRepoListByLang

func StatRepoListByLang(repos []*Repository) map[string]int

Types

type RepoList

type RepoList []*Repository

func (RepoList) GetRepoFullNameMap

func (r RepoList) GetRepoFullNameMap() map[string]*Repository

func (RepoList) GetRepoFullNameTopic

func (r RepoList) GetRepoFullNameTopic() map[string][]string

func (RepoList) GetRepoWithTopic

func (r RepoList) GetRepoWithTopic(topic string) map[string][]*Repository

func (RepoList) SortRepoListByCreateTime

func (r RepoList) SortRepoListByCreateTime()

func (RepoList) StatRepoListByByCreateTime

func (r RepoList) StatRepoListByByCreateTime() map[string]int

type Repository

type Repository struct {
	ID           int64                  `json:"id,omitempty" gorm:"uniqueIndex"`
	Name         string                 `json:"name,omitempty"`
	FullName     string                 `json:"full_name,omitempty" gorm:"uniqueIndex"`
	Description  string                 `json:"description,omitempty"`
	Language     string                 `json:"language,omitempty"`
	Visibility   string                 `json:"visibility,omitempty"`
	Topics       custom.StringArrayJson `json:"topics,omitempty" gorm:"type:text"`
	LabelsURL    string                 `json:"labels_url,omitempty"`
	LanguagesURL string                 `json:"languages_url,omitempty"`
	CreatedAt    *github.Timestamp
}

type User

type User struct {
	ID          int64  `json:"id,omitempty"`
	NodeID      string `json:"node_id,omitempty"`
	AvatarURL   string `json:"avatar_url,omitempty"`
	Name        string `json:"name,omitempty"`
	Company     string `json:"company,omitempty"`
	Blog        string `json:"blog,omitempty"`
	Location    string `json:"location,omitempty"`
	Email       string `json:"email,omitempty"`
	PublicRepos int    `json:"public_repos,omitempty"`
	Followers   int    `json:"followers,omitempty"`
	Following   int    `json:"following,omitempty"`
	//CreatedAt   github.Timestamp `json:"created_at,omitempty"`
	//UpdatedAt   github.Timestamp `json:"updated_at,omitempty"`
	//SuspendedAt github.Timestamp `json:"suspended_at,omitempty"`
	Starred []Repository `gorm:"many2many:user_starred;"`
}

Jump to

Keyboard shortcuts

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