utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: MPL-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const (
	PACKAGE_ID      = "lm-data-sdk-go/"
	PACKAGE_VERSION = "0.3.0"
	OS_NAME         = runtime.GOOS
	ARCH            = runtime.GOARCH
)
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
	CollectorCredentials string
}

func (AuthParams) GetCredentials added in v0.6.2

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

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