func NewBucketEntry(aType BucketEntryType, value interface{}) (result BucketEntry, err error) {
	result.Type = aType
	switch BucketEntryType(aType) {
	case BucketEntryTypeLiveentry:
		tv, ok := value.(LedgerEntry)
		if !ok {
			err = fmt.Errorf("invalid value, must be LedgerEntry")
			return
		}
		result.LiveEntry = &tv
	case BucketEntryTypeDeadentry:
		tv, ok := value.(LedgerKey)
		if !ok {
			err = fmt.Errorf("invalid value, must be LedgerKey")
			return
		}
		result.DeadEntry = &tv
	}
	return
}
func NewBucketEntry(aType BucketEntryType, value interface{}) (result BucketEntry, err error) {
	result.Type = aType
	switch BucketEntryType(aType) {
	case BucketEntryTypeLiveentry:
		tv, ok := value.(LedgerEntry)
		if !ok {
			err = fmt.Errorf("invalid value, must be LedgerEntry")
			return
		}
		result.LiveEntry = &tv
	case BucketEntryTypeDeadentry:
		tv, ok := value.(LedgerKey)
		if !ok {
			err = fmt.Errorf("invalid value, must be LedgerKey")
			return
		}
		result.DeadEntry = &tv
	}
	return
}
func NewBucketEntry ( aType BucketEntryType , value interface { } ) ( result BucketEntry , err error ) { result . Type = aType switch BucketEntryType ( aType ) { case BucketEntryTypeLiveentry : tv , ok := value . ( LedgerEntry ) if ! ok { err = fmt . Errorf ( " " ) return } result . LiveEntry = & tv case BucketEntryTypeDeadentry : tv , ok := value . ( LedgerKey ) if ! ok { err = fmt . Errorf ( " " ) return } result . DeadEntry = & tv } return }
// NewBucketEntry creates a new  BucketEntry.
NewBucketEntry creates a new BucketEntry .