apis

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: MPL-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeName

func NormalizeName(name string) string

NormalizeName normalizes API names and aliases for lookup.

Types

type API

type API struct {
	Name        string   `json:"name"`
	Title       string   `json:"title"`
	Description string   `json:"description"`
	BaseURL     string   `json:"base_url"`
	OpenAPIURL  string   `json:"openapi_url,omitempty"`
	DocsURL     string   `json:"docs_url,omitempty"`
	Aliases     []string `json:"aliases,omitempty"`
	Public      bool     `json:"public"`
}

API describes one public Open Data Hub API surface known to the CLI.

type Registry

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

Registry stores APIs by name and alias.

func DefaultRegistry

func DefaultRegistry() *Registry

DefaultRegistry returns the public API set used by the CLI.

func NewRegistry

func NewRegistry(entries []API) (*Registry, error)

NewRegistry builds a registry and validates names and aliases.

func (*Registry) Find

func (r *Registry) Find(name string) (API, bool)

Find returns an API by canonical name or alias.

func (*Registry) List

func (r *Registry) List() []API

List returns APIs sorted by canonical name.

func (*Registry) Names

func (r *Registry) Names() []string

Names returns the sorted canonical API names.

Jump to

Keyboard shortcuts

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