utils

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MPL-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const (
	PackageID      = "lm-data-sdk-go"
	PackageVersion = "1.3.0"
)
View Source
const REGEX_COMPANY_NAME = "^[a-zA-Z0-9_.\\-]+$"

Variables

This section is empty.

Functions

func BuildUserAgent

func BuildUserAgent() string

func Gzip

func Gzip(byteArr []byte) ([]byte, error)

func URL

func URL() (string, error)

Types

type AuthParams added in v0.6.2

type AuthParams struct {
	AccessID  string
	AccessKey string

	BearerToken string

	CollectorCredentialsProvider func() string
}

func (AuthParams) GetCredentials added in v0.6.2

func (ap AuthParams) GetCredentials(method, resourcePath string, body []byte) (string, error)

type Lmv1Token

type Lmv1Token struct {
	AccessID  string
	Signature string
	Epoch     time.Time
}

func (*Lmv1Token) String

func (t *Lmv1Token) String() string

type Timestamp added in v0.8.0

type Timestamp uint64

Timestamp is a time specified as UNIX Epoch time in nanoseconds since 1970-01-01 00:00:00 +0000 UTC.

func NewTimestampFromTime added in v0.8.0

func NewTimestampFromTime(t time.Time) Timestamp

NewTimestampFromTime constructs a new Timestamp from the provided time.Time.

func (Timestamp) AsTime added in v0.8.0

func (ts Timestamp) AsTime() time.Time

AsTime converts this to a time.Time.

func (Timestamp) String added in v0.8.0

func (ts Timestamp) String() string

String returns the string representation of this in UTC.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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