fhclient

package
v1.5.21 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client represents an authentication client.

func NewClient

func NewClient() *Client

NewClient creates a new authentication client with the given token.

func (*Client) CreateLog added in v1.5.0

func (c *Client) CreateLog(ctx context.Context, projectId, name, metric string) (*model.Log, error)

CreateLog creates a new log with the provided details.

func (*Client) CreateSensor added in v1.5.0

func (c *Client) CreateSensor(ctx context.Context, projectId, name string) (model.Sensor, error)

CreateSensor creates a new sensor with the provided details.

func (*Client) GetProjects added in v1.5.0

func (c *Client) GetProjects(ctx context.Context) ([]model.Project, error)

GetProjects fetches a list of projects.

func (*Client) GetSensorsByProjectID added in v1.5.0

func (c *Client) GetSensorsByProjectID(ctx context.Context, projectId string) ([]model.Sensor, error)

GetSensorsByProjectID fetches sensors for a given project ID.

func (*Client) Login

func (c *Client) Login(ctx context.Context, email, password string) (string, error)

Login performs a login request with the provided email and password.

func (*Client) SetToken

func (c *Client) SetToken(token string)

SetToken sets the token for the client.

func (*Client) UpdateSensorLogs added in v1.5.0

func (c *Client) UpdateSensorLogs(ctx context.Context, sensorId string, logIds []string) ([]model.Log, error)

UpdateSensorLogs updates the logs associated with a sensor.

Jump to

Keyboard shortcuts

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