useragent

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

README

User-Agent used by the CLI in its API requests to the backend.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvType

type EnvType int

Type of environment where the CLI is running.

const (
	// CLI running as native binary on a host.
	ENV_HOST EnvType = iota

	// CLI running from our docker image.
	ENV_DOCKER
)

func (EnvType) String

func (e EnvType) String() string

type UA

type UA struct {
	// Semantic version of the CLI.
	Version *ver.Version

	// OS and architecture that the CLI is running on.
	OS   string
	Arch string

	EnvType EnvType
}

func FromString

func FromString(s string) (UA, error)

func (UA) String

func (ua UA) String() string

Jump to

Keyboard shortcuts

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