devicegroups

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EndpointDeviceGroupsJSON is the endpoint for device groups in JSON format
	EndpointDeviceGroupsJSON = "/device_groups.json"

	// EndpointDeviceGroupsCSV is the endpoint for device groups in CSV format
	EndpointDeviceGroupsCSV = "/device_groups.csv"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceGroup

type DeviceGroup struct {
	ID      string   `json:"id"`
	Name    string   `json:"name"`
	Devices []string `json:"devices"`
}

DeviceGroup represents a single device group entry

type DeviceGroupsResponse

type DeviceGroupsResponse []DeviceGroup

DeviceGroupsResponse is the response from GET /device_groups.json

type DeviceGroupsServiceInterface

type DeviceGroupsServiceInterface interface {
	// ListDeviceGroups returns a list of Device Groups
	//
	// Returns device groups with their IDs, names, and assigned device serial numbers.
	ListDeviceGroups(ctx context.Context) (*DeviceGroupsResponse, *interfaces.Response, error)

	// ListDeviceGroupsCSV returns a list of Device Groups in CSV format
	//
	// Returns device group data as CSV with columns: id, name, devices.
	ListDeviceGroupsCSV(ctx context.Context) ([]byte, *interfaces.Response, error)
}

DeviceGroupsServiceInterface defines the interface for device groups operations

Workbrew API docs: https://console.workbrew.com/documentation/api

type Service

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

Service handles communication with the device groups related methods of the Workbrew API.

func NewService

func NewService(client interfaces.HTTPClient) *Service

NewService creates a new device groups service

func (*Service) ListDeviceGroups

func (s *Service) ListDeviceGroups(ctx context.Context) (*DeviceGroupsResponse, *interfaces.Response, error)

ListDeviceGroups retrieves all device groups in JSON format URL: GET https://console.workbrew.com/workspaces/{workspace_name}/device_groups.json

func (*Service) ListDeviceGroupsCSV

func (s *Service) ListDeviceGroupsCSV(ctx context.Context) ([]byte, *interfaces.Response, error)

ListDeviceGroupsCSV retrieves all device groups in CSV format URL: GET https://console.workbrew.com/workspaces/{workspace_name}/device_groups.csv

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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