Documentation
¶
Index ¶
Constants ¶
const ( // ImageTypeJpeg JPEG format ImageTypeJpeg string = "jpeg" // ImageTypePng PNG format ImageTypePng string = "png" )
Variables ¶
This section is empty.
Functions ¶
func GetMIMEType ¶
GetMIMEType returns the MIME type of this piece of Yoti user information. For more information see: https://en.wikipedia.org/wiki/Media_type
func UnmarshallJSON ¶
UnmarshallJSON unmarshalls JSON into an interface
Types ¶
type GenericAttribute ¶
type GenericAttribute struct { *yotiprotoattr.Attribute // contains filtered or unexported fields }
GenericAttribute is a Yoti attribute which returns a generic value
func NewGeneric ¶
func NewGeneric(a *yotiprotoattr.Attribute) *GenericAttribute
NewGeneric creates a new generic attribute
func (*GenericAttribute) Anchors ¶
func (a *GenericAttribute) Anchors() []*anchor.Anchor
Anchors are the metadata associated with an attribute. They describe how an attribute has been provided to Yoti (SOURCE Anchor) and how it has been verified (VERIFIER Anchor).
func (*GenericAttribute) Sources ¶
func (a *GenericAttribute) Sources() []*anchor.Anchor
Sources returns the anchors which identify how and when an attribute value was acquired.
func (*GenericAttribute) Value ¶
func (a *GenericAttribute) Value() interface{}
Value returns the value of the GenericAttribute as an interface
func (*GenericAttribute) Verifiers ¶
func (a *GenericAttribute) Verifiers() []*anchor.Anchor
Verifiers returns the anchors which identify how and when an attribute value was verified by another provider.
type ImageAttribute ¶
type ImageAttribute struct { *yotiprotoattr.Attribute // contains filtered or unexported fields }
ImageAttribute is a Yoti attribute which returns an image as its value
func NewImage ¶
func NewImage(a *yotiprotoattr.Attribute) (*ImageAttribute, error)
NewImage creates a new Image attribute
func (*ImageAttribute) Anchors ¶
func (a *ImageAttribute) Anchors() []*anchor.Anchor
Anchors are the metadata associated with an attribute. They describe how an attribute has been provided to Yoti (SOURCE Anchor) and how it has been verified (VERIFIER Anchor).
func (*ImageAttribute) Sources ¶
func (a *ImageAttribute) Sources() []*anchor.Anchor
Sources returns the anchors which identify how and when an attribute value was acquired.
func (*ImageAttribute) Value ¶
func (a *ImageAttribute) Value() *Image
Value returns the value of the ImageAttribute as *Image
func (*ImageAttribute) Verifiers ¶
func (a *ImageAttribute) Verifiers() []*anchor.Anchor
Verifiers returns the anchors which identify how and when an attribute value was verified by another provider.
type JSONAttribute ¶
type JSONAttribute struct { *yotiprotoattr.Attribute // Value returns the value of a JSON attribute in the form of an interface // contains filtered or unexported fields }
JSONAttribute is a Yoti attribute which returns an interface as its value
func NewJSON ¶
func NewJSON(a *yotiprotoattr.Attribute) (*JSONAttribute, error)
NewJSON creates a new JSON attribute
func (*JSONAttribute) Anchors ¶
func (a *JSONAttribute) Anchors() []*anchor.Anchor
Anchors are the metadata associated with an attribute. They describe how an attribute has been provided to Yoti (SOURCE Anchor) and how it has been verified (VERIFIER Anchor).
func (*JSONAttribute) Sources ¶
func (a *JSONAttribute) Sources() []*anchor.Anchor
Sources returns the anchors which identify how and when an attribute value was acquired.
func (*JSONAttribute) Value ¶
func (a *JSONAttribute) Value() interface{}
Value returns the value of the JSONAttribute as an interface
func (*JSONAttribute) Verifiers ¶
func (a *JSONAttribute) Verifiers() []*anchor.Anchor
Verifiers returns the anchors which identify how and when an attribute value was verified by another provider.
type StringAttribute ¶
type StringAttribute struct { *yotiprotoattr.Attribute // contains filtered or unexported fields }
StringAttribute is a Yoti attribute which returns a string as its value
func NewString ¶
func NewString(a *yotiprotoattr.Attribute) *StringAttribute
NewString creates a new String attribute
func (*StringAttribute) Anchors ¶
func (a *StringAttribute) Anchors() []*anchor.Anchor
Anchors are the metadata associated with an attribute. They describe how an attribute has been provided to Yoti (SOURCE Anchor) and how it has been verified (VERIFIER Anchor).
func (*StringAttribute) Sources ¶
func (a *StringAttribute) Sources() []*anchor.Anchor
Sources returns the anchors which identify how and when an attribute value was acquired.
func (*StringAttribute) Value ¶
func (a *StringAttribute) Value() string
Value returns the value of the StringAttribute as a string
func (*StringAttribute) Verifiers ¶
func (a *StringAttribute) Verifiers() []*anchor.Anchor
Verifiers returns the anchors which identify how and when an attribute value was verified by another provider.
type TimeAttribute ¶
type TimeAttribute struct { *yotiprotoattr.Attribute // contains filtered or unexported fields }
TimeAttribute is a Yoti attribute which returns a time as its value
func NewTime ¶
func NewTime(a *yotiprotoattr.Attribute) (*TimeAttribute, error)
NewTime creates a new Time attribute
func (*TimeAttribute) Anchors ¶
func (a *TimeAttribute) Anchors() []*anchor.Anchor
Anchors are the metadata associated with an attribute. They describe how an attribute has been provided to Yoti (SOURCE Anchor) and how it has been verified (VERIFIER Anchor).
func (*TimeAttribute) Sources ¶
func (a *TimeAttribute) Sources() []*anchor.Anchor
Sources returns the anchors which identify how and when an attribute value was acquired.
func (*TimeAttribute) Value ¶
func (a *TimeAttribute) Value() *time.Time
Value returns the value of the TimeAttribute as *time.Time
func (*TimeAttribute) Verifiers ¶
func (a *TimeAttribute) Verifiers() []*anchor.Anchor
Verifiers returns the anchors which identify how and when an attribute value was verified by another provider.