Documentation ¶
Index ¶
- Constants
- func EId() string
- func GetCacheFile() string
- func GetClientSecretPath() string
- func GetHome() string
- func GetMarkdownFileByURL(permalink, contentPath string) (path string, err error)
- func GetTokenPath() string
- func IsContain(items []string, item string) bool
- func IsDir(path string) bool
- func IsFile(path string) bool
- func LastDate(last int) string
- func ParserSearchAnalyticsQuery(rows []*searchconsole.ApiDataRow) map[string]map[string]*KeywordItem
- func ReadFromCmd(tips string) (string, error)
- func RunCommand(cmd string) (string, error)
- func SortKeywords(input map[string]*KeywordItem) []string
- func SortMap(m map[string]float64) []string
- func TodayDate() string
- func UpdateKeywords(filename string, keywords []string) error
- type ByValue
- type KeywordItem
- type KeywordItems
- type PostYaml
Constants ¶
View Source
const ( Name = "gseo" DefaultConfigSubDir = ".gseo" DefaultConfigPath = "$HOME/.gseo" DefaultCfgFileName = "config.yaml" DefaultTokenFileName = "token.json" )
Variables ¶
This section is empty.
Functions ¶
func GetCacheFile ¶
func GetCacheFile() string
func GetClientSecretPath ¶
func GetClientSecretPath() string
func GetMarkdownFileByURL ¶
func GetTokenPath ¶
func GetTokenPath() string
func ParserSearchAnalyticsQuery ¶
func ParserSearchAnalyticsQuery(rows []*searchconsole.ApiDataRow) map[string]map[string]*KeywordItem
ParserSearchAnalyticsQuery parser "PAGE" and "QUERY" Dimensions Query Response
func ReadFromCmd ¶
func RunCommand ¶
RunCommand is a shared function used by check and reload to run the given command. It returns nil if the given cmd returns 0. The command can be run on unix and windows.
func SortKeywords ¶ added in v1.0.2
func SortKeywords(input map[string]*KeywordItem) []string
SortKeywords return sort keywords list by Ctr > Clicks > Position > Impressions, order by value desc
func UpdateKeywords ¶
Types ¶
type ByValue ¶ added in v1.0.2
type ByValue struct{ KeywordItems }
ByValue implements sort.Interface by providing Less and using the Len and Swap methods of the embedded KeywordItems value.
type KeywordItem ¶
type KeywordItems ¶ added in v1.0.2
type KeywordItems []*KeywordItem
func (KeywordItems) Len ¶ added in v1.0.2
func (k KeywordItems) Len() int
func (KeywordItems) Swap ¶ added in v1.0.2
func (k KeywordItems) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.