Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GUID ¶
type GUID struct {
Rendered string `json:"rendered"`
}
GUID contains a globally unique identifier
type Metric ¶
type Metric struct {
Page string `json:"page"`
ContentSize int `json:"content_size"`
PageLoad float64 `json:"page_load"`
ResourceLoad float64 `json:"resource_load"`
TotalLoad float64 `json:"total_load"`
}
Metric contains load times in milliseconds
type Page ¶
type Page struct {
Date string `json:"date"`
DateGmt string `json:"date_gmt"`
GUID GUID `json:"guid"`
ID int `json:"id"`
Link string `json:"link"`
Modified string `json:"modified"`
ModifiedGmt string `json:"modified_gmt"`
Slug string `json:"slug"`
Status string `json:"status"`
Type string `json:"type"`
Parent int `json:"parent"`
Title Title `json:"title"`
Content Content `json:"content"`
Author int `json:"author"`
Excerpt Excerpt `json:"excerpt"`
FeaturedMedia int `json:"featured_media"`
CommentStatus string `json:"comment_status"`
PingStatus string `json:"ping_status"`
MenuOrder int `json:"menu_order"`
Meta Metas `json:"meta"`
Template string `json:"template"`
}
Page represents a WordPress page
func (*Page) GetPageMetrics ¶
GetPageMetrics calculates the time in milliseconds to load the page and resources
type Title ¶
type Title struct {
Rendered string `json:"rendered"`
}
Title contains the rendered page name
type WordPress ¶
type WordPress struct {
Initialized bool
}
WordPress is our client object
func (*WordPress) CollectMetrics ¶
CollectMetrics is called by Snap-Telemetry to gather metrics
func (*WordPress) GetConfigPolicy ¶
func (w *WordPress) GetConfigPolicy() (plugin.ConfigPolicy, error)
GetConfigPolicy returns the configPolicy for your plugin
Click to show internal directories.
Click to hide internal directories.