// Get retrieves anchor event by id.
Get retrieves anchor event by id.
// Get retrieves anchor event by id .
func (s *Store) Get(id string) (*vocab.AnchorEventType, error) {
	anchorEventBytes, err := s.store.Get(id)
	if err != nil {
		if errors.Is(err, storage.ErrDataNotFound) {
			return nil, orberrors.ErrContentNotFound
		}
		return nil, orberrors.NewTransient(fmt.Errorf("failed to get anchor event: %w", err))
	}
	anchorEvent := &vocab.AnchorEventType{}
	err = s.unmarshal(anchorEventBytes, &anchorEvent)
	if err != nil {
		return nil, fmt.Errorf("unmarshal anchor event: %w", err)
	}
	return anchorEvent, nil
}
func ( s * Store ) Get ( id string ) ( * vocab . AnchorEventType , error ) { anchorEventBytes , err := s . store . Get ( id ) if err != nil { if errors . Is ( err , storage . ErrDataNotFound ) { return nil , orberrors . ErrContentNotFound } return nil , orberrors . NewTransient ( fmt . Errorf ( " " , err ) ) } anchorEvent := & vocab . AnchorEventType { } err = s . unmarshal ( anchorEventBytes , & anchorEvent ) if err != nil { return nil , fmt . Errorf ( " " , err ) } return anchorEvent , nil }
Get retrieves anchor event by id.
Get retrieves anchor event by id .