mock

package
v0.0.0-...-880cb89 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProvider

func NewProvider(id, name string) *in

Types

type Cache

type Cache struct {
	IDToName map[string]string
	NameToID map[string]string
}

func NewCache

func NewCache(itn, nti map[string]string) Cache

func (Cache) IDOf

func (c Cache) IDOf(name string) (string, bool)

IDOf returns the id associated with the given name.

func (Cache) IDs

func (c Cache) IDs() []string

IDs returns all known ids.

func (Cache) NameOf

func (c Cache) NameOf(id string) (string, bool)

NameOf returns the name associated with the given id.

func (Cache) Names

func (c Cache) Names() []string

Names returns all known names.

func (Cache) ProviderForID

func (c Cache) ProviderForID(id string) idname.Provider

func (Cache) ProviderForName

func (c Cache) ProviderForName(name string) idname.Provider

Jump to

Keyboard shortcuts

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