Documentation
¶
Index ¶
- Constants
- func IsValidDisplayMappingObject(dmo DisplayMappingObject) error
- func IsValidEntityStyle(esd EntityStyleDescriptor) error
- func IsValidLabeledDisplayMappingObject(ldmo LabeledDisplayMappingObject) error
- type ColorResource
- type DataDisplay
- type DisplayMappingObject
- type DisplayMappingSchema
- type EntityStyleDescriptor
- type ImageResource
- type LabeledDisplayMappingObject
- type SchemaFormat
- type SchemaType
Constants ¶
View Source
const ( StringType SchemaType = "string" BooleanType SchemaType = "boolean" NumberType SchemaType = "number" IntegerType SchemaType = "integer" DateTimeFormat SchemaFormat = "date-time" TimeFormat SchemaFormat = "time" DateFormat SchemaFormat = "date" EmailFormat SchemaFormat = "email" IDNEmailFormat SchemaFormat = "idn-email" HostnameFormat SchemaFormat = "hostname" IDNHostnameFormat SchemaFormat = "idn-hostname" IPV4Format SchemaFormat = "ipv4" IPV6Format SchemaFormat = "ipv6" URIFormat SchemaFormat = "uri" URIReferenceFormat SchemaFormat = "uri-reference" IRIFormat SchemaFormat = "iri" IRIReferenceFormat SchemaFormat = "iri-reference" )
Variables ¶
This section is empty.
Functions ¶
func IsValidDisplayMappingObject ¶
func IsValidDisplayMappingObject(dmo DisplayMappingObject) error
IsValidDisplayMappingObject validates a display mapping object against its known schema
func IsValidEntityStyle ¶
func IsValidEntityStyle(esd EntityStyleDescriptor) error
IsValidEntityStyle validates an entity style descriptor against its known schema
func IsValidLabeledDisplayMappingObject ¶
func IsValidLabeledDisplayMappingObject(ldmo LabeledDisplayMappingObject) error
IsValidLabeledDisplayMappingObject validates a labeled display mapping object against its known schema
Types ¶
type ColorResource ¶
type ColorResource struct { // a HEX string color value (e.g. #00000) Color string `json:"color,omitempty"` }
type DataDisplay ¶
type DataDisplay struct { Title *DisplayMappingObject `json:"title,omitempty"` Subtitle *DisplayMappingObject `json:"subtitle,omitempty"` Description *DisplayMappingObject `json:"description,omitempty"` Properties []LabeledDisplayMappingObject `json:"properties,omitempty"` }
DataDisplay https://identity.foundation/wallet-rendering/#data-display
type DisplayMappingObject ¶
type DisplayMappingObject struct { // Ifa path is present it must be an array of JSON Path string expressions // and the schema property must also be present. Path []string `json:"path,omitempty"` Schema *DisplayMappingSchema `json:"schema,omitempty"` Fallback string `json:"fallback,omitempty"` // If path is not present, the text value is required with no other properties Text *string `json:"text,omitempty"` }
DisplayMappingObject https://identity.foundation/wallet-rendering/#display-mapping-object
func (*DisplayMappingObject) IsEmpty ¶
func (dmo *DisplayMappingObject) IsEmpty() bool
func (*DisplayMappingObject) IsValid ¶
func (dmo *DisplayMappingObject) IsValid() error
type DisplayMappingSchema ¶
type DisplayMappingSchema struct { Type SchemaType `json:"type" validate:"required"` // Must be present if the value of the type property is "string" Format SchemaFormat `json:"format,omitempty"` }
type EntityStyleDescriptor ¶
type EntityStyleDescriptor struct { Thumbnail *ImageResource `json:"thumbnail,omitempty"` Hero *ImageResource `json:"hero,omitempty"` Background *ColorResource `json:"background,omitempty"` Text *ColorResource `json:"text,omitempty"` }
EntityStyleDescriptor https://identity.foundation/wallet-rendering/#entity-styles
func (*EntityStyleDescriptor) IsEmpty ¶
func (esd *EntityStyleDescriptor) IsEmpty() bool
type ImageResource ¶
type LabeledDisplayMappingObject ¶
type LabeledDisplayMappingObject struct { Label string `json:"label" validate:"required"` *DisplayMappingObject `validate:"dive"` }
LabeledDisplayMappingObject https://identity.foundation/wallet-rendering/#labeled-display-mapping-object
func (*LabeledDisplayMappingObject) IsEmpty ¶
func (ldmo *LabeledDisplayMappingObject) IsEmpty() bool
func (*LabeledDisplayMappingObject) IsValid ¶
func (ldmo *LabeledDisplayMappingObject) IsValid() error
type SchemaFormat ¶
type SchemaFormat string
type SchemaType ¶
type SchemaType string
Click to show internal directories.
Click to hide internal directories.