api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: GPL-3.0 Imports: 21 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProtoDeterministicChecksum

func ProtoDeterministicChecksum(m proto.Message) ([32]byte, error)

ProtoDeterministicChecksum returns a deterministic checksum of the given proto message.

Types

type GRPCConfig

type GRPCConfig struct {
	Shutdown chan os.Signal
	Log      *zap.SugaredLogger

	// Services
	DIDDocService  diddoc.DIDDoc
	AccountService account.Account
}

GRPCConfig defines the dependencies for the gRPC server

type GRPCServer

type GRPCServer struct {
	pbdidoc.UnimplementedDIDDocServer
	pbacc.UnimplementedAccountServer

	Log *zap.SugaredLogger

	// Services
	DIDDocService  diddoc.DIDDoc
	AccountService account.Account
}

GRPCServer implements server gRPC calls for the DID registry.

func NewGRPCServer

func NewGRPCServer(cfg GRPCConfig) (*grpc.Server, *GRPCServer)

NewGRPCServer creates a new grpc server

func (GRPCServer) Get

func (s GRPCServer) Get(ctx context.Context, msg *pb.GetRequest) (*pb.GetResponse, error)

Get DID document from the registry

func (GRPCServer) GetMetadataHistory

GetMetadataHistory returns historical records of metadata changes

func (GRPCServer) GetPublicKey

GetPublicKey returns a public key for registry account

func (GRPCServer) Register

Register DID in the registry

func (GRPCServer) RegisterAccount

RegisterAccount registers a new account in a registry

func (GRPCServer) SaveMetadata

SaveMetadata updates metadata for DID

func (GRPCServer) SaveVerificationMethods

SaveVerificationMethods saves verification methods for DID

Directories

Path Synopsis
pb
v1
v1/account
Package account is a reverse proxy.
Package account is a reverse proxy.
v1/diddoc
Package diddoc is a reverse proxy.
Package diddoc is a reverse proxy.

Jump to

Keyboard shortcuts

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