Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Glossary ¶
type Glossary struct {
// contains filtered or unexported fields
}
Glossary describes the set of types used in the structures to be described.
This type memoizes and is NOT type-safe.
func NewGlossary ¶
func NewGlossary() *Glossary
NewGlossary creates a new glossary. In addition to th
func (*Glossary) Clone ¶
Clone clones the glossary. The cloned glossary can be safely used concurrently with the original glossary.
func (*Glossary) WithName ¶
WithName names the 'thing's type.
For example, one can name all instances of MyStruct as "<my-struct>" with:
glossary.Name(new(MyStruct), "my-struct")
func (*Glossary) WithSchema ¶
WithSchema describes 'thing's type with the given schema. The 'schema' must marshal to JSON.
This can be used to give types that implement custom json marshallers accurate descriptions.
Click to show internal directories.
Click to hide internal directories.