client

package
v0.0.38 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAccessDenied = errors.New("access denied")
View Source
var ErrBadRequest = errors.New("bad request")
View Source
var ErrInvalidAuth = errors.New("invalid auth token")
View Source
var ErrNotFound = errors.New("not found")

Functions

func GetErrCode added in v0.0.30

func GetErrCode(err error) (code int)

func GetErrFromCode added in v0.0.30

func GetErrFromCode(code int, msg string) error

Types

type Client

type Client interface {
	GetDeviceUsage(token string, deviceIds []string) (result []Usage, code int, err error)
	GetExportUsage(token string, exportIds []string) (result []Usage, code int, err error)
	GetQueriesV2(token string, requestElements []QueriesRequestElement, options *QueriesV2Options) (result []QueriesV2ResponseElement, code int, err error)
}

func NewClient

func NewClient(baseUrl string) Client

type QueriesRequestElement added in v0.0.31

type QueriesRequestElement = model.QueriesRequestElement

type QueriesV2Options added in v0.0.31

type QueriesV2Options struct {
	Format           *string
	OrderColumnIndex *int
	OrderDirection   *string
	TimeFormat       *string
	LocateLat        *float64
	LocateLon        *float64
}

type QueriesV2ResponseElement added in v0.0.31

type QueriesV2ResponseElement = model.QueriesV2ResponseElement

type Usage

type Usage = model.Usage

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳