credentials

package
v0.0.0-...-e080771 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Session(actor, emulator string) (Session, error)
}

Client is client for credential service

func New

func New(queryConn messaging2.QueryConnection, eventConn messaging2.EventConnection, timeSrc func() time.Time) Client

New creates a new client

type Result

type Result struct {
	CredentialID string               `json:"credential"`
	ErrMsg       string               `json:"errMsg"`
	Tid          common.TransactionID `json:"tid"`
	Timestamp    time.Time            `json:"timestamp"`
}

Result is the result for operations like create and delete. This is to maintain the same schema for the REST api.

type Session

type Session interface {
	ListCredentials() ([]hm.Credential, error)
	GetCredential(id string) (hm.Credential, error)
	CreateCredential(credential hm.Credential) (Result, error)
	UpdateCredential(credID string, credential hm.CredentialUpdate) (Result, error)
	DeleteCredential(id string) (service.DepCheckDeletionResult, error)
}

Session is a session for an actor to perform operations on credentials.

Jump to

Keyboard shortcuts

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