github

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewScorer

func NewScorer(junoCfg config.Config) profilesscore.Scorer

NewScorer returns a new Scorer instance

Types

type Config

type Config struct {
	AppID              int64  `yaml:"app_id"`
	InstallationID     int64  `yaml:"installation_id"`
	PrivateKeyFilePath string `yaml:"private_key_file_path"`
}

func UnmarshalConfig

func UnmarshalConfig(bz []byte) (*Config, error)

type ScoreDetails

type ScoreDetails struct {
	CreatedAt               time.Time `json:"created_at"`
	FollowersCount          uint64    `json:"followers_count"`
	FollowingCount          uint64    `json:"following_count"`
	PublicRepositoriesCount uint64    `json:"public_repositories_count"`
	PublicGistsCount        uint64    `json:"public_gists_count"`
}

func NewScoreDetails

func NewScoreDetails(createdAt time.Time, followersCount, followingCount, publicReposCount, publicGistsCount uint64) *ScoreDetails

func (*ScoreDetails) GetScore

func (d *ScoreDetails) GetScore() (score uint64)

GetScore implements types.ProfileScoreDetails

type Scorer

type Scorer struct {
	// contains filtered or unexported fields
}

func (*Scorer) GetRateLimit

func (s *Scorer) GetRateLimit() *profilesscore.ScoreRateLimit

GetRateLimit implements Scorer

func (*Scorer) GetScoreDetails

func (s *Scorer) GetScoreDetails(_ string, application string, username string) (types.ProfileScoreDetails, error)

GetScoreDetails implements Scorer

func (*Scorer) GetUser

func (s *Scorer) GetUser(username string) (*github.User, error)

GetUser returns the GitHub data of the user having the given username

Jump to

Keyboard shortcuts

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