refs

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package refs handles the URIs every resource and row can carry, such as svc://api or jira://PAY-12. Each scheme has one owner: core or a plugin.

Index

Constants

This section is empty.

Variables

View Source
var Core = []string{"svc", "env", "view", "job", "file"}

Core owns these schemes.

Functions

func Expand

func Expand(tmpl string, row map[string]any) string

Expand fills a template such as svc://{service} from a row; a hole the row has no value for stays.

Types

type Ref

type Ref struct {
	Scheme string
	// Path is everything after scheme://, without query or fragment.
	Path     string
	Query    url.Values
	Fragment string
}

func Parse

func Parse(s string) (Ref, error)

func (Ref) String

func (r Ref) String() string

type Registry

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

Registry maps each scheme to its owner.

func NewRegistry

func NewRegistry() *Registry

func (*Registry) Claim

func (r *Registry) Claim(scheme, owner string) error

Claim gives scheme to owner; a scheme already owned by someone else is an error.

func (*Registry) Owner

func (r *Registry) Owner(scheme string) (string, bool)

func (*Registry) Schemes

func (r *Registry) Schemes() []string

Jump to

Keyboard shortcuts

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