client

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: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func ProjectMultiplex

func ProjectMultiplex(meta schema.ClientMeta) []schema.ClientMeta

func ResolveProjectId

func ResolveProjectId(_ context.Context, meta schema.ClientMeta, r *schema.Resource, c schema.Column) error

Types

type Client

type Client struct {
	Spec Spec

	SwetrixClient *rest.SwetrixRestClient

	// We multiplex based on projectId - this is the projectId this client is responsible for.
	ProjectId string

	Logger zerolog.Logger
}

func (*Client) ID

func (c *Client) ID() string

type Spec

type Spec struct {
	ProjectIds []string `json:"project_ids"`
	ApiKey     string   `json:"api_key"`

	TimeBucket string `json:"time_bucket"`
	Period     string `json:"period"`

	From     string `json:"from"`
	To       string `json:"to"`
	Timezone string `json:"timezone"`
}

func (*Spec) Validate

func (spec *Spec) Validate() error

Jump to

Keyboard shortcuts

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