func (self *metadataStruct) TypedGetterSetter(id bucket.Id) ( ret *metadata.TypedGetterSetter, err error) { readerWriter, err := self.GetterSetter(id) if err != nil { return } return metadata.NewTyped(readerWriter), nil }
func validateSystemChange(change metadata.SingleValueGetterSetter) (err error) { changeDetector := metadata.ChangeDetector(change) switch changeDetector.Change() { case metadata.Change_PutReceiver: typed := metadata.NewTyped(&change) // If everything is ok, we can read them _, err = typed.PutReceivers() default: err = errors.New(fmt.Sprintf("Key %v is not known to the system. "+ "Change rejected.", change.Key)) } return }
func (self *metadataStruct) NewMemoryTypedReaderWriter( memoryMetadata metadata.MemoryMetadata) (readerWriter *metadata.TypedGetterSetter) { return metadata.NewTyped(&memoryMetadata) }