Documentation ¶
Index ¶
- Constants
- Variables
- func ExtractJSONLd(html string) string
- func ExtractLang(html string) string
- func ExtractMicrodata(html string, url string) string
- func ExtractOpengraph(html string) string
- func ExtractRDFA(html string) string
- func ExtractTitle(html string) string
- func FetchPage(url, proxy string, retry, timeout int, userAgent string) (string, error)
- func GetArguments(query string) (string, string, error)
- func GetConfig() *viper.Viper
- func GetInt(v string, d int) int
- func SanitizeHTMLTags(html string) string
- type Article
- type Data
- type Error
- type Image
- type InputData
- type Page
- type TextSpan
Constants ¶
View Source
const ( DEFAULT_ETC_PATH = "/etc/girie" DEFAULT_LOG_TIME_FORMAT = "02.01.2006 15:04:05.000" DEFAULT_LISTEN = ":8080" DEFAULT_PROXY = "" DEFAULT_RETRY = 2 DEFAULT_SPAN_THRESHOLD = 10 DEFAULT_TIMEOUT = 10 LOG_CONFIG_ERROR = "config error" VIPER_DEFAULT_LISTEN = "default.listen" VIPER_DEFAULT_PROXY = "default.proxy" VIPER_DEFAULT_RETRY = "default.retry" VIPER_DEFAULT_TIMEOUT = "default.timeout" VIPER_DEFAULT_USER_AGENT = "default.user_agent" VIPER_ENV_LISTEN = "listen" VIPER_ENV_PROXY = "proxy" VIPER_ENV_RETRY = "retry" VIPER_ENV_TIMEOUT = "timeout" VIPER_ENV_USER_AGENT = "user_agent" )
Variables ¶
View Source
var ( APP_NAME = "girie" APP_VERSION = "devel" DEFAULT_USER_AGENT = APP_NAME + " " + APP_VERSION )
View Source
var Schema, _ = graphql.NewSchema(graphql.SchemaConfig{
Query: rootQuery,
})
Functions ¶
func ExtractJSONLd ¶
func ExtractLang ¶
func ExtractMicrodata ¶
func ExtractOpengraph ¶
func ExtractRDFA ¶
func ExtractTitle ¶
func SanitizeHTMLTags ¶
Types ¶
type Image ¶
type Image struct { Alt string `json:"alt"` Height int `json:"height"` Src string `json:"src"` Width int `json:"width"` }
func ExtractImages ¶
Click to show internal directories.
Click to hide internal directories.