analyze

package
v0.0.0-...-f924fc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DESKTOP = "DESKTOP"
	MOBILE  = "MOBILE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PerfAnalyzer

type PerfAnalyzer struct {
	// contains filtered or unexported fields
}

PerfAnalyzer is a struct that contains the pagespeedonline service

func NewPerfAnalyzer

func NewPerfAnalyzer(apiKey string) *PerfAnalyzer

NewPerfAnalyzer creates a new PerfAnalyzer

func (*PerfAnalyzer) Analyze

func (a *PerfAnalyzer) Analyze(url string, strategy string) (Result, error)

Analyze returns the score of a given url and strategy

type Result

type Result struct {
	URL      string    `json:"url"`
	Strategy string    `json:"strategy"`
	Score    float64   `json:"score"`
	Date     time.Time `json:"date"`
}

Result is a struct that contains the result of the analysis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL