// FindByID finds an account by it's id
FindByID finds an account by it's id
// FindByID finds an account by it ' s id
func (s *AccountStore) FindByID(ctx context.Context, id string) (*account.Account, error) {
	data, err := s.estore.ReadStream(ctx, id)
	if err != nil {
		return nil, err
	}
	var evts []interface{}
	for _, evt := range data {
		evts = append(evts, evt.Event)
	}
	var acc account.Account
	return &acc, acc.Init(&acc, evts...)
}
func ( s * AccountStore ) FindByID ( ctx context . Context , id string ) ( * account . Account , error ) { data , err := s . estore . ReadStream ( ctx , id ) if err != nil { return nil , err } var evts [ ] interface { } for _ , evt := range data { evts = append ( evts , evt . Event ) } var acc account . Account return & acc , acc . Init ( & acc , evts ... ) }
FindByID finds an account by it's id
FindByID finds an account by it ' s id
// eg. extract additional props (CreatedAt etc...)