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

		buf, err := json.Marshal(ticket)
		if err != nil {
			return err
		}

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