util

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const MaxInt = int(MaxUint >> 1)
View Source
const MaxUint = ^uint(0)
View Source
const SDKKeyHelpMessage = "To obtain the API key, please sign in to the Unlaunch Console at https://app.unlaunch.io  " +
	"Then on the right sidebar, click on 'Settings'. Then from the 'Projects' tab. Copy the 'SERVER KEY' for the " +
	"environment you want to connect to, and provide it to this SDK. For more information, visit: https://docs.unlaunch.io/docs/sdks/sdk-keys"

Variables

This section is empty.

Functions

func ConvertToBool

func ConvertToBool(attr interface{}) (bool, error)

ConvertToBool converts to bool

func ConvertToFloat64

func ConvertToFloat64(attr interface{}) (float64, error)

ConvertToFloat64 There has to be better way to do this

func ConvertToInt64

func ConvertToInt64(attr interface{}) (int64, error)

ConvertToInt64 converts a valid numeric value to int64

func ConvertToString

func ConvertToString(attr interface{}) (string, error)

ConvertToString converts to string

func CovertToMap

func CovertToMap(attr interface{}) (map[string]interface{}, error)

func RunImmediatelyAndSchedule

func RunImmediatelyAndSchedule(what func() error, delay time.Duration) chan bool

func Schedule

func Schedule(what func() error, delay time.Duration) chan bool

Types

type HTTPClient

type HTTPClient interface {
	Get(path string) ([]byte, error)
	Post(path string, body []byte) error
}

func NewHTTPClient

func NewHTTPClient(
	sdkKey string,
	host string,
	timeout time.Duration,
	logger logger.Interface,
) HTTPClient

NewHTTPClient returns a new http client

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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