rdb

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ParameterURL            = "url"
	ParameterSyncSchema     = "sync_schema"
	ParameterMigrationsPath = "migrations_path"
	ParameterLogLevel       = "log_level"
)

Variables

This section is empty.

Functions

func CheckEntSchemaCompatibility

func CheckEntSchemaCompatibility(client *ent.Client) error

func CreateIdentityBackend

func CreateIdentityBackend(params storage.Parameters, resolver cmdbase.ParameterResolver) (storage.IdentityBackend, error)

func MigrateSchemaWithScripts

func MigrateSchemaWithScripts(databaseURL, migrationsPath string) (uint, uint, error)

func NewEntClient

func NewEntClient(databaseURL string, logLevel zerolog.Level) (*ent.Client, error)

func SchemeFromURL

func SchemeFromURL(url string) (string, error)

SchemeFromURL returns the scheme from a URL string

Types

type RelationalBackend

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

func NewRelationalBackend

func NewRelationalBackend(client *ent.Client) *RelationalBackend

func (*RelationalBackend) Close

func (rbe *RelationalBackend) Close() error

func (*RelationalBackend) CreateAccount

func (rbe *RelationalBackend) CreateAccount(ctx context.Context, acct *account.Account) error

func (*RelationalBackend) CreateDIDDocument

func (rbe *RelationalBackend) CreateDIDDocument(ctx context.Context, ddoc *model.DIDDocument) error

func (*RelationalBackend) CreateRecoveryCode

func (rbe *RelationalBackend) CreateRecoveryCode(ctx context.Context, c *account.RecoveryCode) error

func (*RelationalBackend) DeleteAccessKey

func (rbe *RelationalBackend) DeleteAccessKey(ctx context.Context, keyID string) error

func (*RelationalBackend) DeleteAccount

func (rbe *RelationalBackend) DeleteAccount(ctx context.Context, id string) error

func (*RelationalBackend) DeleteProperty

func (rbe *RelationalBackend) DeleteProperty(ctx context.Context, accountID string, hash string) error

func (*RelationalBackend) DeleteRecoveryCode

func (rbe *RelationalBackend) DeleteRecoveryCode(ctx context.Context, code string) error

func (*RelationalBackend) GetAccessKey

func (rbe *RelationalBackend) GetAccessKey(ctx context.Context, keyID string) (*model.AccessKey, error)

func (*RelationalBackend) GetAccount

func (rbe *RelationalBackend) GetAccount(ctx context.Context, id string) (*account.Account, error)

func (*RelationalBackend) GetDIDDocument

func (rbe *RelationalBackend) GetDIDDocument(ctx context.Context, iid string) (*model.DIDDocument, error)

func (*RelationalBackend) GetIdentity

func (rbe *RelationalBackend) GetIdentity(ctx context.Context, accountID string, hash string) (*account.DataEnvelope, error)

func (*RelationalBackend) GetLocker

func (rbe *RelationalBackend) GetLocker(ctx context.Context, accountID string, hash string) (*account.DataEnvelope, error)

func (*RelationalBackend) GetProperty

func (rbe *RelationalBackend) GetProperty(ctx context.Context, accountID string, hash string) (*account.DataEnvelope, error)

func (*RelationalBackend) GetRecoveryCode

func (rbe *RelationalBackend) GetRecoveryCode(ctx context.Context, code string) (*account.RecoveryCode, error)

func (*RelationalBackend) HasAccountAccess

func (rbe *RelationalBackend) HasAccountAccess(ctx context.Context, accountID, targetAccountID string) (bool, error)

func (*RelationalBackend) ListAccessKeys

func (rbe *RelationalBackend) ListAccessKeys(ctx context.Context, accountID string) ([]*model.AccessKey, error)

func (*RelationalBackend) ListAccounts

func (rbe *RelationalBackend) ListAccounts(ctx context.Context, parentAccountID, stateFilter string) ([]*account.Account, error)

func (*RelationalBackend) ListDIDDocuments

func (rbe *RelationalBackend) ListDIDDocuments(ctx context.Context) ([]*model.DIDDocument, error)

func (*RelationalBackend) ListIdentities

func (rbe *RelationalBackend) ListIdentities(ctx context.Context, accountID string, lvl model.AccessLevel) ([]*account.DataEnvelope, error)

func (*RelationalBackend) ListLockers

func (rbe *RelationalBackend) ListLockers(ctx context.Context, accountID string, lvl model.AccessLevel) ([]*account.DataEnvelope, error)

func (*RelationalBackend) ListProperties

func (rbe *RelationalBackend) ListProperties(ctx context.Context, accountID string, lvl model.AccessLevel) ([]*account.DataEnvelope, error)

func (*RelationalBackend) StoreAccessKey

func (rbe *RelationalBackend) StoreAccessKey(ctx context.Context, accessKey *model.AccessKey) error

func (*RelationalBackend) StoreIdentity

func (rbe *RelationalBackend) StoreIdentity(ctx context.Context, accountID string, idy *account.DataEnvelope) error

func (*RelationalBackend) StoreLocker

func (rbe *RelationalBackend) StoreLocker(ctx context.Context, accountID string, l *account.DataEnvelope) error

func (*RelationalBackend) StoreProperty

func (rbe *RelationalBackend) StoreProperty(ctx context.Context, accountID string, prop *account.DataEnvelope) error

func (*RelationalBackend) UpdateAccount

func (rbe *RelationalBackend) UpdateAccount(ctx context.Context, acct *account.Account) error

Directories

Path Synopsis
ent
did

Jump to

Keyboard shortcuts

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