plc

package
v0.0.0-...-3d844cd Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0, MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachingDidResolver

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

func NewCachingDidResolver

func NewCachingDidResolver(res did.Resolver, maxAge time.Duration, size int) *CachingDidResolver

func (*CachingDidResolver) FlushCacheFor

func (r *CachingDidResolver) FlushCacheFor(didstr string)

func (*CachingDidResolver) GetDocument

func (r *CachingDidResolver) GetDocument(ctx context.Context, didstr string) (*did.Document, error)

type FakeDid

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

func NewFakeDid

func NewFakeDid(db *gorm.DB) *FakeDid

func (*FakeDid) CreateDID

func (fd *FakeDid) CreateDID(ctx context.Context, sigkey *did.PrivKey, recovery string, handle string, service string) (string, error)

func (*FakeDid) FlushCacheFor

func (fd *FakeDid) FlushCacheFor(did string)

func (*FakeDid) GetDocument

func (fd *FakeDid) GetDocument(ctx context.Context, udid string) (*did.Document, error)

func (*FakeDid) UpdateUserHandle

func (fd *FakeDid) UpdateUserHandle(ctx context.Context, did string, nhandle string) error

type FakeDidMapping

type FakeDidMapping struct {
	gorm.Model
	Handle      string
	Did         string `gorm:"index"`
	Service     string
	KeyType     string
	PubKeyMbase string
}

type PLCClient

type PLCClient interface {
	didres.Resolver
	CreateDID(ctx context.Context, sigkey *did.PrivKey, recovery string, handle string, service string) (string, error)
	UpdateUserHandle(ctx context.Context, didstr string, nhandle string) error
}

Jump to

Keyboard shortcuts

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