Documentation ¶
Overview ¶
Package memory is an output adapter to store entities in memory
Package memory is an output adapter to store entities in memory ¶
Package memory implements in memory output ¶
Package memory implements in memory output
Index ¶
- func NewMemoryRepository(cryptoKey []byte) *memoryRepository
- type DMO
- type EntityDMOMemory
- func (dmo *EntityDMOMemory) Created() int64
- func (dmo *EntityDMOMemory) Email() string
- func (dmo *EntityDMOMemory) HydrateFromEntity(ety *user.UserEntity) error
- func (dmo *EntityDMOMemory) Id() string
- func (dmo *EntityDMOMemory) Miles() int64
- func (dmo *EntityDMOMemory) Name() string
- func (dmo *EntityDMOMemory) Password() (string, error)
- func (dmo *EntityDMOMemory) Plan() string
- func (dmo *EntityDMOMemory) ToEntity() (*user.UserEntity, error)
- func (dmo *EntityDMOMemory) Updated() int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMemoryRepository ¶
func NewMemoryRepository(cryptoKey []byte) *memoryRepository
NewMemoryRepository in memory repository constructor function
Types ¶
type EntityDMOMemory ¶
type EntityDMOMemory struct { *user.EntityDMO Id_ string `json:"id"` Created_ int64 `json:"created"` Updated_ int64 `json:"updated"` Name_ string `json:"name,omitempty" ` Email_ string `json:"email,omitempty" ` Password_ string `json:"password,omitempty" torpedo.field:"encrypted"` Plan_ string `json:"plan,omitempty" ` Miles_ int64 `json:"miles,omitempty" ` DMO }
EntityDMOMemory Data Mapper Object to the memory output
func NewEntityDMOMemory ¶
func NewEntityDMOMemory(key []byte) *EntityDMOMemory
NewEntityDMOMemory constructor function
func NewEntityDMOMemoryFrom ¶
func NewEntityDMOMemoryFrom(ety *user.UserEntity, key []byte) (*EntityDMOMemory, error)
NewEntityDMOMemoryFrom constructor function from user.UserEntity
func (*EntityDMOMemory) HydrateFromEntity ¶
func (dmo *EntityDMOMemory) HydrateFromEntity(ety *user.UserEntity) error
HydrateFromEntity populates the DMO fields from the user.UserEntity
func (*EntityDMOMemory) Password ¶
func (dmo *EntityDMOMemory) Password() (string, error)
Password getter method
func (*EntityDMOMemory) ToEntity ¶
func (dmo *EntityDMOMemory) ToEntity() (*user.UserEntity, error)
ToEntity returns a user.UserEntity from the DMO object
Click to show internal directories.
Click to hide internal directories.