diff --git a/examples/needle/bestsellers/db.go b/examples/needle/bestsellers/db.go index 8fbcfe2e42..e7cb9d2021 100644 --- a/examples/needle/bestsellers/db.go +++ b/examples/needle/bestsellers/db.go @@ -1,49 +1,24 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v2.0.2-1-g38858e5b-dirty-wicked-fork +// sqlc v2.1.0-1-g1f618f69-wicked-fork package bestsellers import ( - "context" - "time" - - "github.com/jackc/pgx/v5" - "github.com/jackc/pgx/v5/pgconn" + "github.com/stumble/dcache" "github.com/stumble/wpgx" ) -type WGConn interface { - WQuery( - ctx context.Context, name string, unprepared string, args ...interface{}) (pgx.Rows, error) - WQueryRow( - ctx context.Context, name string, unprepared string, args ...interface{}) pgx.Row - WExec( - ctx context.Context, name string, unprepared string, args ...interface{}) (pgconn.CommandTag, error) - - PostExec(f wpgx.PostExecFunc) error -} - -type ReadWithTtlFunc = func() (any, time.Duration, error) - // BeforeDump allows you to edit result before dump. type BeforeDump func(m *Bestseller) -type Cache interface { - GetWithTtl( - ctx context.Context, key string, target any, - readWithTtl ReadWithTtlFunc, noCache bool, noStore bool) error - Set(ctx context.Context, key string, val any, ttl time.Duration) error - Invalidate(ctx context.Context, key string) error -} - -func New(db WGConn, cache Cache) *Queries { +func New(db wpgx.WGConn, cache *dcache.DCache) *Queries { return &Queries{db: db, cache: cache} } type Queries struct { - db WGConn - cache Cache + db wpgx.WGConn + cache *dcache.DCache } func (q *Queries) WithTx(tx *wpgx.WTx) *Queries { @@ -53,7 +28,7 @@ func (q *Queries) WithTx(tx *wpgx.WTx) *Queries { } } -func (q *Queries) WithCache(cache Cache) *Queries { +func (q *Queries) WithCache(cache *dcache.DCache) *Queries { return &Queries{ db: q.db, cache: cache, diff --git a/examples/needle/bestsellers/models.go b/examples/needle/bestsellers/models.go index 06e4f1c2b9..2d168cdeb6 100644 --- a/examples/needle/bestsellers/models.go +++ b/examples/needle/bestsellers/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v2.0.2-1-g38858e5b-dirty-wicked-fork +// sqlc v2.1.0-1-g1f618f69-wicked-fork package bestsellers diff --git a/examples/needle/bestsellers/query.sql.go b/examples/needle/bestsellers/query.sql.go index c8af60435a..ef91714220 100644 --- a/examples/needle/bestsellers/query.sql.go +++ b/examples/needle/bestsellers/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v2.0.2-1-g38858e5b-dirty-wicked-fork +// sqlc v2.1.0-1-g1f618f69-wicked-fork // source: query.sql package bestsellers diff --git a/examples/needle/items/copyfrom.go b/examples/needle/items/copyfrom.go index c75b82be92..94b5f1a36e 100644 --- a/examples/needle/items/copyfrom.go +++ b/examples/needle/items/copyfrom.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v2.0.2-1-g38858e5b-dirty-wicked-fork +// sqlc v2.1.0-1-g1f618f69-wicked-fork // source: copyfrom.go package items diff --git a/examples/needle/items/db.go b/examples/needle/items/db.go index 3621fc46df..c034354555 100644 --- a/examples/needle/items/db.go +++ b/examples/needle/items/db.go @@ -1,50 +1,24 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v2.0.2-1-g38858e5b-dirty-wicked-fork +// sqlc v2.1.0-1-g1f618f69-wicked-fork package items import ( - "context" - "time" - - "github.com/jackc/pgx/v5" - "github.com/jackc/pgx/v5/pgconn" + "github.com/stumble/dcache" "github.com/stumble/wpgx" ) -type WGConn interface { - WQuery( - ctx context.Context, name string, unprepared string, args ...interface{}) (pgx.Rows, error) - WQueryRow( - ctx context.Context, name string, unprepared string, args ...interface{}) pgx.Row - WExec( - ctx context.Context, name string, unprepared string, args ...interface{}) (pgconn.CommandTag, error) - WCopyFrom(ctx context.Context, name string, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error) - - PostExec(f wpgx.PostExecFunc) error -} - -type ReadWithTtlFunc = func() (any, time.Duration, error) - // BeforeDump allows you to edit result before dump. type BeforeDump func(m *Item) -type Cache interface { - GetWithTtl( - ctx context.Context, key string, target any, - readWithTtl ReadWithTtlFunc, noCache bool, noStore bool) error - Set(ctx context.Context, key string, val any, ttl time.Duration) error - Invalidate(ctx context.Context, key string) error -} - -func New(db WGConn, cache Cache) *Queries { +func New(db wpgx.WGConn, cache *dcache.DCache) *Queries { return &Queries{db: db, cache: cache} } type Queries struct { - db WGConn - cache Cache + db wpgx.WGConn + cache *dcache.DCache } func (q *Queries) WithTx(tx *wpgx.WTx) *Queries { @@ -54,7 +28,7 @@ func (q *Queries) WithTx(tx *wpgx.WTx) *Queries { } } -func (q *Queries) WithCache(cache Cache) *Queries { +func (q *Queries) WithCache(cache *dcache.DCache) *Queries { return &Queries{ db: q.db, cache: cache, diff --git a/examples/needle/items/models.go b/examples/needle/items/models.go index 34d0c40d5a..7e6ddfd092 100644 --- a/examples/needle/items/models.go +++ b/examples/needle/items/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v2.0.2-1-g38858e5b-dirty-wicked-fork +// sqlc v2.1.0-1-g1f618f69-wicked-fork package items diff --git a/examples/needle/items/query.sql.go b/examples/needle/items/query.sql.go index e8ed2b5e28..9c094a029e 100644 --- a/examples/needle/items/query.sql.go +++ b/examples/needle/items/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v2.0.2-1-g38858e5b-dirty-wicked-fork +// sqlc v2.1.0-1-g1f618f69-wicked-fork // source: query.sql package items @@ -91,7 +91,7 @@ func (q *Queries) DeleteItem(ctx context.Context, id int64, getItemByID *int64, _ = q.db.PostExec(func() error { var anyErr error if getItemByID != nil { - key := "items:GetItemByID" + hashIfLong(fmt.Sprintf("%+v", *getItemByID)) + key := "items:GetItemByID:" + hashIfLong(fmt.Sprintf("%+v", *getItemByID)) err = q.cache.Invalidate(ctx, key) if err != nil { log.Error().Err(err).Msgf( @@ -100,7 +100,7 @@ func (q *Queries) DeleteItem(ctx context.Context, id int64, getItemByID *int64, } } if searchItems != nil { - key := "items:SearchItems" + hashIfLong(fmt.Sprintf("%+v", *searchItems)) + key := "items:SearchItems:" + hashIfLong(fmt.Sprintf("%+v", *searchItems)) err = q.cache.Invalidate(ctx, key) if err != nil { log.Error().Err(err).Msgf( @@ -108,7 +108,7 @@ func (q *Queries) DeleteItem(ctx context.Context, id int64, getItemByID *int64, anyErr = err } } - key := "items:ListAllItems" + key := "items:ListAllItems:" err = q.cache.Invalidate(ctx, key) if err != nil { log.Error().Err(err).Msgf( @@ -140,7 +140,7 @@ func (q *Queries) DeleteTwoItem(ctx context.Context, arg DeleteTwoItemParams, ge _ = q.db.PostExec(func() error { var anyErr error if getItemByID != nil { - key := "items:GetItemByID" + hashIfLong(fmt.Sprintf("%+v", *getItemByID)) + key := "items:GetItemByID:" + hashIfLong(fmt.Sprintf("%+v", *getItemByID)) err = q.cache.Invalidate(ctx, key) if err != nil { log.Error().Err(err).Msgf( @@ -149,7 +149,7 @@ func (q *Queries) DeleteTwoItem(ctx context.Context, arg DeleteTwoItemParams, ge } } if getItemByID1 != nil { - key := "items:GetItemByID" + hashIfLong(fmt.Sprintf("%+v", *getItemByID1)) + key := "items:GetItemByID:" + hashIfLong(fmt.Sprintf("%+v", *getItemByID1)) err = q.cache.Invalidate(ctx, key) if err != nil { log.Error().Err(err).Msgf( @@ -196,7 +196,7 @@ func (q *Queries) GetItemByID(ctx context.Context, id int64) (*Item, error) { } var i *Item - err := q.cache.GetWithTtl(ctx, "items:GetItemByID"+hashIfLong(fmt.Sprintf("%+v", id)), &i, dbRead, false, false) + err := q.cache.GetWithTtl(ctx, "items:GetItemByID:"+hashIfLong(fmt.Sprintf("%+v", id)), &i, dbRead, false, false) if err != nil { return nil, err } @@ -246,7 +246,7 @@ func (q *Queries) ListAllItems(ctx context.Context) ([]Item, error) { return items.([]Item), err } var items []Item - err := q.cache.GetWithTtl(ctx, "items:ListAllItems", &items, dbRead, false, false) + err := q.cache.GetWithTtl(ctx, "items:ListAllItems:", &items, dbRead, false, false) if err != nil { return nil, err } @@ -378,7 +378,7 @@ func (q *Queries) SearchItems(ctx context.Context, name string) ([]Item, error) return items.([]Item), err } var items []Item - err := q.cache.GetWithTtl(ctx, "items:SearchItems"+hashIfLong(fmt.Sprintf("%+v", name)), &items, dbRead, false, false) + err := q.cache.GetWithTtl(ctx, "items:SearchItems:"+hashIfLong(fmt.Sprintf("%+v", name)), &items, dbRead, false, false) if err != nil { return nil, err } @@ -409,7 +409,7 @@ func (q *Queries) UpdateQRCode(ctx context.Context, arg UpdateQRCodeParams, getI _ = q.db.PostExec(func() error { var anyErr error if getItemByID != nil { - key := "items:GetItemByID" + hashIfLong(fmt.Sprintf("%+v", *getItemByID)) + key := "items:GetItemByID:" + hashIfLong(fmt.Sprintf("%+v", *getItemByID)) err = q.cache.Invalidate(ctx, key) if err != nil { log.Error().Err(err).Msgf( diff --git a/examples/needle/listings/db.go b/examples/needle/listings/db.go index 52c568a107..080df10f35 100644 --- a/examples/needle/listings/db.go +++ b/examples/needle/listings/db.go @@ -1,49 +1,24 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v2.0.2-1-g38858e5b-dirty-wicked-fork +// sqlc v2.1.0-1-g1f618f69-wicked-fork package listings import ( - "context" - "time" - - "github.com/jackc/pgx/v5" - "github.com/jackc/pgx/v5/pgconn" + "github.com/stumble/dcache" "github.com/stumble/wpgx" ) -type WGConn interface { - WQuery( - ctx context.Context, name string, unprepared string, args ...interface{}) (pgx.Rows, error) - WQueryRow( - ctx context.Context, name string, unprepared string, args ...interface{}) pgx.Row - WExec( - ctx context.Context, name string, unprepared string, args ...interface{}) (pgconn.CommandTag, error) - - PostExec(f wpgx.PostExecFunc) error -} - -type ReadWithTtlFunc = func() (any, time.Duration, error) - // BeforeDump allows you to edit result before dump. type BeforeDump func(m *Listing) -type Cache interface { - GetWithTtl( - ctx context.Context, key string, target any, - readWithTtl ReadWithTtlFunc, noCache bool, noStore bool) error - Set(ctx context.Context, key string, val any, ttl time.Duration) error - Invalidate(ctx context.Context, key string) error -} - -func New(db WGConn, cache Cache) *Queries { +func New(db wpgx.WGConn, cache *dcache.DCache) *Queries { return &Queries{db: db, cache: cache} } type Queries struct { - db WGConn - cache Cache + db wpgx.WGConn + cache *dcache.DCache } func (q *Queries) WithTx(tx *wpgx.WTx) *Queries { @@ -53,7 +28,7 @@ func (q *Queries) WithTx(tx *wpgx.WTx) *Queries { } } -func (q *Queries) WithCache(cache Cache) *Queries { +func (q *Queries) WithCache(cache *dcache.DCache) *Queries { return &Queries{ db: q.db, cache: cache, diff --git a/examples/needle/listings/models.go b/examples/needle/listings/models.go index 0c551c3f2d..ce84d7a02d 100644 --- a/examples/needle/listings/models.go +++ b/examples/needle/listings/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v2.0.2-1-g38858e5b-dirty-wicked-fork +// sqlc v2.1.0-1-g1f618f69-wicked-fork package listings diff --git a/examples/needle/listings/query.sql.go b/examples/needle/listings/query.sql.go index b45af3285a..f6ee17a4e2 100644 --- a/examples/needle/listings/query.sql.go +++ b/examples/needle/listings/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v2.0.2-1-g38858e5b-dirty-wicked-fork +// sqlc v2.1.0-1-g1f618f69-wicked-fork // source: query.sql package listings diff --git a/examples/needle/orders/db.go b/examples/needle/orders/db.go index af1bdbd740..361b6b9efc 100644 --- a/examples/needle/orders/db.go +++ b/examples/needle/orders/db.go @@ -1,49 +1,24 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v2.0.2-1-g38858e5b-dirty-wicked-fork +// sqlc v2.1.0-1-g1f618f69-wicked-fork package orders import ( - "context" - "time" - - "github.com/jackc/pgx/v5" - "github.com/jackc/pgx/v5/pgconn" + "github.com/stumble/dcache" "github.com/stumble/wpgx" ) -type WGConn interface { - WQuery( - ctx context.Context, name string, unprepared string, args ...interface{}) (pgx.Rows, error) - WQueryRow( - ctx context.Context, name string, unprepared string, args ...interface{}) pgx.Row - WExec( - ctx context.Context, name string, unprepared string, args ...interface{}) (pgconn.CommandTag, error) - - PostExec(f wpgx.PostExecFunc) error -} - -type ReadWithTtlFunc = func() (any, time.Duration, error) - // BeforeDump allows you to edit result before dump. type BeforeDump func(m *Order) -type Cache interface { - GetWithTtl( - ctx context.Context, key string, target any, - readWithTtl ReadWithTtlFunc, noCache bool, noStore bool) error - Set(ctx context.Context, key string, val any, ttl time.Duration) error - Invalidate(ctx context.Context, key string) error -} - -func New(db WGConn, cache Cache) *Queries { +func New(db wpgx.WGConn, cache *dcache.DCache) *Queries { return &Queries{db: db, cache: cache} } type Queries struct { - db WGConn - cache Cache + db wpgx.WGConn + cache *dcache.DCache } func (q *Queries) WithTx(tx *wpgx.WTx) *Queries { @@ -53,7 +28,7 @@ func (q *Queries) WithTx(tx *wpgx.WTx) *Queries { } } -func (q *Queries) WithCache(cache Cache) *Queries { +func (q *Queries) WithCache(cache *dcache.DCache) *Queries { return &Queries{ db: q.db, cache: cache, diff --git a/examples/needle/orders/models.go b/examples/needle/orders/models.go index d3a0012f93..d4c0d76fff 100644 --- a/examples/needle/orders/models.go +++ b/examples/needle/orders/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v2.0.2-1-g38858e5b-dirty-wicked-fork +// sqlc v2.1.0-1-g1f618f69-wicked-fork package orders diff --git a/examples/needle/orders/query.sql.go b/examples/needle/orders/query.sql.go index 55d8f78aeb..72f0b42d14 100644 --- a/examples/needle/orders/query.sql.go +++ b/examples/needle/orders/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v2.0.2-1-g38858e5b-dirty-wicked-fork +// sqlc v2.1.0-1-g1f618f69-wicked-fork // source: query.sql package orders @@ -134,7 +134,7 @@ func (q *Queries) GetOrderByID(ctx context.Context) (*GetOrderByIDRow, error) { } var i *GetOrderByIDRow - err := q.cache.GetWithTtl(ctx, "orders:GetOrderByID", &i, dbRead, false, false) + err := q.cache.GetWithTtl(ctx, "orders:GetOrderByID:", &i, dbRead, false, false) if err != nil { return nil, err } diff --git a/examples/needle/users/db.go b/examples/needle/users/db.go index b72d5b4ad6..24e9113f17 100644 --- a/examples/needle/users/db.go +++ b/examples/needle/users/db.go @@ -1,49 +1,24 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v2.0.2-1-g38858e5b-dirty-wicked-fork +// sqlc v2.1.0-1-g1f618f69-wicked-fork package users import ( - "context" - "time" - - "github.com/jackc/pgx/v5" - "github.com/jackc/pgx/v5/pgconn" + "github.com/stumble/dcache" "github.com/stumble/wpgx" ) -type WGConn interface { - WQuery( - ctx context.Context, name string, unprepared string, args ...interface{}) (pgx.Rows, error) - WQueryRow( - ctx context.Context, name string, unprepared string, args ...interface{}) pgx.Row - WExec( - ctx context.Context, name string, unprepared string, args ...interface{}) (pgconn.CommandTag, error) - - PostExec(f wpgx.PostExecFunc) error -} - -type ReadWithTtlFunc = func() (any, time.Duration, error) - // BeforeDump allows you to edit result before dump. type BeforeDump func(m *User) -type Cache interface { - GetWithTtl( - ctx context.Context, key string, target any, - readWithTtl ReadWithTtlFunc, noCache bool, noStore bool) error - Set(ctx context.Context, key string, val any, ttl time.Duration) error - Invalidate(ctx context.Context, key string) error -} - -func New(db WGConn, cache Cache) *Queries { +func New(db wpgx.WGConn, cache *dcache.DCache) *Queries { return &Queries{db: db, cache: cache} } type Queries struct { - db WGConn - cache Cache + db wpgx.WGConn + cache *dcache.DCache } func (q *Queries) WithTx(tx *wpgx.WTx) *Queries { @@ -53,7 +28,7 @@ func (q *Queries) WithTx(tx *wpgx.WTx) *Queries { } } -func (q *Queries) WithCache(cache Cache) *Queries { +func (q *Queries) WithCache(cache *dcache.DCache) *Queries { return &Queries{ db: q.db, cache: cache, diff --git a/examples/needle/users/models.go b/examples/needle/users/models.go index ffbbe1a54c..526c8d0199 100644 --- a/examples/needle/users/models.go +++ b/examples/needle/users/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v2.0.2-1-g38858e5b-dirty-wicked-fork +// sqlc v2.1.0-1-g1f618f69-wicked-fork package users diff --git a/examples/needle/users/query.sql.go b/examples/needle/users/query.sql.go index b32fbff2b5..61d4953076 100644 --- a/examples/needle/users/query.sql.go +++ b/examples/needle/users/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v2.0.2-1-g38858e5b-dirty-wicked-fork +// sqlc v2.1.0-1-g1f618f69-wicked-fork // source: query.sql package users @@ -56,7 +56,7 @@ func (q *Queries) Complicated(ctx context.Context, n int32) (*int32, error) { } var x *int32 - err := q.cache.GetWithTtl(ctx, "users:Complicated"+hashIfLong(fmt.Sprintf("%+v", n)), &x, dbRead, false, false) + err := q.cache.GetWithTtl(ctx, "users:Complicated:"+hashIfLong(fmt.Sprintf("%+v", n)), &x, dbRead, false, false) if err != nil { return nil, err } @@ -100,7 +100,7 @@ func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams, getUserB _ = q.db.PostExec(func() error { var anyErr error if getUserByID != nil { - key := "users:GetUserByID" + hashIfLong(fmt.Sprintf("%+v", *getUserByID)) + key := "users:GetUserByID:" + hashIfLong(fmt.Sprintf("%+v", *getUserByID)) err = q.cache.Invalidate(ctx, key) if err != nil { log.Error().Err(err).Msgf( @@ -109,7 +109,7 @@ func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams, getUserB } } if getUserByName != nil { - key := "users:GetUserByName" + hashIfLong(fmt.Sprintf("%+v", *getUserByName)) + key := "users:GetUserByName:" + hashIfLong(fmt.Sprintf("%+v", *getUserByName)) err = q.cache.Invalidate(ctx, key) if err != nil { log.Error().Err(err).Msgf( @@ -137,7 +137,7 @@ func (q *Queries) DeleteBadUsers(ctx context.Context, name string, getUserByID * _ = q.db.PostExec(func() error { var anyErr error if getUserByID != nil { - key := "users:GetUserByID" + hashIfLong(fmt.Sprintf("%+v", *getUserByID)) + key := "users:GetUserByID:" + hashIfLong(fmt.Sprintf("%+v", *getUserByID)) err = q.cache.Invalidate(ctx, key) if err != nil { log.Error().Err(err).Msgf( @@ -165,7 +165,7 @@ func (q *Queries) DeleteUser(ctx context.Context, id int32, getUserByID *int32, _ = q.db.PostExec(func() error { var anyErr error if getUserByID != nil { - key := "users:GetUserByID" + hashIfLong(fmt.Sprintf("%+v", *getUserByID)) + key := "users:GetUserByID:" + hashIfLong(fmt.Sprintf("%+v", *getUserByID)) err = q.cache.Invalidate(ctx, key) if err != nil { log.Error().Err(err).Msgf( @@ -174,7 +174,7 @@ func (q *Queries) DeleteUser(ctx context.Context, id int32, getUserByID *int32, } } if getUserByName != nil { - key := "users:GetUserByName" + hashIfLong(fmt.Sprintf("%+v", *getUserByName)) + key := "users:GetUserByName:" + hashIfLong(fmt.Sprintf("%+v", *getUserByName)) err = q.cache.Invalidate(ctx, key) if err != nil { log.Error().Err(err).Msgf( @@ -216,7 +216,7 @@ func (q *Queries) GetUserByID(ctx context.Context, id int32) (*User, error) { } var i *User - err := q.cache.GetWithTtl(ctx, "users:GetUserByID"+hashIfLong(fmt.Sprintf("%+v", id)), &i, dbRead, false, false) + err := q.cache.GetWithTtl(ctx, "users:GetUserByID:"+hashIfLong(fmt.Sprintf("%+v", id)), &i, dbRead, false, false) if err != nil { return nil, err } @@ -253,7 +253,7 @@ func (q *Queries) GetUserByName(ctx context.Context, name string) (*User, error) } var i *User - err := q.cache.GetWithTtl(ctx, "users:GetUserByName"+hashIfLong(fmt.Sprintf("%+v", name)), &i, dbRead, false, false) + err := q.cache.GetWithTtl(ctx, "users:GetUserByName:"+hashIfLong(fmt.Sprintf("%+v", name)), &i, dbRead, false, false) if err != nil { return nil, err } @@ -409,7 +409,7 @@ func (q *Queries) UpdateUserGrade(ctx context.Context, arg UpdateUserGradeParams _ = q.db.PostExec(func() error { var anyErr error if getUserByID != nil { - key := "users:GetUserByID" + hashIfLong(fmt.Sprintf("%+v", *getUserByID)) + key := "users:GetUserByID:" + hashIfLong(fmt.Sprintf("%+v", *getUserByID)) err = q.cache.Invalidate(ctx, key) if err != nil { log.Error().Err(err).Msgf( diff --git a/examples/needle/vitems/db.go b/examples/needle/vitems/db.go index 0d0a532e9f..889febe7f0 100644 --- a/examples/needle/vitems/db.go +++ b/examples/needle/vitems/db.go @@ -1,49 +1,24 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v2.0.2-1-g38858e5b-dirty-wicked-fork +// sqlc v2.1.0-1-g1f618f69-wicked-fork package vitems import ( - "context" - "time" - - "github.com/jackc/pgx/v5" - "github.com/jackc/pgx/v5/pgconn" + "github.com/stumble/dcache" "github.com/stumble/wpgx" ) -type WGConn interface { - WQuery( - ctx context.Context, name string, unprepared string, args ...interface{}) (pgx.Rows, error) - WQueryRow( - ctx context.Context, name string, unprepared string, args ...interface{}) pgx.Row - WExec( - ctx context.Context, name string, unprepared string, args ...interface{}) (pgconn.CommandTag, error) - - PostExec(f wpgx.PostExecFunc) error -} - -type ReadWithTtlFunc = func() (any, time.Duration, error) - // BeforeDump allows you to edit result before dump. type BeforeDump func(m *VItem) -type Cache interface { - GetWithTtl( - ctx context.Context, key string, target any, - readWithTtl ReadWithTtlFunc, noCache bool, noStore bool) error - Set(ctx context.Context, key string, val any, ttl time.Duration) error - Invalidate(ctx context.Context, key string) error -} - -func New(db WGConn, cache Cache) *Queries { +func New(db wpgx.WGConn, cache *dcache.DCache) *Queries { return &Queries{db: db, cache: cache} } type Queries struct { - db WGConn - cache Cache + db wpgx.WGConn + cache *dcache.DCache } func (q *Queries) WithTx(tx *wpgx.WTx) *Queries { @@ -53,7 +28,7 @@ func (q *Queries) WithTx(tx *wpgx.WTx) *Queries { } } -func (q *Queries) WithCache(cache Cache) *Queries { +func (q *Queries) WithCache(cache *dcache.DCache) *Queries { return &Queries{ db: q.db, cache: cache, diff --git a/examples/needle/vitems/models.go b/examples/needle/vitems/models.go index ff28ad5c0f..c8ae3a6301 100644 --- a/examples/needle/vitems/models.go +++ b/examples/needle/vitems/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v2.0.2-1-g38858e5b-dirty-wicked-fork +// sqlc v2.1.0-1-g1f618f69-wicked-fork package vitems diff --git a/examples/needle/vitems/query.sql.go b/examples/needle/vitems/query.sql.go index 8775fa07e1..87ef13bd6e 100644 --- a/examples/needle/vitems/query.sql.go +++ b/examples/needle/vitems/query.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v2.0.2-1-g38858e5b-dirty-wicked-fork +// sqlc v2.1.0-1-g1f618f69-wicked-fork // source: query.sql package vitems diff --git a/go.mod b/go.mod index 4f62823cd3..96fedeb2ad 100644 --- a/go.mod +++ b/go.mod @@ -19,6 +19,7 @@ require ( github.com/rs/zerolog v1.28.0 github.com/spf13/cobra v1.6.1 github.com/spf13/pflag v1.0.5 + github.com/stumble/dcache v0.0.9 github.com/stumble/wpgx v0.1.0 golang.org/x/exp v0.0.0-20220428152302-39d4317da171 golang.org/x/sync v0.0.0-20220923202941-7f9b1623fab7 @@ -29,11 +30,15 @@ require ( require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/coocood/freecache v1.2.3 // indirect github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirect + github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/go-logr/logr v1.2.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-redis/redis/v8 v8.11.5 // indirect github.com/jackc/puddle/v2 v2.1.2 // indirect github.com/kelseyhightower/envconfig v1.4.0 // indirect + github.com/klauspost/compress v1.15.14 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect @@ -42,8 +47,11 @@ require ( github.com/prometheus/common v0.37.0 // indirect github.com/prometheus/procfs v0.8.0 // indirect github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect - go.opentelemetry.io/otel v1.11.1 // indirect - go.opentelemetry.io/otel/trace v1.11.1 // indirect + github.com/satori/go.uuid v1.2.0 // indirect + github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect + go.opentelemetry.io/otel v1.12.0 // indirect + go.opentelemetry.io/otel/trace v1.12.0 // indirect golang.org/x/sys v0.5.0 // indirect ) diff --git a/go.sum b/go.sum index 667070d789..a58b8fa0ec 100644 --- a/go.sum +++ b/go.sum @@ -61,6 +61,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= +github.com/coocood/freecache v1.2.3 h1:lcBwpZrwBZRZyLk/8EMyQVXRiFl663cCuMOrjCALeto= +github.com/coocood/freecache v1.2.3/go.mod h1:RBUWa/Cy+OHdfTGFEhEuE1pMCMX51Ncizj7rthiQ3vk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= @@ -73,10 +75,13 @@ github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548/go.mod h1:e6NPNENfs github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -93,6 +98,8 @@ github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= +github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc= github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -225,6 +232,8 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8 github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.15.14 h1:i7WCKDToww0wA+9qrUZ1xOjp218vfFo3nTU6UHp+gOc= +github.com/klauspost/compress v1.15.14/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -261,6 +270,9 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= github.com/pganalyze/pg_query_go/v2 v2.2.0 h1:OW+reH+ZY7jdEuPyuLGlf1m7dLbE+fDudKXhLs0Ttpk= github.com/pganalyze/pg_query_go/v2 v2.2.0/go.mod h1:XAxmVqz1tEGqizcQ3YSdN90vCOHBWjJi8URL1er5+cA= github.com/pingcap/errors v0.11.0/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= @@ -313,6 +325,7 @@ github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThC github.com/rs/zerolog v1.28.0 h1:MirSo27VyNi7RJYP3078AA1+Cyzd2GB66qy3aUHvsWY= github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= @@ -329,18 +342,26 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stumble/dcache v0.0.9 h1:YxDXEdCNNWk/CCBot9L9iH1gCE/LP6k1IQgbP/w+IOk= +github.com/stumble/dcache v0.0.9/go.mod h1:NRYV3jq62VEFw0SleYWHK5y6nONZ+LFnLXTo927ilVk= github.com/stumble/wpgx v0.1.0 h1:jGT3o5EeEl1N0scCqaCJq9DINCczSgCd7zRSUH/sMx8= github.com/stumble/wpgx v0.1.0/go.mod h1:sAD9TTCNhrouPSp7e8tqPUpD61hX8yT9lWZzW0m/UpA= +github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= +github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -352,10 +373,10 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opentelemetry.io/otel v1.11.1 h1:4WLLAmcfkmDk2ukNXJyq3/kiz/3UzCaYq6PskJsaou4= -go.opentelemetry.io/otel v1.11.1/go.mod h1:1nNhXBbWSD0nsL38H6btgnFN2k4i0sNLHNNMZMSbUGE= -go.opentelemetry.io/otel/trace v1.11.1 h1:ofxdnzsNrGBYXbP7t7zpUK281+go5rF7dvdIZXF8gdQ= -go.opentelemetry.io/otel/trace v1.11.1/go.mod h1:f/Q9G7vzk5u91PhbmKbg1Qn0rzH1LJ4vbPHFGkTPtOk= +go.opentelemetry.io/otel v1.12.0 h1:IgfC7kqQrRccIKuB7Cl+SRUmsKbEwSGPr0Eu+/ht1SQ= +go.opentelemetry.io/otel v1.12.0/go.mod h1:geaoz0L0r1BEOR81k7/n9W4TCXYCJ7bPO7K374jQHG0= +go.opentelemetry.io/otel/trace v1.12.0 h1:p28in++7Kd0r2d8gSt931O57fdjUyWxkVbESuILAeUc= +go.opentelemetry.io/otel/trace v1.12.0/go.mod h1:pHlgBynn6s25qJ2szD+Bv+iwKJttjHSI3lUAyf0GNuQ= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -463,6 +484,7 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0 h1:L4ZwwTvKW9gr0ZMS1yrHD9GZhIuVjOBBnaKH+SPQK0Q= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -692,6 +714,7 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=