@@ -115,6 +115,15 @@ import "github.com/formancehq/ledger/internal"
115
115
116
116
## Constants
117
117
118
+ <a name =" StateInitializing " ></a >
119
+
120
+ ``` go
121
+ const (
122
+ StateInitializing = " initializing"
123
+ StateInUse = " in-use"
124
+ )
125
+ ```
126
+
118
127
<a name =" MetaTargetTypeAccount " ></a >
119
128
120
129
``` go
@@ -240,7 +249,7 @@ type BalancesByAssetsByAccounts map[string]BalancesByAssets
240
249
```
241
250
242
251
<a name =" Configuration " ></a >
243
- ## type [ Configuration] ( < https://github.com/formancehq/ledger/blob/main/internal/ledger.go#L85-L89 > )
252
+ ## type [ Configuration] ( < https://github.com/formancehq/ledger/blob/main/internal/ledger.go#L92-L96 > )
244
253
245
254
246
255
@@ -253,7 +262,7 @@ type Configuration struct {
253
262
```
254
263
255
264
<a name =" NewDefaultConfiguration " ></a >
256
- ### func [ NewDefaultConfiguration] ( < https://github.com/formancehq/ledger/blob/main/internal/ledger.go#L116 > )
265
+ ### func [ NewDefaultConfiguration] ( < https://github.com/formancehq/ledger/blob/main/internal/ledger.go#L123 > )
257
266
258
267
``` go
259
268
func NewDefaultConfiguration () Configuration
@@ -262,7 +271,7 @@ func NewDefaultConfiguration() Configuration
262
271
263
272
264
273
<a name="Configuration.SetDefaults"></a>
265
- ### func \(\*Configuration\) [SetDefaults](<https:// github.com/formancehq/ledger/blob/main/internal/ledger.go#L91 >)
274
+ ### func \(\*Configuration\) [SetDefaults](<https:// github.com/formancehq/ledger/blob/main/internal/ledger.go#L98 >)
266
275
267
276
```go
268
277
func (c *Configuration) SetDefaults()
@@ -271,7 +280,7 @@ func (c *Configuration) SetDefaults()
271
280
272
281
273
282
<a name="Configuration.Validate"></a>
274
- ### func \(\*Configuration\) [Validate](<https:// github.com/formancehq/ledger/blob/main/internal/ledger.go#L106 >)
283
+ ### func \(\*Configuration\) [Validate](<https:// github.com/formancehq/ledger/blob/main/internal/ledger.go#L113 >)
275
284
276
285
```go
277
286
func (c *Configuration) Validate() error
@@ -399,7 +408,7 @@ func (e ErrInvalidLedgerName) Is(err error) bool
399
408
400
409
401
410
<a name="Ledger"></a>
402
- ## type [Ledger](<https:// github.com/formancehq/ledger/blob/main/internal/ledger.go#L13-L20 >)
411
+ ## type [Ledger](<https:// github.com/formancehq/ledger/blob/main/internal/ledger.go#L18-L26 >)
403
412
404
413
405
414
@@ -411,11 +420,12 @@ type Ledger struct {
411
420
ID int ` json:"id" bun:"id,type:int,scanonly"`
412
421
Name string ` json:"name" bun:"name,type:varchar(255),pk"`
413
422
AddedAt time.Time ` json:"addedAt" bun:"added_at,type:timestamp,nullzero"`
423
+ State string ` json:"-" bun:"state,type:varchar(255),nullzero"`
414
424
}
415
425
```
416
426
417
427
<a name =" MustNewWithDefault " ></a >
418
- ### func [ MustNewWithDefault] ( < https://github.com/formancehq/ledger/blob/main/internal/ledger.go#L61 > )
428
+ ### func [ MustNewWithDefault] ( < https://github.com/formancehq/ledger/blob/main/internal/ledger.go#L68 > )
419
429
420
430
``` go
421
431
func MustNewWithDefault (name string ) Ledger
@@ -424,7 +434,7 @@ func MustNewWithDefault(name string) Ledger
424
434
425
435
426
436
<a name="New"></a>
427
- ### func [New](<https:// github.com/formancehq/ledger/blob/main/internal/ledger.go#L35 >)
437
+ ### func [New](<https:// github.com/formancehq/ledger/blob/main/internal/ledger.go#L41 >)
428
438
429
439
```go
430
440
func New(name string, configuration Configuration) (*Ledger, error)
@@ -433,7 +443,7 @@ func New(name string, configuration Configuration) (*Ledger, error)
433
443
434
444
435
445
<a name="NewWithDefaults"></a>
436
- ### func [NewWithDefaults](<https:// github.com/formancehq/ledger/blob/main/internal/ledger.go#L57 >)
446
+ ### func [NewWithDefaults](<https:// github.com/formancehq/ledger/blob/main/internal/ledger.go#L64 >)
437
447
438
448
```go
439
449
func NewWithDefaults(name string) (*Ledger, error)
@@ -442,7 +452,7 @@ func NewWithDefaults(name string) (*Ledger, error)
442
452
443
453
444
454
<a name="Ledger.HasFeature"></a>
445
- ### func \(Ledger\) [HasFeature](<https:// github.com/formancehq/ledger/blob/main/internal/ledger.go#L22 >)
455
+ ### func \(Ledger\) [HasFeature](<https:// github.com/formancehq/ledger/blob/main/internal/ledger.go#L28 >)
446
456
447
457
```go
448
458
func (l Ledger) HasFeature(feature, value string) bool
@@ -451,7 +461,7 @@ func (l Ledger) HasFeature(feature, value string) bool
451
461
452
462
453
463
<a name="Ledger.WithMetadata"></a>
454
- ### func \(Ledger\) [WithMetadata](<https:// github.com/formancehq/ledger/blob/main/internal/ledger.go#L30 >)
464
+ ### func \(Ledger\) [WithMetadata](<https:// github.com/formancehq/ledger/blob/main/internal/ledger.go#L36 >)
455
465
456
466
```go
457
467
func (l Ledger) WithMetadata(m metadata.Metadata) Ledger
0 commit comments