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

Method GetLedgerByID

ledger.go:121–123  ·  view source on GitHub ↗

GetLedgerByID retrieves a ledger by its ID from the datasource. It returns a pointer to the Ledger model and an error if the operation fails. Parameters: - id: A string representing the ID of the ledger to retrieve. Returns: - *model.Ledger: A pointer to the Ledger model if found. - error: An erro

(id string)

Source from the content-addressed store, hash-verified

119// - *model.Ledger: A pointer to the Ledger model if found.
120// - error: An error if the ledger could not be retrieved.
121func (l *LedgerForge) GetLedgerByID(id string) (*model.Ledger, error) {
122 return l.datasource.GetLedgerByID(id)
123}
124
125// UpdateLedger updates an existing ledger's name.
126// It calls postLedgerActions after a successful update to handle indexing and webhooks.

Callers 2

UpdateMetadataMethod · 0.95
TestGetLedgerByIDFunction · 0.95

Calls 1

GetLedgerByIDMethod · 0.65

Tested by 1

TestGetLedgerByIDFunction · 0.76