location

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: ISC Imports: 4 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownFlag = errors.New("unknown flag")

Functions

This section is empty.

Types

type Flags

type Flags uint32
const (
	FLAG_LOCALFS Flags = 1 << iota // all: dealing with a file (or dir) on the local fs
	FLAG_FILE                      // storage: kloset is in a single file
	FLAG_STREAM                    // importer: cannot call Import() more than once
	FLAG_NEEDACK                   // importer: cares about acknowledgments in Import()
	FLAG_NOMERGE                   // importer: cannot merge those in a single snapshot (multidir support)
)

func ParseFlag

func ParseFlag(name string) (Flags, error)

type Location

type Location[T any] struct {
	// contains filtered or unexported fields
}

func New

func New[T any](fallback string) *Location[T]

func (*Location[T]) Lookup

func (l *Location[T]) Lookup(uri string) (proto, location string, item T, flags Flags, ok bool)

func (*Location[T]) Names

func (l *Location[T]) Names() []string

func (*Location[T]) Register

func (l *Location[T]) Register(name string, item T, flags Flags) bool

func (*Location[T]) Unregister

func (l *Location[T]) Unregister(name string) bool

Jump to

Keyboard shortcuts

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