Documentation
¶
Index ¶
Constants ¶
View Source
const ( // EndpointFormulaeJSON is the endpoint for formulae in JSON format EndpointFormulaeJSON = "/formulae.json" // EndpointFormulaeCSV is the endpoint for formulae in CSV format EndpointFormulaeCSV = "/formulae.csv" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Formula ¶
type Formula struct {
Name string `json:"name"`
Devices []string `json:"devices"`
Outdated bool `json:"outdated"`
InstalledOnRequest bool `json:"installed_on_request"`
InstalledAsDependency bool `json:"installed_as_dependency"`
Vulnerabilities []string `json:"vulnerabilities"`
Deprecated *string `json:"deprecated"`
License *[]string `json:"license"`
HomebrewCoreVersion *string `json:"homebrew_core_version"`
}
Formula represents a single formula entry
type FormulaeResponse ¶
type FormulaeResponse []Formula
FormulaeResponse is the response from GET /formulae.json
type FormulaeServiceInterface ¶
type FormulaeServiceInterface interface {
// ListFormulae returns a list of Formulae
//
// Returns installed Homebrew formulae with names, assigned devices, outdated status, installation type (on request/dependency),
// known vulnerabilities, deprecation status, licenses, and Homebrew core versions.
ListFormulae(ctx context.Context) (*FormulaeResponse, *interfaces.Response, error)
// ListFormulaeCSV returns a list of Formulae in CSV format
//
// Returns formulae data as CSV with columns: name, devices, outdated, installed_on_request, installed_as_dependency,
// vulnerabilities, deprecated, license, homebrew_core_version.
ListFormulaeCSV(ctx context.Context) ([]byte, *interfaces.Response, error)
}
FormulaeServiceInterface defines the interface for formulae 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 formulae related methods of the Workbrew API.
func NewService ¶
func NewService(client interfaces.HTTPClient) *Service
NewService creates a new formulae service
func (*Service) ListFormulae ¶
func (s *Service) ListFormulae(ctx context.Context) (*FormulaeResponse, *interfaces.Response, error)
ListFormulae retrieves all formulae in JSON format URL: GET https://console.workbrew.com/workspaces/{workspace_name}/formulae.json
func (*Service) ListFormulaeCSV ¶
ListFormulaeCSV retrieves all formulae in CSV format URL: GET https://console.workbrew.com/workspaces/{workspace_name}/formulae.csv
Click to show internal directories.
Click to hide internal directories.