pkg

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: GPL-3.0 Imports: 5 Imported by: ? 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 pkg provides protocol package management.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitPackage

func InitPackage(dir, name string) error

InitPackage initializes a new PSL package in the given directory.

Types

type PackageMeta

type PackageMeta struct {
	Name        string   `json:"name"`
	Version     string   `json:"version"`
	Description string   `json:"description"`
	Author      string   `json:"author"`
	License     string   `json:"license"`
	Protocols   []string `json:"protocols"`
}

PackageMeta describes a PSL package.

type Registry

type Registry struct {
	URL      string
	Packages map[string]PackageMeta
}

Registry represents a package registry.

func NewRegistry

func NewRegistry(url string) *Registry

NewRegistry creates a new registry client.

func (*Registry) Install

func (r *Registry) Install(name, destDir string) error

Install installs a package by name.

func (*Registry) Publish

func (r *Registry) Publish(meta PackageMeta) error

Publish publishes a package to the registry.

func (*Registry) Search

func (r *Registry) Search(query string) []PackageMeta

Search searches packages by query.

Jump to

Keyboard shortcuts

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