rest

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetLogRequest

type GetLogRequest struct {
	ProjectId  string
	TimeBucket string
	Period     string
	From       string
	To         string
	Timezone   string
}

type GetPerformanceRequest

type GetPerformanceRequest struct {
	ProjectId  string
	TimeBucket string
	Period     string
	From       string
	To         string
	Timezone   string
}

type LiveVisitors

type LiveVisitors struct {
	LiveVisitors []any
}

type LiveVisitorsRequest

type LiveVisitorsRequest struct {
	ProjectId string
}

type Log

type Log struct {
	Params                 map[string]any `json:"params"`
	Chart                  map[string]any `json:"chart"`
	AverageSessionDuration float64        `json:"avgSdur"`
	Customs                map[string]any `json:"customs"`
	AppliedFilters         []any          `json:"appliedFilters"`
}

type Performance

type Performance struct {
	Params         map[string]any `json:"params"`
	Chart          map[string]any `json:"chart"`
	AppliedFilters []any          `json:"appliedFilters"`
}

type SwetrixRestClient

type SwetrixRestClient struct {
	ProjectId string
	ApiKey    string

	HttpClient *http.Client
}

func NewSetrixClient

func NewSetrixClient(apiKey string) SwetrixRestClient

func (*SwetrixRestClient) GetLiveVisitors

func (swetrixClient *SwetrixRestClient) GetLiveVisitors(ctx context.Context, request *LiveVisitorsRequest) (*LiveVisitors, error)

func (*SwetrixRestClient) GetLog

func (swetrixClient *SwetrixRestClient) GetLog(ctx context.Context, request *GetLogRequest) (*Log, error)

func (*SwetrixRestClient) GetPerformance

func (swetrixClient *SwetrixRestClient) GetPerformance(ctx context.Context, request *GetPerformanceRequest) (*Performance, error)

Jump to

Keyboard shortcuts

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