diddoc

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: BSD-3-Clause Imports: 8 Imported by: 1

README

diddoc

Documentation

Overview

Copyright 2023 The Go SSI Framework Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Copyright 2023 The Go SSI Framework Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Copyright 2023 The Go SSI Framework Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Copyright 2023 The Go SSI Framework Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBuilder

func NewBuilder() *builder

Types

type BuilderItem

type BuilderItem struct {
	Key, Value interface{}
}

BuilderItem representation of one map item.

type BuilderSlice

type BuilderSlice []BuilderItem

MapSlice of map items.

type Context

type Context []string

type Document

type Document struct {
	// contains filtered or unexported fields
}

didDocument holds the properties, the metadsata, and options for document resolution

func NewDocument

func NewDocument() *Document

NewDocument creates a document instance

func (*Document) AlsoKnownAs

func (d *Document) AlsoKnownAs() interface{}

AlsoKnownAs gets the alsoKnownAs property of the document

func (*Document) AssertionMethod

func (d *Document) AssertionMethod() interface{}

AssertionMethod gets the assertionMethod property of the document

func (*Document) Authentication

func (d *Document) Authentication() interface{}

Authentication gets the authentication property of the document

func (*Document) CapabilityDelegation

func (d *Document) CapabilityDelegation() interface{}

CapabilityDelegation gets the capabilityDelegation property of the document

func (*Document) CapabilityInvocation

func (d *Document) CapabilityInvocation() interface{}

CapabilityInvocation gets the capabilityInvocation property of the document

func (*Document) Context

func (d *Document) Context() interface{}

Context gets the context property of the document

func (*Document) Controller

func (d *Document) Controller() interface{}

Controller gets the controller property of the document

func (*Document) Get

func (d *Document) Get(key string) interface{}

Get gets the value of the property with a key

func (*Document) GetAssociatedVerificationMethod

func (d *Document) GetAssociatedVerificationMethod(purpose ProofPurpose) ([]VerificationMethod, error)

GetAssociatedVerificationMethod gets the associated verification method for a purpose

func (*Document) GetVerificationMethodById

func (d *Document) GetVerificationMethodById(keyId string) (VerificationMethod, error)

func (*Document) KeyAgreement

func (d *Document) KeyAgreement() interface{}

KeyAgreement gets the keyAgreement property of the document

func (*Document) MarshalJSON

func (d *Document) MarshalJSON() ([]byte, error)

func (*Document) Metadata

func (d *Document) Metadata() DocumentMetadata

Metadata gets the metadata of the document

func (*Document) Services

func (d *Document) Services() interface{}

Services gets the services property of the document

func (*Document) Set

func (d *Document) Set(key, value interface{}) error

Set sets the value of the property with a key

func (*Document) Subject

func (d *Document) Subject() interface{}

Subject gets the did subject property of the document

func (*Document) UnmarshalJSON

func (d *Document) UnmarshalJSON(data []byte) error

func (*Document) VerificationMethod

func (d *Document) VerificationMethod() interface{}

VerificationMethod gets the verificationMethod property of the document

type DocumentMetadata

type DocumentMetadata struct {
	// Deactivated is deactivated flag key.
	Deactivated bool `json:"deactivated"`
}

DocumentMetadata document metadata, consist of the REQUIRED attributes.

type MapItem

type MapItem struct {
	Key, Value interface{}
}

MapItem representation of one map item.

type MapSlice

type MapSlice []MapItem

MapSlice of map items.

type Proof

type Proof struct {
	Type               string       `json:"type,omitempty"`
	Created            time.Time    `json:"created,omitempty"`
	VerificationMethod string       `json:"verificationMethod,omitempty"`
	ProofPurpose       ProofPurpose `json:"proofPurpose,omitempty"`
	Nonce              string       `json:"nonce,omitempty"`
	ProofValue         *string      `json:"jws,omitempty"`
}

type ProofPurpose

type ProofPurpose string
const (
	AssertionMethod      ProofPurpose = "assertionMethod"
	Authentication       ProofPurpose = "authentication"
	KeyAgreement         ProofPurpose = "keyAgreement"
	CapabilityInvocation ProofPurpose = "capabilityInvocation"
	CapabilityDelegation ProofPurpose = "capabilityDelegation"
)

func (ProofPurpose) String

func (p ProofPurpose) String() string

type Service

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

type VerificationMethod

type VerificationMethod struct {
	Id                 string      `json:"id,omitempty"`
	Type               string      `json:"type,omitempty"`
	Controller         string      `json:"controller,omitempty"`
	PubicKeyJWK        interface{} `json:"publicKeyJwk,omitempty"`
	PublicKeyMultibase string      `json:"publicKeyMultibase,omitempty"`
}

type VerificationRelation

type VerificationRelation interface{}

Jump to

Keyboard shortcuts

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