catalogremote

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

README

catalogremote

import "github.com/agentstation/starmap/pkg/catalogremote"

Package catalogremote defines the versioned online Starmap-to-Starmap generation protocol. Artifact distribution remains in catalogdistribution.

Index

Constants

const (
    // CatalogPath is appended to a versioned API base URL.
    CatalogPath = "/catalog"
    // ManifestPath returns the current strict generation manifest.
    ManifestPath = CatalogPath + "/manifest"
    // GenerationsPath prefixes immutable generation snapshot routes.
    GenerationsPath = CatalogPath + "/generations"
    // ManifestMediaType identifies strict generation-manifest JSON.
    ManifestMediaType = "application/vnd.agentstation.starmap.catalog-manifest+json"
)

func MarshalManifest

func MarshalManifest(manifest catalogs.GenerationManifest) ([]byte, error)

MarshalManifest returns strict JSON bytes for the server route.

func SnapshotPath

func SnapshotPath(generationID string) string

SnapshotPath returns the immutable canonical payload route for generationID.

type Client

Client fetches one exact current generation from a versioned Starmap API.

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

func NewClient
func NewClient(baseURL string, httpClient *http.Client, schemaVersion uint64) (*Client, error)

NewClient creates a remote generation client. baseURL is the versioned API root, for example https://starmap.example.com/api/v1.

func (*Client) FetchCurrent
func (c *Client) FetchCurrent(ctx context.Context) (catalogstore.Generation, error)

FetchCurrent fetches the current manifest followed by its immutable, generation-addressed snapshot and validates their binding and compatibility.

Generated by gomarkdoc

Documentation

Overview

Package catalogremote defines the versioned online Starmap-to-Starmap generation protocol. Artifact distribution remains in catalogdistribution.

Index

Constants

View Source
const (
	// CatalogPath is appended to a versioned API base URL.
	CatalogPath = "/catalog"
	// ManifestPath returns the current strict generation manifest.
	ManifestPath = CatalogPath + "/manifest"
	// GenerationsPath prefixes immutable generation snapshot routes.
	GenerationsPath = CatalogPath + "/generations"
	// ManifestMediaType identifies strict generation-manifest JSON.
	ManifestMediaType = "application/vnd.agentstation.starmap.catalog-manifest+json"
)

Variables

This section is empty.

Functions

func MarshalManifest

func MarshalManifest(manifest catalogs.GenerationManifest) ([]byte, error)

MarshalManifest returns strict JSON bytes for the server route.

func SnapshotPath

func SnapshotPath(generationID string) string

SnapshotPath returns the immutable canonical payload route for generationID.

Types

type Client

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

Client fetches one exact current generation from a versioned Starmap API.

func NewClient

func NewClient(baseURL string, httpClient *http.Client, schemaVersion uint64) (*Client, error)

NewClient creates a remote generation client. baseURL is the versioned API root, for example https://starmap.example.com/api/v1.

func (*Client) FetchCurrent

func (c *Client) FetchCurrent(ctx context.Context) (catalogstore.Generation, error)

FetchCurrent fetches the current manifest followed by its immutable, generation-addressed snapshot and validates their binding and compatibility.

Jump to

Keyboard shortcuts

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