Documentation
¶
Index ¶
- type RepoStar
- type RepoStars
- type Store
- func (s *Store) Add(repo *github.Repository, stargazer *github.Stargazer) (bool, error)
- func (s *Store) Delete(repo *github.Repository, stargazer *github.Stargazer) (bool, error)
- func (s *Store) Len() int
- func (s *Store) Load() error
- func (s *Store) SetStargazers(repo *github.Repository, stargazers []*github.Stargazer) ([]*github.Stargazer, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
DatabasePath string
Repos map[string]RepoStars
// contains filtered or unexported fields
}
func (*Store) Add ¶
Add adds a stargazer to a repo. Returns true if the stargazer is new. Error indicates a problem saving the store to disk,
func (*Store) Delete ¶
Delete removes a stargazer from a repo. Returns true if the stargazer was present. Error indicates a problem saving the store to disk,
func (*Store) SetStargazers ¶
func (s *Store) SetStargazers(repo *github.Repository, stargazers []*github.Stargazer) ([]*github.Stargazer, error)
SetStargazers sets the stargazers for a repo and returns the new stargazers. It returns an error if it failed to save the store to disk.
Click to show internal directories.
Click to hide internal directories.