Documentation ¶
Overview ¶
Google Search Console
Index ¶
- Constants
- func ConvertDates(base time.Time, startDate string, endDate string) (start time.Time, end time.Time, err error)
- func ExtractCountPeriod(period string) (int64, error)
- func HostBar(runner runnerFunc, command string) (data []int, err error)
- func HostBox(runner runnerFunc, command string) (string, error)
- func HostCPURate(runner runnerFunc) (float64, error)
- func HostDisk(runner runnerFunc, headers []string, unit string) ([][]string, error)
- func HostDiskIO(runner runnerFunc, unit string) (string, error)
- func HostGauge(runner runnerFunc, command string) (float64, error)
- func HostLoad(runner runnerFunc) (string, error)
- func HostMemory(runner runnerFunc, metrics []string, unit string) (val []int, err error)
- func HostMemoryRate(runner runnerFunc) (float64, error)
- func HostNetIO(runner runnerFunc, unit string) (string, error)
- func HostProcesses(runner runnerFunc) (string, error)
- func HostSwapRate(runner runnerFunc) (float64, error)
- func HostTable(runner runnerFunc, command string, headers []string) (cells [][]string, err error)
- func HostUptime(runner runnerFunc) (int64, error)
- func NewTermUI(d bool) (*termUI, error)
- type AnalyticValues
- type Analytics
- func (c *Analytics) BarMetric(val AnalyticValues) ([]string, []int, error)
- func (c *Analytics) RealTimeUsers(viewID string) (string, error)
- func (c *Analytics) SimpleMetric(val AnalyticValues) (string, error)
- func (c *Analytics) StackedBar(an AnalyticValues) (dim []string, values map[string][]int, err error)
- func (c *Analytics) Table(an AnalyticValues, firstHeader string) (headers []string, dim []string, u [][]string, err error)
- type Feedly
- type FeedlyResponse
- type Git
- type Github
- func (g *Github) CountCommits(repository string, scope string, startWeek int64, endWeek int64, ...) ([]string, []int, error)
- func (g *Github) CountStars(repository string, startDate, endDate time.Time) (dim []string, val []int, err error)
- func (g *Github) ListBranches(repository string, limit int) ([][]string, error)
- func (g *Github) ListIssues(repository string, limit int) ([][]string, error)
- func (g *Github) ListPullRequests(repository string, limit int) ([][]string, error)
- func (g *Github) ListRepo(limit int, order string, metrics []string) ([][]string, error)
- func (g *Github) TotalOpenIssues(repository string) (int, error)
- func (g *Github) TotalStars(repository string) (int, error)
- func (g *Github) TotalWatchers(repository string) (int, error)
- func (g *Github) Views(repository string, days int) ([]string, []int, error)
- type Host
- type SearchConsole
- type SearchConsoleResponse
- type TravisCI
Constants ¶
const ( // Determine if the time will be display as x-axis headers, or something else XHeaderTime uint16 = iota XHeaderOtherDim )
Variables ¶
This section is empty.
Functions ¶
func ConvertDates ¶
func ConvertDates( base time.Time, startDate string, endDate string, ) (start time.Time, end time.Time, err error)
ConvertDates from configuration string values to formatted start date / end date with layout. Example: "next_month" => startDate "2019-01-01", endDate "2019-01-31".
func ExtractCountPeriod ¶
ExtractCountPeriod from a period like "5_weeks_ago". Return the count of the period, "5" in the case of "5_weeks_ago".
func HostCPURate ¶
func HostDiskIO ¶
func HostMemory ¶
func HostMemoryRate ¶
func HostProcesses ¶
func HostUptime ¶
Types ¶
type AnalyticValues ¶
type AnalyticValues struct { ViewID string StartDate string EndDate string TimePeriod string Global bool Metrics []string Dimensions []string Filters []string Orders []string RowLimit int64 XHeaders uint16 }
AnalyticValues which can be possibly send to the Google Analytics API. This is a pure value object without behavior.
type Analytics ¶
type Analytics struct {
// contains filtered or unexported fields
}
Analytics connect to Google Analytics API.
func NewAnalyticsClient ¶
NewAnalyticsClient to connect to Google Analytics APIs.
func (*Analytics) BarMetric ¶
func (c *Analytics) BarMetric(val AnalyticValues) ([]string, []int, error)
BarMetric provides a qualitive dimension linked to a quantitative value, for example a date (dimension) with an int.
func (*Analytics) RealTimeUsers ¶
RealTimeUsers return the number of visitor currently on the website.
func (*Analytics) SimpleMetric ¶
func (c *Analytics) SimpleMetric(val AnalyticValues) (string, error)
SimpleMetric get a value depending on Google Analytics metrics.
func (*Analytics) StackedBar ¶
func (c *Analytics) StackedBar(an AnalyticValues) (dim []string, values map[string][]int, err error)
StackedBar returns one dimension set linked with multiple values.
type Feedly ¶
func (*Feedly) Subscribers ¶
type FeedlyResponse ¶
type FeedlyResponse struct {
Results []map[string]interface{} `json:"results"`
}
type Github ¶
type Github struct {
// contains filtered or unexported fields
}
Github structure connects to the Github API.
func NewGithubClient ¶
GithubClient to fetch Github related data.
func (*Github) CountCommits ¶
func (g *Github) CountCommits( repository string, scope string, startWeek int64, endWeek int64, startDate time.Time, ) ([]string, []int, error)
CountCommits of a repository overtime.
func (*Github) CountStars ¶
func (g *Github) CountStars(repository string, startDate, endDate time.Time) (dim []string, val []int, err error)
CountStars of a repository overtime. Only on a daily basis for now.
func (*Github) ListBranches ¶
ListBranches of a repository.
func (*Github) ListIssues ¶
ListIssues of a repository.
func (*Github) ListPullRequests ¶
ListPullRequests of a repository.
func (*Github) TotalOpenIssues ¶
TotalOpenIssues of a repository overtime.
func (*Github) TotalStars ¶
TotalStars of a repository.
func (*Github) TotalWatchers ¶
TotalWatchers of a repository overtime.
type SearchConsole ¶
type SearchConsole struct {
// contains filtered or unexported fields
}
SearchConsole connect to the Google Search Console API.
func NewSearchConsoleClient ¶
func NewSearchConsoleClient(keyfile string) (*SearchConsole, error)
NewSearchConsoleClient create a SearchConsole.