Documentation ¶
Index ¶
- Variables
- func ExtractRepositoryID(u *url.URL) (string, error)
- type Handler
- type Message
- type Repositories
- type Repository
- type Store
- func (s *Store) AddMessage(m *Message) error
- func (s *Store) Close() error
- func (s *Store) MarkNotified(repositoryID string) error
- func (s *Store) Open() error
- func (s *Store) Path() string
- func (s *Store) Repositories() (a []*Repository, err error)
- func (s *Store) Repository(id string) (r *Repository, err error)
- func (s *Store) TopRepositories() (m map[string]*Repository, err error)
- func (s *Store) WriteTo(w io.Writer) (n int64, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrRepositoryNotFound is returned when operating on a non-existent repo. ErrRepositoryNotFound = errors.New("repository not found") )
Functions ¶
Types ¶
type Handler ¶
type Handler struct {
Store *Store
}
Handler represents an HTTP interface to the store.
type Repositories ¶
type Repositories []*Repository
Repositories represents a sortable list of repositories.
func (Repositories) Len ¶
func (p Repositories) Len() int
func (Repositories) Less ¶
func (p Repositories) Less(i, j int) bool
func (Repositories) Swap ¶
func (p Repositories) Swap(i, j int)
type Repository ¶
type Repository struct { ID string Description string Language string Notified bool Messages []*Message }
Repository represents a code repository.
func (*Repository) Name ¶
func (r *Repository) Name() string
Name returns the name of the repository.
type Store ¶
type Store struct { // The remote backing store. RemoteStore interface { Repository(id string) (*Repository, error) } // contains filtered or unexported fields }
Store represents the data storage for storing messages received and sent. The store acts as a cache to the backing remote store for repository info.
func (*Store) AddMessage ¶
AddMessage adds a message related to a repository. Retrieves repository data from the remote store, if needed.
func (*Store) MarkNotified ¶
MarkNotified flags a repository as notified.
func (*Store) Repositories ¶
func (s *Store) Repositories() (a []*Repository, err error)
Repositories returns all repositories.
func (*Store) Repository ¶
func (s *Store) Repository(id string) (r *Repository, err error)
Repository returns a repository by id.
func (*Store) TopRepositories ¶
func (s *Store) TopRepositories() (m map[string]*Repository, err error)
TopRepositories returns the most mentioned repositories by language.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Package internal is a generated protocol buffer package.
|
Package internal is a generated protocol buffer package. |
Click to show internal directories.
Click to hide internal directories.