func (b boltRepo) Store(w Type) error {
	data, err := json.Marshal(w)
	if err != nil {
		return err
	}

	err = b.client.Update(func(tx *bolt.Tx) error {
		bucket, err := tx.CreateBucketIfNotExists([]byte(b.BucketName))
		if err != nil {
			logrus.Trace("unable to create bucket on BOLT: ", b.BucketName, err)
			return err
		}

		return bucket.Put([]byte(w.ID), data)
	})

	return err
}
// Store the given key in the repository
Store the given key in the repository
// Store the given key in the repository
func (b boltRepo) Store(w Type) error {
	data, err := json.Marshal(w)
	if err != nil {
		return err
	}
	err = b.client.Update(func(tx *bolt.Tx) error {
		bucket, err := tx.CreateBucketIfNotExists([]byte(b.BucketName))
		if err != nil {
			logrus.Trace("unable to create bucket on BOLT: ", b.BucketName, err)
			return err
		}
		return bucket.Put([]byte(w.ID), data)
	})
	return err
}
func ( b boltRepo ) Store ( w Type ) error { data , err := json . Marshal ( w ) if err != nil { return err } err = b . client . Update ( func ( tx * bolt . Tx ) error { bucket , err := tx . CreateBucketIfNotExists ( [ ] byte ( b . BucketName ) ) if err != nil { logrus . Trace ( " " , b . BucketName , err ) return err } return bucket . Put ( [ ] byte ( w . ID ) , data ) } ) return err }
Store the given key in the repository
Store the given key in the repository