Imported project in git, removed bindata dependency

This commit is contained in:
2019-12-26 07:21:48 -09:00
committed by Christopher Ramey
parent b4cb7a823e
commit 948be25267
18 changed files with 230 additions and 491 deletions

View File

@ -2,7 +2,7 @@ package bolt
import (
"encoding/binary"
"qurl/qurl"
"git.binarythought.com/cdramey/qurl/obj"
)
var (
@ -15,7 +15,7 @@ var (
BrowserField = []byte{0x03}
)
func (stor *BoltStorage) AddQURL(q *qurl.QURL) error {
func (stor *BoltStorage) AddQURL(q *obj.QURL) error {
tx, err := stor.DB.Begin(true)
if err != nil {
return err
@ -122,7 +122,7 @@ func (stor *BoltStorage) SetQURLSequence(seq uint64) error {
return nil
}
func (stor *BoltStorage) GetQURLByURL(u string) (*qurl.QURL, error) {
func (stor *BoltStorage) GetQURLByURL(u string) (*obj.QURL, error) {
tx, err := stor.DB.Begin(false)
if err != nil {
return nil, err
@ -149,7 +149,7 @@ func (stor *BoltStorage) GetQURLByURL(u string) (*qurl.QURL, error) {
return nil, nil
}
q := &qurl.QURL{ID: binary.BigEndian.Uint64(bid)}
q := &obj.QURL{ID: binary.BigEndian.Uint64(bid)}
qu := qb.Get(URLField)
if qu != nil {
@ -159,7 +159,7 @@ func (stor *BoltStorage) GetQURLByURL(u string) (*qurl.QURL, error) {
return q, nil
}
func (stor *BoltStorage) GetQURLByID(id uint64) (*qurl.QURL, error) {
func (stor *BoltStorage) GetQURLByID(id uint64) (*obj.QURL, error) {
tx, err := stor.DB.Begin(false)
if err != nil {
return nil, err
@ -180,7 +180,7 @@ func (stor *BoltStorage) GetQURLByID(id uint64) (*qurl.QURL, error) {
return nil, nil
}
q := &qurl.QURL{ID: id}
q := &obj.QURL{ID: id}
qu := qb.Get(URLField)
if qu != nil {