Documentation
¶
Index ¶
- type Client
- func (c *Client) CreateLog(ctx context.Context, projectId, name, metric string) (*model.Log, error)
- func (c *Client) CreateSensor(ctx context.Context, projectId, name string) (model.Sensor, error)
- func (c *Client) GetProjects(ctx context.Context) ([]model.Project, error)
- func (c *Client) GetSensorsByProjectID(ctx context.Context, projectId string) ([]model.Sensor, error)
- func (c *Client) Login(ctx context.Context, email, password string) (string, error)
- func (c *Client) SetToken(token string)
- func (c *Client) UpdateSensorLogs(ctx context.Context, sensorId string, logIds []string) ([]model.Log, error)
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) CreateSensor ¶ added in v1.5.0
CreateSensor creates a new sensor with the provided details.
func (*Client) GetProjects ¶ added in v1.5.0
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.
Click to show internal directories.
Click to hide internal directories.