catalog

package
v0.1.86 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: Apache-2.0 Imports: 23 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

Overview

Package catalog is api's way from a module to its package, in the contract novatrail.api.v1: PackageService, the open views of a package by its digest and which digests the image still gives; ModuleService, the catalog of a profile and the modules connected to it; and the files of the device parts, by HTTP GET, which are no method of Connect. All of it is read from the packages serve read at its start, packages.Set, and the open views are built once, there: a request reads them, and a package whose views do not build is a failed start.

Index

Constants

View Source
const FilesPattern = "GET /packages/{package}/device/{path...}"

FilesPattern is the route of the files of the device parts: sha256-<hex> of the package, then the path of the file in its device part — LICENSE, NOTICE or media/<path>.

Variables

This section is empty.

Functions

This section is empty.

Types

type Catalog

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

Catalog is the packages of the image with the open views of each.

func New

func New(set *packages.Set) (*Catalog, error)

New is the catalog of set, with the open views of each of its packages built by module-kit, by the marks x-open of the format.

func (*Catalog) Files

func (c *Catalog) Files(log *slog.Logger) http.Handler

Files is the handler of FilesPattern. It goes with no token, so that fetch sends it with no preflight and through the HTTP cache:

  • 200, the file, by http.ServeContent — HEAD, ranges, and 304 by its ETag, the file's own digest — kept for a day;
  • 404, a digest that is not one, or a path the device part does not have;
  • 410, a package the image no longer gives: withdrawn, or out of the window;
  • 503 with Retry-After, a digest the index of the image does not know.

No refusal has a body or is kept. Each answer writes its line of the log, with its status and time and nothing of its path.

func (*Catalog) Modules

func (c *Catalog) Modules(db DB) *ModuleService

Modules is the ModuleService of the catalog, on db.

func (*Catalog) Packages

func (c *Catalog) Packages() *PackageService

Packages is the PackageService of the catalog.

type DB

type DB interface {
	rpc.DB
	store.Lister
}

DB is what ModuleService reads and writes the modules of a profile in: the pool of the database api.

type ModuleService

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

ModuleService gives the modules of a learner: each method is a learning request, with the right can_learn, which the checks hold before it, and a profile whose consent is not confirmed is refused. A module suits a learner by the audience of its current version alone: the explanation language chooses nothing.

func (*ModuleService) ConnectModule

ConnectModule connects a module that the index names and whose current version suits the profile. A module connected already stays as it is, and its repeat gets the same answer, the modules connected, even when the module has lost its current version meanwhile: the request repeats by the profile's state.

func (*ModuleService) DisconnectModule

DisconnectModule disconnects a module; one not connected changes nothing. The evidence of the module stays in the profile's journal. The answer is the modules connected.

func (*ModuleService) ListCatalog

ListCatalog gives the modules of the pinned index whose current version suits the profile and which the deployment's list names, when it has one, connected ones too, by their IDs. An ID is lowercase ASCII by the format's schema, so the order of its bytes is that of its UTF-16 code units, as the contract asks.

func (*ModuleService) ListConnectedModules

ListConnectedModules gives the modules connected to the profile, in the order they were connected, each with the digest of its current version, or with none when it has none for the learner.

func (*ModuleService) SetTaskSkill added in v0.1.84

SetTaskSkill sets the task skill of a connected module, a skill of the graph of its current version for the learner, or gives the choice back to the tutor with none. A module not connected, or a skill its graph does not have, is "not found"; a module with no current version is refused so; a module solved on the sheet, whose tasks the engine chooses none of, is malformed. A repeat sets the same skill: the request repeats by the profile's state.

type PackageService

type PackageService struct {
	apiv1connect.UnimplementedPackageServiceHandler
	// contains filtered or unexported fields
}

PackageService gives what a package gives by its digest: the open views of its manifest, skill graph and technique catalog, which go without a token by Connect GET and are cached for a day, and which digests the image still gives. GetSolvingSteps, which no screen asks any more, answers unimplemented: the checks before the handler know it not.

func (*PackageService) CheckPackages

CheckPackages gives each digest of the request, in its order, with whether the image gives it. api keeps none of them, as the contract asks.

func (*PackageService) GetManifest

GetManifest gives the open view of the package's manifest.

func (*PackageService) GetSkillGraph

GetSkillGraph gives the open view of the package's skill graph, with the tier of each skill: an answer without a view when the module has no graph.

func (*PackageService) GetTechniques

GetTechniques gives the open view of the package's technique catalog.

Jump to

Keyboard shortcuts

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