Documentation ¶
Overview ¶
Package agent provides a reference implementation for a DID network management process.
Index ¶
- type Handler
- func (h *Handler) Close() error
- func (h *Handler) CustomGatewayOptions() []rpc.GatewayOption
- func (h *Handler) GatewaySetup() rpc.GatewayRegisterFunc
- func (h *Handler) Process(ctx context.Context, req *protov1.ProcessRequest) (err error)
- func (h *Handler) Retrieve(ctx context.Context, req *protov1.QueryRequest) (*did.Identifier, *did.ProofLD, error)
- func (h *Handler) ServerSetup(srv *grpc.Server)
- func (h *Handler) ServiceDesc() grpc.ServiceDesc
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler provides the required functionality for the DID method.
func NewHandler ¶
NewHandler starts a new DID method handler instance.
func (*Handler) CustomGatewayOptions ¶
func (h *Handler) CustomGatewayOptions() []rpc.GatewayOption
CustomGatewayOptions returns additional settings required when exposing the handler instance via HTTP.
func (*Handler) GatewaySetup ¶
func (h *Handler) GatewaySetup() rpc.GatewayRegisterFunc
GatewaySetup return the HTTP setup required to expose the handler instance via HTTP.
func (*Handler) Retrieve ¶
func (h *Handler) Retrieve(ctx context.Context, req *protov1.QueryRequest) (*did.Identifier, *did.ProofLD, error)
Retrieve an existing DID instance based on its subject string.
func (*Handler) ServerSetup ¶
ServerSetup perform all initialization requirements for the handler instance to be exposed through the provided gRPC server.
func (*Handler) ServiceDesc ¶
func (h *Handler) ServiceDesc() grpc.ServiceDesc
ServiceDesc returns the standard service description for `AgentAPI`.
type Storage ¶
type Storage interface { // Open will prepare the instance for usage. Open(info string) error // Close the storage instance, free resources and finish processing. Close() error // Description returns a brief information summary for the storage instance. Description() string // Exists will check if a record exists for the specified DID. Exists(id *did.Identifier) bool // Get will return a previously stored DID instance. Get(req *protov1.QueryRequest) (*did.Identifier, *did.ProofLD, error) // Save or update the record for the given DID instance. Save(id *did.Identifier, proof *did.ProofLD) error // Delete any existing records for the given DID instance. Delete(id *did.Identifier) error }
Storage defines an abstract component that provides and manage persistent data requirements for DID documents.