Documentation ¶
Index ¶
- type JSONLD
- type Map
- func (m Map) AsInt(property string) int
- func (m Map) AsObject(property string) JSONLD
- func (m Map) AsSliceOfObject(property string) []JSONLD
- func (m Map) AsSliceOfString(property string) []string
- func (m Map) AsString(property string) string
- func (m Map) AsTime(property string) time.Time
- func (m Map) GetStringMap(property string, languages ...string) string
- func (m Map) Head() JSONLD
- func (m Map) Len() int
- func (m Map) Property(property string) JSONLD
- func (m Map) PropertyMap(property string, languages ...string) string
- func (m Map) Tail() JSONLD
- type Slice
- func (s Slice) AsInt(property string) int
- func (s Slice) AsObject(property string) JSONLD
- func (s Slice) AsSliceOfObject(property string) []JSONLD
- func (s Slice) AsSliceOfString(property string) []string
- func (s Slice) AsString(property string) string
- func (s Slice) AsTime(property string) time.Time
- func (s Slice) Head() JSONLD
- func (s Slice) Len() int
- func (s Slice) Property(property string) JSONLD
- func (s Slice) PropertyMap(property string, languages ...string) string
- func (s Slice) Tail() JSONLD
- type String
- func (s String) AsInt(property string) int
- func (s String) AsObject(property string) JSONLD
- func (s String) AsSliceOfObject(property string) []JSONLD
- func (s String) AsSliceOfString(property string) []string
- func (s String) AsString(property string) string
- func (s String) AsTime(property string) time.Time
- func (s String) Head() JSONLD
- func (s String) Len() int
- func (s String) Property(property string) JSONLD
- func (s String) PropertyMap(property string, languages ...string) string
- func (s String) Tail() JSONLD
- type Zero
- func (z Zero) AsInt(property string) int
- func (z Zero) AsObject(property string) JSONLD
- func (z Zero) AsSliceOfObject(property string) []JSONLD
- func (z Zero) AsSliceOfString(property string) []string
- func (z Zero) AsString(property string) string
- func (z Zero) AsTime(property string) time.Time
- func (z Zero) Head() JSONLD
- func (z Zero) Len() int
- func (z Zero) Property(property string) JSONLD
- func (z Zero) PropertyMap(property string, languages ...string) string
- func (z Zero) Tail() JSONLD
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONLD ¶
type JSONLD interface { // AsObject returns this document as a JSON-LD Object. The "property" argument designates // the property to populate if the document is not already an object AsObject(property string) JSONLD // AsString returns this document as a string. The "property" argument designates // the property to use as a string value if the document is not already a string AsString(property string) string // AsInt returns this document as a time.Time. The "property" argument designated // the property to use as a string value if the document is not already a string AsTime(property string) time.Time // AsInt returns this document as an int. The "property" argument designated // the property to use as a string value if the document is not already a string AsInt(property string) int // AsSliceOfString returns this document as a slice of strings. The "property" argument designates // the property to use as a string value if the document is not already a string AsSliceOfString(property string) []string // AsSliceOfObject returns this document as a slice of JSON-LD Objects. The "property" argument designates // the property to populate if the document is not already an object AsSliceOfObject(property string) []JSONLD // Property returns a property of this document as its own JSON-LD document Property(property string) JSONLD // PropertyMap retrieves a string value from this document, trying first to use the // multi-lingual <propertyName>Map collection first. If the requested language is // not found, then the default language (or the naked property string) value is returned. PropertyMap(property string, languages ...string) string // Len returns the number of documents in a series. If this is not a series, // then Len() returns 1. Len() int // Head returns the first JSONLD document in a series. If this is not a series, // then Head() returns this document Head() JSONLD // Tail returns a series contining all but the first document in a series. If this // is not a series, then Tail() returns nil Tail() JSONLD }
type Map ¶
type Map map[string]interface{}
func (Map) AsSliceOfObject ¶
AsSliceOfObject returns this document as a slice of Objects
func (Map) AsSliceOfString ¶
AsSliceOfString returns this document as a slice of strings
func (Map) GetStringMap ¶
GetStringMap returns a property of this JSONLD document from a multi-language mapped value
func (Map) PropertyMap ¶
PropertyMap returns a property of this document
type Slice ¶
type Slice []interface{}
func (Slice) AsSliceOfObject ¶
AsSliceOfObject returns this document as a slice of Objects
func (Slice) AsSliceOfString ¶
AsSliceOfString returns this document as a slice of strings
func (Slice) PropertyMap ¶
PropertyMap returns a property of this document
type String ¶
type String string
func (String) AsSliceOfObject ¶
AsSliceOfObject returns this document as a slice of Objects
func (String) AsSliceOfString ¶
AsSliceOfString returns this document as a slice of strings
func (String) PropertyMap ¶
PropertyMap returns a property of this document
type Zero ¶
type Zero struct{}
Zero reader has no value
func (Zero) AsSliceOfObject ¶
AsSliceOfObject returns this document as a slice of Objects
func (Zero) AsSliceOfString ¶
AsSliceOfString returns this document as a slice of strings
func (Zero) PropertyMap ¶
PropertyMap returns a property of this document