Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3-pinner
Commits
5cd19525
Commit
5cd19525
authored
6 years ago
by
Jakub Sztandera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update protobuf
License: MIT Signed-off-by:
Jakub Sztandera
<
kubuxu@protonmail.ch
>
parent
7efadfb8
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
68 additions
and
58 deletions
+68
-58
gc/gc.go
gc/gc.go
+6
-6
internal/pb/header.pb.go
internal/pb/header.pb.go
+45
-35
pin.go
pin.go
+3
-3
pin_test.go
pin_test.go
+6
-6
set.go
set.go
+2
-2
set_test.go
set_test.go
+6
-6
No files found.
gc/gc.go
View file @
5cd19525
...
...
@@ -8,16 +8,16 @@ import (
"strings"
pin
"github.com/ipfs/go-ipfs/pin"
dag
"gx/ipfs/Qm
QvMsV5aPyd7eMd3U1hvAUhZEupG3rXbVZn7ppU5RE6bt/go-merkledag
"
bserv
"gx/ipfs/Qm
ZuPasxd7fSgtzRzCL7Z8J8QwDJML2fgBUExRbQCqb4BT/go-blockservice
"
bserv
"gx/ipfs/Qm
ZsGVGCqMCNzHLNMB6q4F6yyvomqf1VxwhJwSfgo1NGaF/go-blockservice
"
dag
"gx/ipfs/Qm
ccmovpo9isKeaaDzcxvT7mVJN1uKwn2xzSs1y8hb6PEs/go-merkledag
"
cid
"gx/ipfs/QmR8BauakNcBa3RbE4nbQu76PDiJgoQgz8AJdhJuiU4TAw/go-cid"
ipld
"gx/ipfs/QmRL22E4paat7ky7vx9MLpR97JHHbFPrg3ytFQw6qp1y1s/go-ipld-format"
bstore
"gx/ipfs/QmS2aqUZLJp8kF1ihE5rvDGE5LvmKDPnx32w9Z1BW9xLV5/go-ipfs-blockstore"
bstore
"gx/ipfs/QmRu7tiRnFk9mMPpVECQTBQJqXtmG132jJxA1w9A7TtpBz/go-ipfs-blockstore"
offline
"gx/ipfs/QmSz8kAe2JCKp2dWSG8gHSWnwSmne8YfRXTeK5HBmc9L7t/go-ipfs-exchange-offline"
dstore
"gx/ipfs/QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore"
"gx/ipfs/QmYMQuypUbgsdNHmuCBSUJV6wdQVsBHRivNAp3efHJwZJD/go-verifcid"
offline
"gx/ipfs/QmYZwey1thDTynSrvd6qQkX24UpTka6TFhQ2v569UpoqxD/go-ipfs-exchange-offline"
logging
"gx/ipfs/QmcuXC5cxs79ro2cUuHs4HQ2bkDLJUYokwL8aivcX6HW3C/go-log"
dstore
"gx/ipfs/Qmf4xQhNomPNhrtZc67qSnfJSjxjXs9LWvknJtSXwimPrM/go-datastore"
logging
"gx/ipfs/QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log"
)
var
log
=
logging
.
Logger
(
"gc"
)
...
...
This diff is collapsed.
Click to expand it.
internal/pb/header.pb.go
View file @
5cd19525
...
...
@@ -3,13 +3,13 @@
package
pb
import
proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto"
import fmt "fmt
"
import math "math
"
import encoding_binary "encoding/binary
"
import io "io"
import
(
encoding_binary
"encoding/binary
"
fmt
"fmt
"
proto
"gx/ipfs/QmddjPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB/gogo-protobuf/proto"
io
"io
"
math
"math"
)
// Reference imports to suppress errors if they are not otherwise used.
var
_
=
proto
.
Marshal
...
...
@@ -29,15 +29,13 @@ type Set struct {
Fanout
uint32
`protobuf:"varint,2,opt,name=fanout" json:"fanout"`
// hash seed for subtree selection, a random number
Seed
uint32
`protobuf:"fixed32,3,opt,name=seed" json:"seed"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func
(
m
*
Set
)
Reset
()
{
*
m
=
Set
{}
}
func
(
m
*
Set
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
Set
)
ProtoMessage
()
{}
func
(
*
Set
)
Descriptor
()
([]
byte
,
[]
int
)
{
return fileDescriptor_
header_778100e52d428560
, []int{0}
return
fileDescriptor_
cda303a5a3ed87e7
,
[]
int
{
0
}
}
func
(
m
*
Set
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
m
.
Unmarshal
(
b
)
...
...
@@ -54,8 +52,8 @@ func (m *Set) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return
b
[
:
n
],
nil
}
}
func (
dst
*Set) XXX_Merge(src proto.Message) {
xxx_messageInfo_Set.Merge(
dst
, src)
func
(
m
*
Set
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_Set
.
Merge
(
m
,
src
)
}
func
(
m
*
Set
)
XXX_Size
()
int
{
return
m
.
Size
()
...
...
@@ -90,6 +88,24 @@ func (m *Set) GetSeed() uint32 {
func
init
()
{
proto
.
RegisterType
((
*
Set
)(
nil
),
"ipfs.pin.Set"
)
}
func
init
()
{
proto
.
RegisterFile
(
"pin/internal/pb/header.proto"
,
fileDescriptor_cda303a5a3ed87e7
)
}
var
fileDescriptor_cda303a5a3ed87e7
=
[]
byte
{
// 162 bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x02
,
0xff
,
0xe2
,
0x92
,
0x29
,
0xc8
,
0xcc
,
0xd3
,
0xcf
,
0xcc
,
0x2b
,
0x49
,
0x2d
,
0xca
,
0x4b
,
0xcc
,
0xd1
,
0x2f
,
0x48
,
0xd2
,
0xcf
,
0x48
,
0x4d
,
0x4c
,
0x49
,
0x2d
,
0xd2
,
0x2b
,
0x28
,
0xca
,
0x2f
,
0xc9
,
0x17
,
0xe2
,
0xc8
,
0x2c
,
0x48
,
0x2b
,
0xd6
,
0x2b
,
0xc8
,
0xcc
,
0x53
,
0x8a
,
0xe5
,
0x62
,
0x0e
,
0x4e
,
0x2d
,
0x11
,
0x92
,
0xe3
,
0x62
,
0x2f
,
0x4b
,
0x2d
,
0x2a
,
0xce
,
0xcc
,
0xcf
,
0x93
,
0x60
,
0x54
,
0x60
,
0xd4
,
0xe0
,
0x75
,
0x62
,
0x39
,
0x71
,
0x4f
,
0x9e
,
0x21
,
0x08
,
0x26
,
0x28
,
0x24
,
0xc3
,
0xc5
,
0x96
,
0x96
,
0x98
,
0x97
,
0x5f
,
0x5a
,
0x22
,
0xc1
,
0x84
,
0x24
,
0x0d
,
0x15
,
0x13
,
0x92
,
0xe0
,
0x62
,
0x29
,
0x4e
,
0x4d
,
0x4d
,
0x91
,
0x60
,
0x56
,
0x60
,
0xd4
,
0x60
,
0x87
,
0xca
,
0x81
,
0x45
,
0x9c
,
0x64
,
0x4e
,
0x3c
,
0x92
,
0x63
,
0xbc
,
0xf0
,
0x48
,
0x8e
,
0xf1
,
0xc1
,
0x23
,
0x39
,
0xc6
,
0x09
,
0x8f
,
0xe5
,
0x18
,
0x2e
,
0x3c
,
0x96
,
0x63
,
0xb8
,
0xf1
,
0x58
,
0x8e
,
0x21
,
0x8a
,
0xa9
,
0x20
,
0x09
,
0x10
,
0x00
,
0x00
,
0xff
,
0xff
,
0x20
,
0x85
,
0x2f
,
0x24
,
0xa5
,
0x00
,
0x00
,
0x00
,
}
func
(
m
*
Set
)
Marshal
()
(
dAtA
[]
byte
,
err
error
)
{
size
:=
m
.
Size
()
dAtA
=
make
([]
byte
,
size
)
...
...
@@ -128,6 +144,9 @@ func encodeVarintHeader(dAtA []byte, offset int, v uint64) int {
return
offset
+
1
}
func
(
m
*
Set
)
Size
()
(
n
int
)
{
if
m
==
nil
{
return
0
}
var
l
int
_
=
l
n
+=
1
+
sovHeader
(
uint64
(
m
.
Version
))
...
...
@@ -164,7 +183,7 @@ func (m *Set) Unmarshal(dAtA []byte) error {
}
b
:=
dAtA
[
iNdEx
]
iNdEx
++
wire |=
(
uint64(b
) &
0x7F) << shift
wire
|=
uint64
(
b
&
0x7F
)
<<
shift
if
b
<
0x80
{
break
}
...
...
@@ -192,7 +211,7 @@ func (m *Set) Unmarshal(dAtA []byte) error {
}
b
:=
dAtA
[
iNdEx
]
iNdEx
++
m.Version |=
(
uint32(b
) &
0x7F) << shift
m
.
Version
|=
uint32
(
b
&
0x7F
)
<<
shift
if
b
<
0x80
{
break
}
...
...
@@ -211,7 +230,7 @@ func (m *Set) Unmarshal(dAtA []byte) error {
}
b
:=
dAtA
[
iNdEx
]
iNdEx
++
m.Fanout |=
(
uint32(b
) &
0x7F) << shift
m
.
Fanout
|=
uint32
(
b
&
0x7F
)
<<
shift
if
b
<
0x80
{
break
}
...
...
@@ -235,6 +254,9 @@ func (m *Set) Unmarshal(dAtA []byte) error {
if
skippy
<
0
{
return
ErrInvalidLengthHeader
}
if
(
iNdEx
+
skippy
)
<
0
{
return
ErrInvalidLengthHeader
}
if
(
iNdEx
+
skippy
)
>
l
{
return
io
.
ErrUnexpectedEOF
}
...
...
@@ -301,10 +323,13 @@ func skipHeader(dAtA []byte) (n int, err error) {
break
}
}
iNdEx += length
if
length
<
0
{
return
0
,
ErrInvalidLengthHeader
}
iNdEx
+=
length
if
iNdEx
<
0
{
return
0
,
ErrInvalidLengthHeader
}
return
iNdEx
,
nil
case
3
:
for
{
...
...
@@ -333,6 +358,9 @@ func skipHeader(dAtA []byte) (n int, err error) {
return
0
,
err
}
iNdEx
=
start
+
next
if
iNdEx
<
0
{
return
0
,
ErrInvalidLengthHeader
}
}
return
iNdEx
,
nil
case
4
:
...
...
@@ -351,21 +379,3 @@ var (
ErrInvalidLengthHeader
=
fmt
.
Errorf
(
"proto: negative length found during unmarshaling"
)
ErrIntOverflowHeader
=
fmt
.
Errorf
(
"proto: integer overflow"
)
)
func init() {
proto.RegisterFile("pin/internal/pb/header.proto", fileDescriptor_header_778100e52d428560)
}
var fileDescriptor_header_778100e52d428560 = []byte{
// 154 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x29, 0xc8, 0xcc, 0xd3,
0xcf, 0xcc, 0x2b, 0x49, 0x2d, 0xca, 0x4b, 0xcc, 0xd1, 0x2f, 0x48, 0xd2, 0xcf, 0x48, 0x4d, 0x4c,
0x49, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xc8, 0x2c, 0x48, 0x2b, 0xd6, 0x2b,
0xc8, 0xcc, 0x53, 0x8a, 0xe5, 0x62, 0x0e, 0x4e, 0x2d, 0x11, 0x92, 0xe3, 0x62, 0x2f, 0x4b, 0x2d,
0x2a, 0xce, 0xcc, 0xcf, 0x93, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x75, 0x62, 0x39, 0x71, 0x4f, 0x9e,
0x21, 0x08, 0x26, 0x28, 0x24, 0xc3, 0xc5, 0x96, 0x96, 0x98, 0x97, 0x5f, 0x5a, 0x22, 0xc1, 0x84,
0x24, 0x0d, 0x15, 0x13, 0x92, 0xe0, 0x62, 0x29, 0x4e, 0x4d, 0x4d, 0x91, 0x60, 0x56, 0x60, 0xd4,
0x60, 0x87, 0xca, 0x81, 0x45, 0x9c, 0x44, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1,
0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0xa2, 0x98, 0x0a, 0x92, 0x00, 0x01, 0x00, 0x00,
0xff, 0xff, 0xc3, 0xf9, 0x7f, 0x24, 0x9d, 0x00, 0x00, 0x00,
}
This diff is collapsed.
Click to expand it.
pin.go
View file @
5cd19525
...
...
@@ -10,12 +10,12 @@ import (
"time"
"github.com/ipfs/go-ipfs/dagutils"
mdag
"gx/ipfs/Qm
QvMsV5aPyd7eMd3U1hvAUhZEupG3rXbVZn7ppU5RE6bt
/go-merkledag"
mdag
"gx/ipfs/Qm
ccmovpo9isKeaaDzcxvT7mVJN1uKwn2xzSs1y8hb6PEs
/go-merkledag"
cid
"gx/ipfs/QmR8BauakNcBa3RbE4nbQu76PDiJgoQgz8AJdhJuiU4TAw/go-cid"
ipld
"gx/ipfs/QmRL22E4paat7ky7vx9MLpR97JHHbFPrg3ytFQw6qp1y1s/go-ipld-format"
logging
"gx/ipfs/Qm
cuXC5cxs79ro2cUuHs4HQ2bkDLJUYokwL8aivcX6HW3C/go-log
"
ds
"gx/ipfs/Qm
f4xQhNomPNhrtZc67qSnfJSjxjXs9LWvknJtSXwimPrM/go-datastore
"
ds
"gx/ipfs/Qm
UadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9/go-datastore
"
logging
"gx/ipfs/Qm
bkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF/go-log
"
)
var
log
=
logging
.
Logger
(
"pin"
)
...
...
This diff is collapsed.
Click to expand it.
pin_test.go
View file @
5cd19525
...
...
@@ -5,15 +5,15 @@ import (
"testing"
"time"
mdag
"gx/ipfs/Qm
QvMsV5aPyd7eMd3U1hvAUhZEupG3rXbVZn7ppU5RE6bt/go-merkledag
"
bs
"gx/ipfs/Qm
ZuPasxd7fSgtzRzCL7Z8J8QwDJML2fgBUExRbQCqb4BT/go-blockservice
"
bs
"gx/ipfs/Qm
ZsGVGCqMCNzHLNMB6q4F6yyvomqf1VxwhJwSfgo1NGaF/go-blockservice
"
mdag
"gx/ipfs/Qm
ccmovpo9isKeaaDzcxvT7mVJN1uKwn2xzSs1y8hb6PEs/go-merkledag
"
util
"gx/ipfs/QmNohiVssaPw3KVLZik59DBVGTSm2dGvYT9eoXt5DQ36Yz/go-ipfs-util"
cid
"gx/ipfs/QmR8BauakNcBa3RbE4nbQu76PDiJgoQgz8AJdhJuiU4TAw/go-cid"
blockstore
"gx/ipfs/Qm
S2aqUZLJp8kF1ihE5rvDGE5LvmKDPnx32w9Z1BW9xLV5
/go-ipfs-blockstore"
offline
"gx/ipfs/Qm
YZwey1thDTynSrvd6qQkX24UpTka6TFhQ2v569UpoqxD
/go-ipfs-exchange-offline"
ds
"gx/ipfs/Qm
f4xQhNomPNhrtZc67qSnfJSjxjXs9LWvknJtSXwimPrM
/go-datastore"
dssync
"gx/ipfs/Qm
f4xQhNomPNhrtZc67qSnfJSjxjXs9LWvknJtSXwimPrM
/go-datastore/sync"
blockstore
"gx/ipfs/Qm
Ru7tiRnFk9mMPpVECQTBQJqXtmG132jJxA1w9A7TtpBz
/go-ipfs-blockstore"
offline
"gx/ipfs/Qm
Sz8kAe2JCKp2dWSG8gHSWnwSmne8YfRXTeK5HBmc9L7t
/go-ipfs-exchange-offline"
ds
"gx/ipfs/Qm
UadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9
/go-datastore"
dssync
"gx/ipfs/Qm
UadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9
/go-datastore/sync"
)
var
rand
=
util
.
NewTimeSeededRand
()
...
...
This diff is collapsed.
Click to expand it.
set.go
View file @
5cd19525
...
...
@@ -10,11 +10,11 @@ import (
"sort"
"github.com/ipfs/go-ipfs/pin/internal/pb"
"gx/ipfs/Qm
QvMsV5aPyd7eMd3U1hvAUhZEupG3rXbVZn7ppU5RE6bt
/go-merkledag"
"gx/ipfs/Qm
ccmovpo9isKeaaDzcxvT7mVJN1uKwn2xzSs1y8hb6PEs
/go-merkledag"
cid
"gx/ipfs/QmR8BauakNcBa3RbE4nbQu76PDiJgoQgz8AJdhJuiU4TAw/go-cid"
ipld
"gx/ipfs/QmRL22E4paat7ky7vx9MLpR97JHHbFPrg3ytFQw6qp1y1s/go-ipld-format"
"gx/ipfs/Qmd
xUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8
/gogo-protobuf/proto"
"gx/ipfs/Qmd
djPSGZb3ieihSseFeCfVRpZzcqczPNsD2DvarSwnjJB
/gogo-protobuf/proto"
)
const
(
...
...
This diff is collapsed.
Click to expand it.
set_test.go
View file @
5cd19525
...
...
@@ -5,14 +5,14 @@ import (
"encoding/binary"
"testing"
dag
"gx/ipfs/Qm
QvMsV5aPyd7eMd3U1hvAUhZEupG3rXbVZn7ppU5RE6bt/go-merkledag
"
bserv
"gx/ipfs/Qm
ZuPasxd7fSgtzRzCL7Z8J8QwDJML2fgBUExRbQCqb4BT/go-blockservice
"
bserv
"gx/ipfs/Qm
ZsGVGCqMCNzHLNMB6q4F6yyvomqf1VxwhJwSfgo1NGaF/go-blockservice
"
dag
"gx/ipfs/Qm
ccmovpo9isKeaaDzcxvT7mVJN1uKwn2xzSs1y8hb6PEs/go-merkledag
"
cid
"gx/ipfs/QmR8BauakNcBa3RbE4nbQu76PDiJgoQgz8AJdhJuiU4TAw/go-cid"
blockstore
"gx/ipfs/Qm
S2aqUZLJp8kF1ihE5rvDGE5LvmKDPnx32w9Z1BW9xLV5
/go-ipfs-blockstore"
offline
"gx/ipfs/Qm
YZwey1thDTynSrvd6qQkX24UpTka6TFhQ2v569UpoqxD
/go-ipfs-exchange-offline"
ds
"gx/ipfs/Qm
f4xQhNomPNhrtZc67qSnfJSjxjXs9LWvknJtSXwimPrM
/go-datastore"
dsq
"gx/ipfs/Qm
f4xQhNomPNhrtZc67qSnfJSjxjXs9LWvknJtSXwimPrM
/go-datastore/query"
blockstore
"gx/ipfs/Qm
Ru7tiRnFk9mMPpVECQTBQJqXtmG132jJxA1w9A7TtpBz
/go-ipfs-blockstore"
offline
"gx/ipfs/Qm
Sz8kAe2JCKp2dWSG8gHSWnwSmne8YfRXTeK5HBmc9L7t
/go-ipfs-exchange-offline"
ds
"gx/ipfs/Qm
UadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9
/go-datastore"
dsq
"gx/ipfs/Qm
UadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9
/go-datastore/query"
)
func
ignoreCids
(
_
cid
.
Cid
)
{}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment