useragent

package
v0.191.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 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 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