utils

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	X_REWRITE_DOMAIN = "X-REWRITE-DOMAIN"
	AUTHORIZATION    = "Authorization"
	APPLICATION_JSON = "application/json"
	CONTENT_TYPE     = "Content-Type"
)
View Source
const SEND_INTERVAL = "10m"

Variables

This section is empty.

Functions

func GracefullyHandleError

func GracefullyHandleError()

func ReadFiles

func ReadFiles(filePath string) []byte

func StoreFiles

func StoreFiles(content string)

Types

type ApiManager

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

func NewApiManagerInstance

func NewApiManagerInstance(url string, method string, apikey string, overrideServerHost string) *ApiManager

func (*ApiManager) ExecuteApiCall

func (ap *ApiManager) ExecuteApiCall() (string, int)

type CollectionUsages

type CollectionUsages struct {
	Collection_id  string   `json:"collection_id"`
	Environment_id string   `json:"environment_id"`
	Usages         []Usages `json:"usages"`
}

type Metering

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

func GetMeteringInstance

func GetMeteringInstance() *Metering

func (*Metering) Init

func (mt *Metering) Init(url string, apiKey string, guid string, environmentId string, collectionId string)

func (*Metering) RecordEvaluation

func (mt *Metering) RecordEvaluation(featureId string, propertyId string, identityId string, segmentId string)

type UrlBuilder

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

func GetInstance

func GetInstance() *UrlBuilder

func (*UrlBuilder) GetConfigUrl

func (ub *UrlBuilder) GetConfigUrl() string

func (*UrlBuilder) GetMeteringUrl

func (ub *UrlBuilder) GetMeteringUrl() string

func (*UrlBuilder) GetWebSocketUrl

func (ub *UrlBuilder) GetWebSocketUrl() string

func (*UrlBuilder) Init

func (ub *UrlBuilder) Init(collectionId string, environmentId string, region string, guid string, overrideServerHost string)

type Usages

type Usages struct {
	Feature_id      string      `json:"feature_id,omitempty"`
	Property_id     string      `json:"property_id,omitempty"`
	Identity_id     string      `json:"identity_id"`
	Segment_id      interface{} `json:"segment_id"`
	Evaluation_time string      `json:"evaluation_time"`
	Count           int64       `json:"count"`
}

Jump to

Keyboard shortcuts

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