did

package
v0.0.0-...-fcbc9cf Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authentication

type Authentication struct {
	Type      string `json:"type"`
	PublicKey string `json:"publicKey"`
}

type Authorization

type Authorization struct {
	Rules []Rule `json:"rules"`
}

type Document

type Document struct {
	Context        string            `json:"@context"`
	Id             string            `json:"id,omitempty"`
	PublicKey      []PublicKey       `json:"publicKey,omitempty"`
	Authentication []interface{}     `json:"authentication,omitempty"`
	Service        []ServiceEndpoint `json:"service,omitempty"`
	Created        string            `json:"created"`
	Updated        string            `json:"updated,omitempty"`
	Authorization  Authorization     `json:"authorization,omitempty"`
}

Default context: 'https://w3id.org/did/v1'

type PublicKey

type PublicKey struct {
	Id              string `json:"id"`
	Type            string `json:"type"`
	Controller      string `json:"controller"`
	PublicKeyBase58 string `json:"publicKeyBase58,omitempty"`
	EthereumAddress string `json:"ethereumAddress,omitempty"`
}

type Resolver

type Resolver interface {
	Resolve(did string) (*Document, error)
}

type Rule

type Rule struct {
	Grant []string               `json:"grant"`
	When  map[string]interface{} `json:"when"`
	Id    string                 `json:"id"`
}

type ServiceEndpoint

type ServiceEndpoint struct {
	Id              string `json:"id"`
	Type            string `json:"type"`
	ServiceEndpoint string `json:"serviceEndpoint"`
	Description     string `json:"description"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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