artifact-server

command
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

README

artifact-server

This small HTTP server calls a registry server backend to get the contents of artifacts, which it then serves as JSON, YAML, or text (proto) documents depending on the Accept type specified in request headers.

registry get remains the preferred method for getting artifact contents; this adds the ability to get contents from a browser.

artifact-server reads the same configuration as the registry tool.

$ artifact-server &

$ curl -s http://localhost:8080/projects/sample/locations/global/artifacts/apihub-styleguide -H "Accept: text/json" | head -7
{
  "id": "apihub-styleguide",
  "kind": "StyleGuide",
  "mimeTypes": [
    "application/x.protobuf+zip"
  ],
  "guidelines": [

$ curl -s http://localhost:8080/projects/sample/locations/global/artifacts/apihub-styleguide -H "Accept: text/yaml" | head -7
id: apihub-styleguide
kind: StyleGuide
mimeTypes:
    - application/x.protobuf+zip
guidelines:
    - id: aip122
      rules:

$ curl -s http://localhost:8080/projects/sample/locations/global/artifacts/apihub-styleguide -H "Accept: text/plain" | head -7
id: "apihub-styleguide"
kind: "StyleGuide"
mime_types: "application/x.protobuf+zip"
guidelines: {
  id: "aip122"
  rules: {
    id: "camel-case-uris"

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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