package monocular
import "helm.sh/helm/v3/internal/monocular"
Package monocular contains the logic for interacting with a Monocular compatible search API endpoint. For example, as implemented by the Artifact Hub.
This is a library for interacting with a monocular compatible search API
Index ¶
- Constants
- Variables
- type ArtifactHub
- type Chart
- type ChartVersion
- type Client
- type LatestChartVersion
- type Links
- type Relationships
- type Repo
- type SearchResult
Constants ¶
const SearchPath = "api/chartsvc/v1/charts/search"
SearchPath is the url path to the search API in monocular.
Variables ¶
ErrHostnameNotProvided indicates the url is missing a hostname
Types ¶
type ArtifactHub ¶
type ArtifactHub struct { PackageURL string `json:"packageUrl"` }
ArtifactHub represents data specific to Artifact Hub instances
type Chart ¶
type Chart struct { Name string `json:"name"` Repo Repo `json:"repo"` Description string `json:"description"` Home string `json:"home"` Keywords []string `json:"keywords"` Maintainers []chart.Maintainer `json:"maintainers"` Sources []string `json:"sources"` Icon string `json:"icon"` }
Chart is the attributes for the chart
type ChartVersion ¶
type ChartVersion struct { Version string `json:"version"` AppVersion string `json:"app_version"` Created time.Time `json:"created"` Digest string `json:"digest"` Urls []string `json:"urls"` Readme string `json:"readme"` Values string `json:"values"` }
ChartVersion provides the specific data on the chart version
type Client ¶
type Client struct { // The base URL for requests BaseURL string // The internal logger to use Log func(string, ...interface{}) }
Client represents a client capable of communicating with the Monocular API.
func New ¶
New creates a new client
func (*Client) Search ¶
func (c *Client) Search(term string) ([]SearchResult, error)
Search performs a search against the monocular search API
type LatestChartVersion ¶
type LatestChartVersion struct { Data ChartVersion `json:"data"` Links Links `json:"links"` }
LatestChartVersion provides the details on the latest version of the chart
type Links ¶
type Links struct { Self string `json:"self"` }
Links provides a set of links relative to the chartsvc base
type Relationships ¶
type Relationships struct { LatestChartVersion LatestChartVersion `json:"latestChartVersion"` }
Relationships provides information on the latest version of the chart
type Repo ¶
Repo contains the name in monocular the url for the repository
type SearchResult ¶
type SearchResult struct { ID string `json:"id"` ArtifactHub ArtifactHub `json:"artifactHub"` Type string `json:"type"` Attributes Chart `json:"attributes"` Links Links `json:"links"` Relationships Relationships `json:"relationships"` }
SearchResult represents an individual chart result
Source Files ¶
client.go doc.go search.go
- Version
- v3.17.3 (latest)
- Published
- Apr 9, 2025
- Platform
- linux/amd64
- Imports
- 9 packages
- Last checked
- 1 month ago –
Tools for package owners.