casks

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 (
	// EndpointCasksJSON is the endpoint for casks in JSON format
	EndpointCasksJSON = "/casks.json"

	// EndpointCasksCSV is the endpoint for casks in CSV format
	EndpointCasksCSV = "/casks.csv"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cask

type Cask struct {
	Name                string   `json:"name"`
	DisplayName         *string  `json:"display_name"`
	Devices             []string `json:"devices"`
	Outdated            bool     `json:"outdated"`
	Deprecated          *string  `json:"deprecated"`
	HomebrewCaskVersion *string  `json:"homebrew_cask_version"`
}

Cask represents a single cask entry

type CasksResponse

type CasksResponse []Cask

CasksResponse is the response from GET /casks.json

type CasksServiceInterface

type CasksServiceInterface interface {
	// ListCasks returns a list of Casks
	//
	// Returns installed Homebrew casks with their names, assigned devices, outdated status, deprecation info, and versions.
	ListCasks(ctx context.Context) (*CasksResponse, *interfaces.Response, error)

	// ListCasksCSV returns a list of Casks in CSV format
	//
	// Returns cask data as CSV with columns: name, devices, outdated, deprecated, homebrew_cask_version.
	ListCasksCSV(ctx context.Context) ([]byte, *interfaces.Response, error)
}

CasksServiceInterface defines the interface for casks 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 casks related methods of the Workbrew API.

func NewService

func NewService(client interfaces.HTTPClient) *Service

NewService creates a new casks service

func (*Service) ListCasks

func (s *Service) ListCasks(ctx context.Context) (*CasksResponse, *interfaces.Response, error)

ListCasks retrieves all casks in JSON format URL: GET https://console.workbrew.com/workspaces/{workspace_name}/casks.json

func (*Service) ListCasksCSV

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

ListCasksCSV retrieves all casks in CSV format URL: GET https://console.workbrew.com/workspaces/{workspace_name}/casks.csv

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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