Documentation
¶
Index ¶
- type Config
- type Github
- type GithubContribs
- type GithubRepo
- type GithubRepos
- type HandlerFunc
- type JsonError
- type Subroutable
- type Subrouter
- func (sr *Subrouter) HtmlResponseHandler(w http.ResponseWriter, r *http.Request, template string, data interface{}) error
- func (sr *Subrouter) InitRouter(r *mux.Router, c *Config, t *Template)
- func (sr *Subrouter) JsonErrorHandler(w http.ResponseWriter, r *http.Request, err error) error
- func (sr *Subrouter) JsonNotFoundHandler(w http.ResponseWriter, r *http.Request) error
- func (sr *Subrouter) JsonResponseHandler(w http.ResponseWriter, r *http.Request, data interface{}) error
- func (sr *Subrouter) RedirectHandler(w http.ResponseWriter, r *http.Request, url string) error
- type Template
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Env string `json:"env"` Listen struct { HTTP string `json:"http"` } `json:"listen"` Github struct { Token string `json:"token"` Username string `json:"username"` } `json:"github"` Template struct { Path string `json:"path"` } `json:"template"` }
func NewConfigFile ¶
type Github ¶
type Github struct { Client *github.Client DocGetter docGetter // contains filtered or unexported fields }
func (*Github) GetContribs ¶
func (g *Github) GetContribs() (*GithubContribs, error)
func (*Github) GetRepos ¶
func (g *Github) GetRepos() (*GithubRepos, error)
type GithubContribs ¶
type GithubRepo ¶
type GithubRepo struct { Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` Fullname *string `json:"fullname,omitempty"` Branch *string `json:"branch,omitempty"` Url *string `json:"url,omitempty"` Language *string `json:"language,omitempty"` Forks *int `json:"forks,omitempty"` Stars *int `json:"stars,omitempty"` Watches *int `json:"watches,omitempty"` Badge *string `json:"badge,omitempty"` }
type GithubRepos ¶
type GithubRepos []GithubRepo
type HandlerFunc ¶
type HandlerFunc func(http.ResponseWriter, *http.Request) error
func (HandlerFunc) ServeHTTP ¶
func (hf HandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Subroutable ¶
type Subrouter ¶
func (*Subrouter) HtmlResponseHandler ¶
func (*Subrouter) InitRouter ¶
func (*Subrouter) JsonErrorHandler ¶
func (*Subrouter) JsonNotFoundHandler ¶
func (*Subrouter) JsonResponseHandler ¶
func (*Subrouter) RedirectHandler ¶
Click to show internal directories.
Click to hide internal directories.