Documentation
¶
Index ¶
- func AuthorizeURL(cfg *config.GSCConfig, state string) string
- func ExchangeCode(ctx context.Context, cfg *config.GSCConfig, code string) (*oauth2.Token, error)
- func OAuthConfig(cfg *config.GSCConfig) *oauth2.Config
- type AnalyticsRow
- type BatchCallback
- type Client
- func (c *Client) FetchSearchAnalytics(ctx context.Context, propertyURL, startDate, endDate string, ...) (int, error)
- func (c *Client) FetchURLInspection(ctx context.Context, propertyURL string, urls []string) ([]InspectionRow, error)
- func (c *Client) ListProperties(ctx context.Context) ([]Property, error)
- func (c *Client) ListSitemaps(ctx context.Context, propertyURL string) ([]Sitemap, error)
- type InspectionRow
- type Property
- type Sitemap
- type SitemapContent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExchangeCode ¶
Types ¶
type AnalyticsRow ¶
type BatchCallback ¶
type BatchCallback func(rows []AnalyticsRow, totalSoFar int) error
BatchCallback is called after each batch of rows is fetched from the API. rows contains the current batch; totalSoFar is the running total of rows fetched.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientFromTokens ¶
func NewClientFromTokens(ctx context.Context, cfg *config.GSCConfig, accessToken, refreshToken string, expiry time.Time) (*Client, *oauth2.Token, error)
NewClientFromTokens creates a client from raw token strings, refreshing if needed.
func (*Client) FetchSearchAnalytics ¶
func (*Client) FetchURLInspection ¶
func (*Client) ListProperties ¶
type InspectionRow ¶
type SitemapContent ¶
Click to show internal directories.
Click to hide internal directories.