func (r *GormRepository) Load(ctx context.Context, ID uuid.UUID) (*Space, error) {
	res := Space{}
	tx := r.db.Where("id=?", ID).First(&res)
	if tx.RecordNotFound() {
		log.Error(ctx, map[string]interface{}{
			"space_id": ID.String(),
		}, "state or known referer was empty")
		return nil, errors.NewNotFoundError("space", ID.String())
	}
	if tx.Error != nil {
		return nil, errors.NewInternalError(tx.Error.Error())
	}
	return &res, nil
}
// Load returns the space for the given id
// returns NotFoundError or InternalError
Load returns the space for the given id
returns NotFoundError or InternalError
// Load returns the space for the given id // returns NotFoundError or InternalError
func (r *GormRepository) Load(ctx context.Context, ID uuid.UUID) (*Space, error) {
	res := Space{}
	tx := r.db.Where("id=?", ID).First(&res)
	if tx.RecordNotFound() {
		log.Error(ctx, map[string]interface{}{
			"space_id": ID.String(),
		}, "state or known referer was empty")
		return nil, errors.NewNotFoundError("space", ID.String())
	}
	if tx.Error != nil {
		return nil, errors.NewInternalError(tx.Error.Error())
	}
	return &res, nil
}
func ( r * GormRepository ) Load ( ctx context . Context , ID uuid . UUID ) ( * Space , error ) { res := Space { } tx := r . db . Where ( " " , ID ) . First ( & res ) if tx . RecordNotFound ( ) { log . Error ( ctx , map [ string ] interface { } { " " : ID . String ( ) , } , " " ) return nil , errors . NewNotFoundError ( " " , ID . String ( ) ) } if tx . Error != nil { return nil , errors . NewInternalError ( tx . Error . Error ( ) ) } return & res , nil }
Load returns the space for the given id
returns NotFoundError or InternalError
Load returns the space for the given id returns NotFoundError or InternalError