Documentation ¶
Index ¶
- func EncodeString(s string) string
- func Exists(file string) bool
- func GetEnv() string
- func NewULID() ulid.ULID
- func ReadFile(file string, obj interface{}) ([]byte, error)
- func ReadFileLines(file string) ([]string, error)
- func WriteFile(file string, obj interface{}) error
- type Aggregate
- type AppConfig
- type Event
- type EventSourcing
- type EventSourcingConfig
- type EventSourcingOption
- type EventsType
- type IEvent
- type IStorage
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeString ¶
func ReadFileLines ¶
Types ¶
type Aggregate ¶
type Aggregate struct { Id string Type string Version int64 Data interface{} Events []IEvent CreatedAt time.Time UpdatedAt time.Time // contains filtered or unexported fields }
func NewAggregate ¶
func (*Aggregate) AddEventHandler ¶
type AppConfig ¶
type AppConfig struct {
EventSourcing *EventSourcingConfig `json:"event-sourcing"`
}
AppConfig ...
type Event ¶
func (*Event) GetCreatedAt ¶
type EventSourcing ¶
type EventSourcing struct {
// contains filtered or unexported fields
}
func NewEventSourcing ¶
func NewEventSourcing(options ...EventSourcingOption) (*EventSourcing, error)
func (*EventSourcing) Reconfigure ¶
func (es *EventSourcing) Reconfigure(options ...EventSourcingOption)
Reconfigure ...
func (*EventSourcing) Save ¶
func (es *EventSourcing) Save(aggregate *Aggregate) (err error)
type EventSourcingConfig ¶
type EventSourcingConfig struct { Db manager.DBConfig `json:"db"` Migration services.MigrationConfig `json:"migration"` Log struct { Level string `json:"level"` } `json:"log"` }
UploaderConfig ...
type EventSourcingOption ¶
type EventSourcingOption func(es *EventSourcing)
EventSourcingOption ...
func WithConfiguration ¶
func WithConfiguration(config *EventSourcingConfig) EventSourcingOption
WithConfiguration ...
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func (*Storage) GetAggregate ¶
func (*Storage) StoreAggregate ¶
Click to show internal directories.
Click to hide internal directories.