utils

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: MPL-2.0 Imports: 17 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 GetToken

func GetToken(method, resourcePath string, body []byte) string

func Gzip

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

func URL

func URL() (string, error)

Types

type Lmv1Token

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

func (*Lmv1Token) String

func (t *Lmv1Token) String() string

type Response

type Response struct {
	Success   bool                     `json:"success"`
	Message   string                   `json:"message"`
	Errors    []map[string]interface{} `json:"errors"`
	RequestID uuid.UUID                `json:"requestId"`
}

Response will contain variable for responses from logingest

func ConvertHTTPToIngestResponse

func ConvertHTTPToIngestResponse(resp *http.Response) (*Response, error)

Jump to

Keyboard shortcuts

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