useragent

package
v0.260.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserAgent

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

UserAgent represents a Grafana user agent. Its format is "Grafana/<version> (<os>; <arch>)" Example: "Grafana/7.0.0-beta1 (darwin; amd64)", "Grafana/10.0.0 (windows; x86)"

func Empty added in v0.194.0

func Empty() *UserAgent

Empty creates a new UserAgent with default values.

func New

func New(grafanaVersion, os, arch string) (*UserAgent, error)

New creates a new UserAgent. The version must be a valid semver string, and the os and arch must be valid strings.

func Parse

func Parse(s string) (*UserAgent, error)

Parse creates a new UserAgent from a string.

func (*UserAgent) GrafanaVersion

func (ua *UserAgent) GrafanaVersion() string

func (*UserAgent) String

func (ua *UserAgent) String() string

Jump to

Keyboard shortcuts

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