Documentation ¶
Overview ¶
ctx is magic; it is basically my own "context" package before I realized that "context" existed. ctx.Context is the main construct. It keeps track of information pertinent to the request. It should all eventually be replaced by context.Context from the Go stdlib.
Index ¶
- func GitHubToken() string
- func NewClient() *github.Client
- func NewRubyGemsClient() *rubyGemsClient
- func NewStatsd() *statsd.Client
- type Context
- func (c *Context) Context() gocontext.Context
- func (c *Context) CountStat(name string, value int64, tags []string)
- func (c *Context) CurrentlyAuthedGitHubUser() *github.User
- func (c *Context) GitHubAuthedAs(login string) bool
- func (c *Context) IncrStat(name string, tags []string)
- func (c *Context) Log(format string, args ...interface{})
- func (c *Context) NewError(format string, args ...interface{}) error
- func (c *Context) SetAuthor(author string)
- func (c *Context) SetIssue(owner, repo string, num int)
- func (c *Context) SetRepo(owner, repo string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GitHubToken ¶
func GitHubToken() string
func NewRubyGemsClient ¶
func NewRubyGemsClient() *rubyGemsClient
Types ¶
type Context ¶
type Context struct { GitHub *github.Client Statsd *statsd.Client RubyGems *rubyGemsClient Repo repoRef Issue issueRef // contains filtered or unexported fields }
func NewDefaultContext ¶
func NewDefaultContext() *Context
func (*Context) CurrentlyAuthedGitHubUser ¶
func (*Context) GitHubAuthedAs ¶
Click to show internal directories.
Click to hide internal directories.