libraryapi

package
v0.12.0-a.8 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(required string, descriptor Descriptor) error

Types

type Descriptor

type Descriptor struct {
	FormatVersion   int      `json:"format-version"`
	ImplementedAPIs []string `json:"implemented-apis"`
	GeneratorAPI    string   `json:"generator-api"`
}

func Current

func Current() Descriptor

func ReadDescriptor

func ReadDescriptor(moduleFS fs.FS) (Descriptor, error)

func (Descriptor) Validate

func (d Descriptor) Validate() error

type NewerMinorError

type NewerMinorError struct {
	Required    Version
	Implemented Version
}

func (*NewerMinorError) Error

func (e *NewerMinorError) Error() string

type UnsupportedMajorError

type UnsupportedMajorError struct {
	Required        Version
	ImplementedAPIs []string
}

func (*UnsupportedMajorError) Error

func (e *UnsupportedMajorError) Error() string

type Version

type Version struct {
	Major uint64
	Minor uint64
}

func Parse

func Parse(identifier string) (Version, error)

func (Version) String

func (v Version) String() string

Jump to

Keyboard shortcuts

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