package widgets
import "zgo.at/goatcounter/v2/widgets"
Index ¶
- Variables
- type Args
- type Browsers
- func (w Browsers) Err() error
- func (w *Browsers) GetData(ctx context.Context, a Args) (more bool, err error)
- func (w Browsers) HTML() template.HTML
- func (w Browsers) Label(ctx context.Context) string
- func (w Browsers) Name() string
- func (w Browsers) RenderHTML(ctx context.Context, shared SharedData) (string, interface{})
- func (w *Browsers) SetErr(h error)
- func (w *Browsers) SetHTML(h template.HTML)
- func (w *Browsers) SetSettings(s goatcounter.WidgetSettings)
- func (w Browsers) Settings() goatcounter.WidgetSettings
- func (w Browsers) Type() string
- type List
- func FromSiteWidgets(ctx context.Context, www goatcounter.Widgets, params zint.Bitflag8) List
- func ListAllWidgets() List
- func (l List) Get(name string) Widget
- type Locations
- func (w Locations) Err() error
- func (w *Locations) GetData(ctx context.Context, a Args) (more bool, err error)
- func (w Locations) HTML() template.HTML
- func (w Locations) Label(ctx context.Context) string
- func (w Locations) Name() string
- func (w Locations) RenderHTML(ctx context.Context, shared SharedData) (string, interface{})
- func (w *Locations) SetErr(h error)
- func (w *Locations) SetHTML(h template.HTML)
- func (w *Locations) SetSettings(s goatcounter.WidgetSettings)
- func (w Locations) Settings() goatcounter.WidgetSettings
- func (w Locations) Type() string
- type Max
- func (w Max) Err() error
- func (w *Max) GetData(ctx context.Context, a Args) (more bool, err error)
- func (w Max) HTML() template.HTML
- func (w Max) Label(ctx context.Context) string
- func (w Max) Name() string
- func (w Max) RenderHTML(context.Context, SharedData) (string, interface{})
- func (w *Max) SetErr(h error)
- func (w *Max) SetHTML(h template.HTML)
- func (w *Max) SetSettings(s goatcounter.WidgetSettings)
- func (w Max) Settings() goatcounter.WidgetSettings
- func (w Max) Type() string
- type Pages
- func (w Pages) Err() error
- func (w *Pages) GetData(ctx context.Context, a Args) (bool, error)
- func (w Pages) HTML() template.HTML
- func (w Pages) Label(ctx context.Context) string
- func (w Pages) Name() string
- func (w Pages) RenderHTML(ctx context.Context, shared SharedData) (string, interface{})
- func (w *Pages) SetErr(h error)
- func (w *Pages) SetHTML(h template.HTML)
- func (w *Pages) SetSettings(s goatcounter.WidgetSettings)
- func (w Pages) Settings() goatcounter.WidgetSettings
- func (w Pages) Type() string
- type SharedData
- type Sizes
- func (w Sizes) Err() error
- func (w *Sizes) GetData(ctx context.Context, a Args) (more bool, err error)
- func (w Sizes) HTML() template.HTML
- func (w Sizes) Label(ctx context.Context) string
- func (w Sizes) Name() string
- func (w Sizes) RenderHTML(ctx context.Context, shared SharedData) (string, interface{})
- func (w *Sizes) SetErr(h error)
- func (w *Sizes) SetHTML(h template.HTML)
- func (w *Sizes) SetSettings(s goatcounter.WidgetSettings)
- func (w Sizes) Settings() goatcounter.WidgetSettings
- func (w Sizes) Type() string
- type Systems
- func (w Systems) Err() error
- func (w *Systems) GetData(ctx context.Context, a Args) (more bool, err error)
- func (w Systems) HTML() template.HTML
- func (w Systems) Label(ctx context.Context) string
- func (w Systems) Name() string
- func (w Systems) RenderHTML(ctx context.Context, shared SharedData) (string, interface{})
- func (w *Systems) SetErr(h error)
- func (w *Systems) SetHTML(h template.HTML)
- func (w *Systems) SetSettings(s goatcounter.WidgetSettings)
- func (w Systems) Settings() goatcounter.WidgetSettings
- func (w Systems) Type() string
- type TopRefs
- func (w TopRefs) Err() error
- func (w *TopRefs) GetData(ctx context.Context, a Args) (more bool, err error)
- func (w TopRefs) HTML() template.HTML
- func (w TopRefs) Label(ctx context.Context) string
- func (w TopRefs) Name() string
- func (w TopRefs) RenderHTML(ctx context.Context, shared SharedData) (string, interface{})
- func (w *TopRefs) SetErr(h error)
- func (w *TopRefs) SetHTML(h template.HTML)
- func (w *TopRefs) SetSettings(s goatcounter.WidgetSettings)
- func (w TopRefs) Settings() goatcounter.WidgetSettings
- func (w TopRefs) Type() string
- type TotalCount
- func (w TotalCount) Err() error
- func (w *TotalCount) GetData(ctx context.Context, a Args) (more bool, err error)
- func (w TotalCount) HTML() template.HTML
- func (w TotalCount) Label(ctx context.Context) string
- func (w TotalCount) Name() string
- func (w TotalCount) RenderHTML(context.Context, SharedData) (string, interface{})
- func (w *TotalCount) SetErr(h error)
- func (w *TotalCount) SetHTML(h template.HTML)
- func (w *TotalCount) SetSettings(s goatcounter.WidgetSettings)
- func (w TotalCount) Settings() goatcounter.WidgetSettings
- func (w TotalCount) Type() string
- type TotalPages
- func (w TotalPages) Err() error
- func (w *TotalPages) GetData(ctx context.Context, a Args) (more bool, err error)
- func (w TotalPages) HTML() template.HTML
- func (w TotalPages) Label(ctx context.Context) string
- func (w TotalPages) Name() string
- func (w TotalPages) RenderHTML(ctx context.Context, shared SharedData) (string, interface{})
- func (w *TotalPages) SetErr(h error)
- func (w *TotalPages) SetHTML(h template.HTML)
- func (w *TotalPages) SetSettings(s goatcounter.WidgetSettings)
- func (w TotalPages) Settings() goatcounter.WidgetSettings
- func (w TotalPages) Type() string
- type Widget
Variables ¶
Types ¶
type Args ¶
type Args struct { Rng ztime.Range Offset int PathFilter []int64 Daily bool ForcedDaily bool AsText bool ShowRefs string }
type Browsers ¶
type Browsers struct { Limit int Detail string Stats goatcounter.HitStats // contains filtered or unexported fields }
func (Browsers) Err ¶
func (*Browsers) GetData ¶
func (Browsers) HTML ¶
func (Browsers) Label ¶
func (Browsers) Name ¶
func (Browsers) RenderHTML ¶
func (w Browsers) RenderHTML(ctx context.Context, shared SharedData) (string, interface{})
func (*Browsers) SetErr ¶
func (*Browsers) SetHTML ¶
func (*Browsers) SetSettings ¶
func (w *Browsers) SetSettings(s goatcounter.WidgetSettings)
func (Browsers) Settings ¶
func (w Browsers) Settings() goatcounter.WidgetSettings
func (Browsers) Type ¶
type List ¶
type List []Widget
func FromSiteWidgets ¶
func ListAllWidgets ¶
func ListAllWidgets() List
ListAllWidgets returns a static list of all widgets that this user can add.
func (List) Get ¶
Get a widget from the list by name.
type Locations ¶
type Locations struct { Limit int Detail string Stats goatcounter.HitStats // contains filtered or unexported fields }
func (Locations) Err ¶
func (*Locations) GetData ¶
func (Locations) HTML ¶
func (Locations) Label ¶
func (Locations) Name ¶
func (Locations) RenderHTML ¶
func (w Locations) RenderHTML(ctx context.Context, shared SharedData) (string, interface{})
func (*Locations) SetErr ¶
func (*Locations) SetHTML ¶
func (*Locations) SetSettings ¶
func (w *Locations) SetSettings(s goatcounter.WidgetSettings)
func (Locations) Settings ¶
func (w Locations) Settings() goatcounter.WidgetSettings
func (Locations) Type ¶
type Max ¶
type Max struct { Max int // contains filtered or unexported fields }
func (Max) Err ¶
func (*Max) GetData ¶
func (Max) HTML ¶
func (Max) Label ¶
func (Max) Name ¶
func (Max) RenderHTML ¶
func (w Max) RenderHTML(context.Context, SharedData) (string, interface{})
func (*Max) SetErr ¶
func (*Max) SetHTML ¶
func (*Max) SetSettings ¶
func (w *Max) SetSettings(s goatcounter.WidgetSettings)
func (Max) Settings ¶
func (w Max) Settings() goatcounter.WidgetSettings
func (Max) Type ¶
type Pages ¶
type Pages struct { Ref string Limit, LimitRefs int Display, UniqueDisplay int More bool Pages goatcounter.HitLists Refs goatcounter.HitStats Max int Exclude []int64 // contains filtered or unexported fields }
func (Pages) Err ¶
func (*Pages) GetData ¶
func (Pages) HTML ¶
func (Pages) Label ¶
func (Pages) Name ¶
func (Pages) RenderHTML ¶
func (w Pages) RenderHTML(ctx context.Context, shared SharedData) (string, interface{})
func (*Pages) SetErr ¶
func (*Pages) SetHTML ¶
func (*Pages) SetSettings ¶
func (w *Pages) SetSettings(s goatcounter.WidgetSettings)
func (Pages) Settings ¶
func (w Pages) Settings() goatcounter.WidgetSettings
func (Pages) Type ¶
type SharedData ¶
SharedData gets passed to every widget.
type Sizes ¶
type Sizes struct { Limit int Detail string Stats goatcounter.HitStats // contains filtered or unexported fields }
func (Sizes) Err ¶
func (*Sizes) GetData ¶
func (Sizes) HTML ¶
func (Sizes) Label ¶
func (Sizes) Name ¶
func (Sizes) RenderHTML ¶
func (w Sizes) RenderHTML(ctx context.Context, shared SharedData) (string, interface{})
func (*Sizes) SetErr ¶
func (*Sizes) SetHTML ¶
func (*Sizes) SetSettings ¶
func (w *Sizes) SetSettings(s goatcounter.WidgetSettings)
func (Sizes) Settings ¶
func (w Sizes) Settings() goatcounter.WidgetSettings
func (Sizes) Type ¶
type Systems ¶
type Systems struct { Limit int Detail string Stats goatcounter.HitStats // contains filtered or unexported fields }
func (Systems) Err ¶
func (*Systems) GetData ¶
func (Systems) HTML ¶
func (Systems) Label ¶
func (Systems) Name ¶
func (Systems) RenderHTML ¶
func (w Systems) RenderHTML(ctx context.Context, shared SharedData) (string, interface{})
func (*Systems) SetErr ¶
func (*Systems) SetHTML ¶
func (*Systems) SetSettings ¶
func (w *Systems) SetSettings(s goatcounter.WidgetSettings)
func (Systems) Settings ¶
func (w Systems) Settings() goatcounter.WidgetSettings
func (Systems) Type ¶
type TopRefs ¶
type TopRefs struct { Limit int Ref string TopRefs goatcounter.HitStats // contains filtered or unexported fields }
func (TopRefs) Err ¶
func (*TopRefs) GetData ¶
func (TopRefs) HTML ¶
func (TopRefs) Label ¶
func (TopRefs) Name ¶
func (TopRefs) RenderHTML ¶
func (w TopRefs) RenderHTML(ctx context.Context, shared SharedData) (string, interface{})
func (*TopRefs) SetErr ¶
func (*TopRefs) SetHTML ¶
func (*TopRefs) SetSettings ¶
func (w *TopRefs) SetSettings(s goatcounter.WidgetSettings)
func (TopRefs) Settings ¶
func (w TopRefs) Settings() goatcounter.WidgetSettings
func (TopRefs) Type ¶
type TotalCount ¶
type TotalCount struct { goatcounter.TotalCount NoEvents bool // contains filtered or unexported fields }
func (TotalCount) Err ¶
func (w TotalCount) Err() error
func (*TotalCount) GetData ¶
func (TotalCount) HTML ¶
func (w TotalCount) HTML() template.HTML
func (TotalCount) Label ¶
func (w TotalCount) Label(ctx context.Context) string
func (TotalCount) Name ¶
func (w TotalCount) Name() string
func (TotalCount) RenderHTML ¶
func (w TotalCount) RenderHTML(context.Context, SharedData) (string, interface{})
func (*TotalCount) SetErr ¶
func (w *TotalCount) SetErr(h error)
func (*TotalCount) SetHTML ¶
func (w *TotalCount) SetHTML(h template.HTML)
func (*TotalCount) SetSettings ¶
func (w *TotalCount) SetSettings(s goatcounter.WidgetSettings)
func (TotalCount) Settings ¶
func (w TotalCount) Settings() goatcounter.WidgetSettings
func (TotalCount) Type ¶
func (w TotalCount) Type() string
type TotalPages ¶
type TotalPages struct { Align, NoEvents bool Max int Total goatcounter.HitList // contains filtered or unexported fields }
func (TotalPages) Err ¶
func (w TotalPages) Err() error
func (*TotalPages) GetData ¶
func (TotalPages) HTML ¶
func (w TotalPages) HTML() template.HTML
func (TotalPages) Label ¶
func (w TotalPages) Label(ctx context.Context) string
func (TotalPages) Name ¶
func (w TotalPages) Name() string
func (TotalPages) RenderHTML ¶
func (w TotalPages) RenderHTML(ctx context.Context, shared SharedData) (string, interface{})
func (*TotalPages) SetErr ¶
func (w *TotalPages) SetErr(h error)
func (*TotalPages) SetHTML ¶
func (w *TotalPages) SetHTML(h template.HTML)
func (*TotalPages) SetSettings ¶
func (w *TotalPages) SetSettings(s goatcounter.WidgetSettings)
func (TotalPages) Settings ¶
func (w TotalPages) Settings() goatcounter.WidgetSettings
func (TotalPages) Type ¶
func (w TotalPages) Type() string
type Widget ¶
type Widget interface { GetData(context.Context, Args) (bool, error) RenderHTML(context.Context, SharedData) (string, interface{}) SetHTML(template.HTML) HTML() template.HTML SetErr(error) Err() error SetSettings(goatcounter.WidgetSettings) Settings() goatcounter.WidgetSettings Name() string Type() string // "full-width", "hchart" Label(context.Context) string }
func FromSiteWidget ¶
func NewWidget ¶
Source Files ¶
browsers.go internal.go locations.go pages.go sizes.go systems.go toprefs.go total_pages.go widgets.go
- Version
- v2.1.1
- Published
- Dec 25, 2021
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 2 hours ago –
Tools for package owners.