package truncindex

import "github.com/docker/docker/pkg/truncindex"

Index

Variables

var (
	ErrNoID = errors.New("prefix can't be empty")
)

Types

type TruncIndex

type TruncIndex struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

TruncIndex allows the retrieval of string identifiers by any of their unique prefixes. This is used to retrieve image and container IDs by more convenient shorthand prefixes.

func NewTruncIndex

func NewTruncIndex(ids []string) (idx *TruncIndex)

func (*TruncIndex) Add

func (idx *TruncIndex) Add(id string) error

func (*TruncIndex) Delete

func (idx *TruncIndex) Delete(id string) error

func (*TruncIndex) Get

func (idx *TruncIndex) Get(s string) (string, error)

Source Files

truncindex.go

Version
v1.3.3
Published
Dec 11, 2014
Platform
js/wasm
Imports
5 packages
Last checked
26 minutes ago

Tools for package owners.