attribute

package
v2.3.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ImageTypeJpeg JPEG format
	ImageTypeJpeg string = "jpeg"
	// ImageTypePng PNG format
	ImageTypePng string = "png"
)

Variables

This section is empty.

Functions

func GetMIMEType

func GetMIMEType(imageType string) string

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

func UnmarshallJSON(byteValue []byte) (result interface{}, err error)

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

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 Image

type Image struct {
	Type string
	Data []byte
}

Image format of the image and the image data

func (*Image) Base64URL

func (image *Image) Base64URL() string

Base64URL is the Image encoded as a base64 URL

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

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

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

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

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.

Jump to

Keyboard shortcuts

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