MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / CreateIdentity

Method CreateIdentity

identity.go:59–66  ·  view source on GitHub ↗

CreateIdentity creates a new identity in the database. Parameters: - identity model.Identity: The Identity model to be created. Returns: - model.Identity: The created Identity model. - error: An error if the identity could not be created.

(identity model.Identity)

Source from the content-addressed store, hash-verified

57// - model.Identity: The created Identity model.
58// - error: An error if the identity could not be created.
59func (l *LedgerForge) CreateIdentity(identity model.Identity) (model.Identity, error) {
60 identity, err := l.datasource.CreateIdentity(identity)
61 if err != nil {
62 return model.Identity{}, err
63 }
64 l.postIdentityActions(context.Background(), &identity)
65 return identity, nil
66}
67
68// GetIdentity retrieves an identity by its ID.
69//

Callers 1

TestCreateIdentityFunction · 0.95

Calls 2

postIdentityActionsMethod · 0.95
CreateIdentityMethod · 0.65

Tested by 1

TestCreateIdentityFunction · 0.76