Documentation
¶
Index ¶
- func IsNotFound(err error) bool
- func NewProviderConfigUsageTracker(kube client.Client) resource.Tracker
- type Client
- func (c *Client) CreateCustomProperty(req CreateCustomPropertyRequest) (*CustomProperty, error)
- func (c *Client) CreateGoal(siteDomain string, req CreateGoalRequest) (*Goal, error)
- func (c *Client) CreateGuest(req CreateGuestRequest) (*Guest, error)
- func (c *Client) CreateSharedLink(req CreateSharedLinkRequest) (*SharedLink, error)
- func (c *Client) CreateSite(req CreateSiteRequest) (*Site, error)
- func (c *Client) DeleteCustomProperty(siteDomain, key string) error
- func (c *Client) DeleteGoal(goalID string) error
- func (c *Client) DeleteGuest(siteDomain, email string) error
- func (c *Client) DeleteSharedLink(siteDomain, name string) error
- func (c *Client) DeleteSite(siteID string) error
- func (c *Client) GetCustomProperty(siteDomain, key string) (*CustomProperty, error)
- func (c *Client) GetGoal(siteDomain string, goalID string) (*Goal, error)
- func (c *Client) GetGuest(siteDomain, email string) (*Guest, error)
- func (c *Client) GetSharedLink(siteDomain, name string) (*SharedLink, error)
- func (c *Client) GetSite(siteID string) (*Site, error)
- func (c *Client) GetSiteByDomain(domain string) (*Site, error)
- func (c *Client) ListCustomProperties(siteDomain string) ([]CustomProperty, error)
- func (c *Client) ListGoals(siteDomain string) ([]Goal, error)
- func (c *Client) ListGuests(siteDomain string) ([]Guest, error)
- func (c *Client) ListSharedLinks(siteDomain string) ([]SharedLink, error)
- func (c *Client) ListSites() ([]Site, error)
- func (c *Client) ListTeams() ([]Team, error)
- func (c *Client) UpdateSite(siteID string, newDomain string) (*Site, error)
- type Config
- type CreateCustomPropertyRequest
- type CreateGoalRequest
- type CreateGuestRequest
- type CreateSharedLinkRequest
- type CreateSiteRequest
- type Credentials
- type CustomProperty
- type Goal
- type Guest
- type ListCustomPropertiesResponse
- type ListGoalsResponse
- type ListGuestsResponse
- type ListSharedLinksResponse
- type ListSitesResponse
- type ListTeamsResponse
- type SharedLink
- type Site
- type Team
- type UpdateSiteRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotFound ¶
IsNotFound returns true if the error indicates the resource was not found
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a Plausible API client
func (*Client) CreateCustomProperty ¶ added in v0.2.0
func (c *Client) CreateCustomProperty(req CreateCustomPropertyRequest) (*CustomProperty, error)
CreateCustomProperty creates a custom property
func (*Client) CreateGoal ¶
func (c *Client) CreateGoal(siteDomain string, req CreateGoalRequest) (*Goal, error)
CreateGoal creates a new goal
func (*Client) CreateGuest ¶ added in v0.2.0
func (c *Client) CreateGuest(req CreateGuestRequest) (*Guest, error)
CreateGuest invites a guest to a site
func (*Client) CreateSharedLink ¶ added in v0.2.0
func (c *Client) CreateSharedLink(req CreateSharedLinkRequest) (*SharedLink, error)
CreateSharedLink creates or finds a shared link
func (*Client) CreateSite ¶
func (c *Client) CreateSite(req CreateSiteRequest) (*Site, error)
CreateSite creates a new site
func (*Client) DeleteCustomProperty ¶ added in v0.2.0
DeleteCustomProperty deletes a custom property
func (*Client) DeleteGoal ¶
DeleteGoal deletes a goal
func (*Client) DeleteGuest ¶ added in v0.2.0
DeleteGuest removes a guest from a site
func (*Client) DeleteSharedLink ¶ added in v0.2.0
DeleteSharedLink deletes a shared link
func (*Client) DeleteSite ¶
DeleteSite deletes a site
func (*Client) GetCustomProperty ¶ added in v0.2.0
func (c *Client) GetCustomProperty(siteDomain, key string) (*CustomProperty, error)
GetCustomProperty retrieves a custom property by key
func (*Client) GetSharedLink ¶ added in v0.2.0
func (c *Client) GetSharedLink(siteDomain, name string) (*SharedLink, error)
GetSharedLink retrieves a shared link by name
func (*Client) GetSiteByDomain ¶
GetSiteByDomain retrieves a site by domain
func (*Client) ListCustomProperties ¶ added in v0.2.0
func (c *Client) ListCustomProperties(siteDomain string) ([]CustomProperty, error)
ListCustomProperties retrieves all custom properties for a site
func (*Client) ListGuests ¶ added in v0.2.0
ListGuests retrieves all guests for a site
func (*Client) ListSharedLinks ¶ added in v0.2.0
func (c *Client) ListSharedLinks(siteDomain string) ([]SharedLink, error)
ListSharedLinks retrieves all shared links for a site
type CreateCustomPropertyRequest ¶ added in v0.2.0
type CreateCustomPropertyRequest struct {
SiteDomain string `json:"site_id"`
Key string `json:"key"`
Description string `json:"description,omitempty"`
}
CreateCustomPropertyRequest represents a request to create a custom property
type CreateGoalRequest ¶
type CreateGoalRequest struct {
GoalType string `json:"goal_type"`
EventName string `json:"event_name,omitempty"`
PagePath string `json:"page_path,omitempty"`
}
CreateGoalRequest represents a request to create a goal
type CreateGuestRequest ¶ added in v0.2.0
type CreateGuestRequest struct {
SiteDomain string `json:"site_id"`
Email string `json:"email"`
Role string `json:"role"`
}
CreateGuestRequest represents a request to invite a guest
type CreateSharedLinkRequest ¶ added in v0.2.0
type CreateSharedLinkRequest struct {
}
CreateSharedLinkRequest represents a request to create a shared link
type CreateSiteRequest ¶
type CreateSiteRequest struct {
Domain string `json:"domain"`
TeamID string `json:"team_id,omitempty"`
Timezone string `json:"timezone,omitempty"`
}
CreateSiteRequest represents a request to create a site
type Credentials ¶
type Credentials struct {
APIKey string `json:"apiKey"`
}
Credentials holds the API key for Plausible
type CustomProperty ¶ added in v0.2.0
type CustomProperty struct {
Key string `json:"key"`
Description string `json:"description,omitempty"`
IsEnabled bool `json:"is_enabled"`
}
CustomProperty represents a Plausible custom property
type Goal ¶
type Goal struct {
ID string `json:"id"`
GoalType string `json:"goal_type"`
EventName string `json:"event_name,omitempty"`
PagePath string `json:"page_path,omitempty"`
}
Goal represents a Plausible goal
type Guest ¶ added in v0.2.0
type Guest struct {
Email string `json:"email"`
Role string `json:"role"`
Status string `json:"status"`
InvitedAt string `json:"invited_at,omitempty"`
AcceptedAt string `json:"accepted_at,omitempty"`
}
Guest represents a Plausible site guest
type ListCustomPropertiesResponse ¶ added in v0.2.0
type ListCustomPropertiesResponse struct {
CustomProperties []CustomProperty `json:"custom_properties"`
Meta struct {
After string `json:"after,omitempty"`
Before string `json:"before,omitempty"`
Limit int `json:"limit"`
} `json:"meta"`
}
ListCustomPropertiesResponse represents the response from listing custom properties
type ListGoalsResponse ¶
type ListGoalsResponse struct {
Goals []Goal `json:"goals"`
Meta struct {
After string `json:"after,omitempty"`
Before string `json:"before,omitempty"`
Limit int `json:"limit"`
} `json:"meta"`
}
ListGoalsResponse represents the response from listing goals
type ListGuestsResponse ¶ added in v0.2.0
type ListGuestsResponse struct {
Guests []Guest `json:"guests"`
Meta struct {
After string `json:"after,omitempty"`
Before string `json:"before,omitempty"`
Limit int `json:"limit"`
} `json:"meta"`
}
ListGuestsResponse represents the response from listing guests
type ListSharedLinksResponse ¶ added in v0.2.0
type ListSharedLinksResponse struct {
After string `json:"after,omitempty"`
Before string `json:"before,omitempty"`
Limit int `json:"limit"`
} `json:"meta"`
}
ListSharedLinksResponse represents the response from listing shared links
type ListSitesResponse ¶
type ListSitesResponse struct {
Sites []Site `json:"sites"`
Meta struct {
After string `json:"after,omitempty"`
Before string `json:"before,omitempty"`
Limit int `json:"limit"`
} `json:"meta"`
}
ListSitesResponse represents the response from listing sites
type ListTeamsResponse ¶ added in v0.2.0
type ListTeamsResponse struct {
Teams []Team `json:"teams"`
Meta struct {
After string `json:"after,omitempty"`
Before string `json:"before,omitempty"`
Limit int `json:"limit"`
} `json:"meta"`
}
ListTeamsResponse represents the response from listing teams
type SharedLink ¶ added in v0.2.0
type SharedLink struct {
}
SharedLink represents a Plausible shared link
type Site ¶
type Site struct {
ID string `json:"id"`
Domain string `json:"domain"`
TeamID string `json:"team_id,omitempty"`
Timezone string `json:"timezone,omitempty"`
}
Site represents a Plausible site
type Team ¶ added in v0.2.0
type Team struct {
ID string `json:"id"`
Name string `json:"name"`
APIEnabled bool `json:"api_enabled"`
}
Team represents a Plausible team
type UpdateSiteRequest ¶
type UpdateSiteRequest struct {
Domain string `json:"domain"`
}
UpdateSiteRequest represents a request to update a site