{"modulePath":"github.com/thecodearchive/gitarchive","version":"v0.0.0-20160725191345-745d1e8e1931","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package github\n\n## Constants\n\n```go\nconst HourFormat = \"2006-01-02-15\"\n```\n\n## Functions\n\n```go\nfunc DownloadArchive(t time.Time) (io.ReadCloser, error)\n```\n\n```go\nfunc Is404(err error) bool\n```\n\n```go\nfunc IsRateLimit(err error) *github.Rate\n```\n\n## Types\n\n```go\ntype CreateEvent struct {\n\tRefType string `json:\"ref_type\"`\n}\n```\n\n```go\ntype Event struct {\n\tCreatedAt github.Timestamp `json:\"created_at\"`\n\tPayload   json.RawMessage  `json:\"payload\"`\n\tRepo      struct {\n\t\tName string `json:\"name\"`\n\t} `json:\"repo\"`\n\tType string `json:\"type\"`\n}\n```\n\n```go\ntype ForkEvent struct {\n\tForkee struct {\n\t\tFullName string `json:\"full_name\"`\n\t} `json:\"forkee\"`\n}\n```\n\n```go\ntype Repo struct {\n\tStars       int\n\tParent      string\n\tLastUpdated time.Time\n}\n```\n\n```go\nfunc (z Repo) MarshalMsg(b []byte) (o []byte, err error)\n```\nMarshalMsg implements msgp.Marshaler\n\n```go\nfunc (z Repo) Msgsize() (s int)\n```\n\n```go\nfunc (z *Repo) UnmarshalMsg(bts []byte) (o []byte, err error)\n```\nUnmarshalMsg implements msgp.Unmarshaler\n\n```go\ntype StarTracker struct {\n\t// contains filtered or unexported fields\n}\n```\nStarTracker keeps track of how many stars a repository has. It is backed by a db on disk, goes to GitHub for never-seen-before, and it assumes it will be told about every WatchEvent ever since so that it can keep the number accurate without ever going to the network again.\n\nA StarTracker is not safe to use by multiple goroutines at the same time, and it assumes WatchEvents and Gets are submited sequentially anyway. However, it is fully idempotent.\n\n```go\nfunc NewStarTracker(db *bolt.DB, gitHubToken string) *StarTracker\n```\n\n```go\nfunc (s *StarTracker) CreateEvent(name, parent string, created time.Time) error\n```\n\n```go\nfunc (s *StarTracker) Expvar() *expvar.Map\n```\n\n```go\nfunc (s *StarTracker) Get(name string) (stars int, parent string, err error)\n```\n\n```go\nfunc (s *StarTracker) WatchEvent(name string, created time.Time) error\n```\n\n```go\ntype TimelineArchiveReader struct {\n\t// contains filtered or unexported fields\n}\n```\nTimelineArchiveReader reads a .json.gz like those offered by githubarchive.org\n\n```go\nfunc NewTimelineArchiveReader(r io.Reader) (*TimelineArchiveReader, error)\n```\n\n```go\nfunc (t *TimelineArchiveReader) Close() error\n```\n\n```go\nfunc (t *TimelineArchiveReader) Read(e *Event) error\n```\n\n","path":"github.com/thecodearchive/gitarchive/github","name":"github","synopsis":"","isRedistributable":true}
