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: 0

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