types

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: May 29, 2025 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Index

Constants

View Source
const DEF_INSTID_HASH_METHOD = "sha256"

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientRegistration

type ClientRegistration struct {
	ClientId   string `json:"clientId" validate:"required,uuid|uuid_rfc4122"`
	SystemUUID string `json:"systemUUID" validate:"omitempty,gt=0,uuid|uuid_rfc4122"`
	Timestamp  string `json:"timestamp" validate:"required,datetime=2006-01-02T15:04:05.999999999Z07:00"`
}

ClientRegistration

func (*ClientRegistration) Hash

func (c *ClientRegistration) Hash(inputMethod string) *ClientRegistrationHash

func (*ClientRegistration) HashJSON added in v0.1.6

func (c *ClientRegistration) HashJSON(inputMethod string) *ClientRegistrationHash

func (*ClientRegistration) Hashable added in v0.1.6

func (c *ClientRegistration) Hashable() string

func (*ClientRegistration) String

func (c *ClientRegistration) String() string

func (*ClientRegistration) Validate added in v0.1.2

func (c *ClientRegistration) Validate() (err error)

type ClientRegistrationHash

type ClientRegistrationHash struct {
	Method string `json:"method" validate:"required,oneof=sha256 sha512"`
	Value  string `json:"value" validate:"required,sha256|sha512"`
}

func (*ClientRegistrationHash) Match

func (*ClientRegistrationHash) String

func (c *ClientRegistrationHash) String() string

func (*ClientRegistrationHash) Validate added in v0.1.5

func (c *ClientRegistrationHash) Validate() (err error)

type Tag

type Tag string

Tag is a string of the form "name" or "name=value"

func (Tag) HasValue

func (t Tag) HasValue() bool

func (Tag) String

func (t Tag) String() string

func (Tag) Valid

func (t Tag) Valid() (bool, error)

type Tags

type Tags []Tag

Tags is a slice of Tag

func (*Tags) Set

func (t *Tags) Set(value string) error

func (*Tags) String

func (t *Tags) String() string

type TelemetryAuthToken

type TelemetryAuthToken string

TelemetryAuthToken is a string holding an encoded auth token value

func (*TelemetryAuthToken) String

func (t *TelemetryAuthToken) String() string

func (TelemetryAuthToken) Valid

func (t TelemetryAuthToken) Valid() bool

type TelemetryBlob

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

func NewTelemetryBlob

func NewTelemetryBlob(jsonBlob []byte) *TelemetryBlob

func (*TelemetryBlob) Bytes

func (tb *TelemetryBlob) Bytes() []byte

func (*TelemetryBlob) CheckLimits

func (tb *TelemetryBlob) CheckLimits() error

func (*TelemetryBlob) String

func (tb *TelemetryBlob) String() string

func (*TelemetryBlob) Valid

func (tb *TelemetryBlob) Valid() error

type TelemetryClass

type TelemetryClass int64
const (
	MANDATORY_TELEMETRY TelemetryClass = iota
	OPT_OUT_TELEMETRY
	OPT_IN_TELEMETRY
)

func (*TelemetryClass) String

func (tc *TelemetryClass) String() string

type TelemetryTimeStamp

type TelemetryTimeStamp struct {
	time.Time
}

func Now

func Now() TelemetryTimeStamp

func TimeStampFromString

func TimeStampFromString(tsString string) (ts TelemetryTimeStamp, err error)

func (TelemetryTimeStamp) String

func (t TelemetryTimeStamp) String() string

type TelemetryType

type TelemetryType string

TelemetryType is a string of the format "<family>-<stream>-<subtype>"

func (*TelemetryType) Set

func (t *TelemetryType) Set(value string) error

func (*TelemetryType) String

func (t *TelemetryType) String() string

func (TelemetryType) Valid

func (t TelemetryType) Valid() (bool, error)

Jump to

Keyboard shortcuts

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