feat(gl): expose ledger application and grpc operations
This commit is contained in:
@@ -80,6 +80,7 @@ type Journal struct {
|
||||
Entries []Entry
|
||||
ReversalOfJournalID string
|
||||
OccurredAt time.Time
|
||||
RecordedAt time.Time
|
||||
CorrelationID string
|
||||
ActorID string
|
||||
Blockchain BlockchainReference
|
||||
@@ -87,6 +88,20 @@ type Journal struct {
|
||||
PayloadHash string
|
||||
}
|
||||
|
||||
type AppendResult struct {
|
||||
JournalID string
|
||||
AlreadyExists bool
|
||||
}
|
||||
|
||||
type JournalFilter struct {
|
||||
Account *AccountReference
|
||||
AssetID *int64
|
||||
RecordedFrom *time.Time
|
||||
RecordedTo *time.Time
|
||||
Limit int
|
||||
Offset int
|
||||
}
|
||||
|
||||
func (j Journal) Validate() error {
|
||||
if j.ID == "" || j.SourceService == "" || j.IdempotencyKey == "" || j.SourceTransactionID == "" || j.EffectKind == "" {
|
||||
return fmt.Errorf("journal identity fields are required")
|
||||
|
||||
Reference in New Issue
Block a user