schema

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Index

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

func DecodeIndexJSON

func DecodeIndexJSON(b []byte) (index *Index, err error)

func NewIndex

func NewIndex() (idx *Index)

func (*Index) Add

func (idx *Index) Add(indice *IndiceItem) (conflictEntry *IndiceItem)

Add adds indice into idx. If an IndiceItem in idx.Items has the same name to indice, it is returned as conflictEntry

func (*Index) Find

func (idx *Index) Find(name string) (indice *IndiceItem)

func (*Index) FindPath

func (idx *Index) FindPath(name string) (path string)

func (*Index) Remove

func (idx *Index) Remove(name string) (success bool)

func (*Index) String

func (idx *Index) String() string

func (*Index) Swap

func (idx *Index) Swap(name string, indice *IndiceItem) (success bool)

func (*Index) ToJSON added in v0.7.2

func (idx *Index) ToJSON(pretty bool) (b []byte, err error)

func (*Index) ToText added in v0.7.2

func (idx *Index) ToText() (text string)

type IndiceItem

type IndiceItem struct {
	Name string `json:"name"`
	Path string `json:"path"`
}

func (*IndiceItem) String

func (i *IndiceItem) String() (s string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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