Skip to content
Permalink
Browse files

Do not store UserAllocations in the protobuf

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
  • Loading branch information...
hsanjuan committed Feb 24, 2019
1 parent 3fccc56 commit 8f4630b8199ba699c7f9508bc6feb3b7e6d1d1dd
Showing with 29 additions and 38 deletions.
  1. +25 −34 api/pb/types.pb.go
  2. +1 −1 api/pb/types.proto
  3. +3 −3 api/types.go

Some generated files are not rendered by default. Learn more.

@@ -22,6 +22,6 @@ message PinOptions {
sint32 ReplicationFactorMax = 2;
string Name = 3;
uint64 ShardSize = 4;
repeated string UserAllocations = 5;
reserved 5;
map<string, string> Metadata = 6;
}
@@ -934,8 +934,8 @@ func (pin *Pin) ProtoMarshal() ([]byte, error) {
ReplicationFactorMax: int32(pin.ReplicationFactorMax),
Name: pin.Name,
ShardSize: pin.ShardSize,
UserAllocations: pin.UserAllocations,
Metadata: pin.Metadata,
// UserAllocations: pin.UserAllocations,
Metadata: pin.Metadata,
}

pbPin := &pb.Pin{
@@ -992,7 +992,7 @@ func (pin *Pin) ProtoUnmarshal(data []byte) error {
pin.ReplicationFactorMax = int(opts.GetReplicationFactorMax())
pin.Name = opts.GetName()
pin.ShardSize = opts.GetShardSize()
pin.UserAllocations = opts.GetUserAllocations()
// pin.UserAllocations = opts.GetUserAllocations()
pin.Metadata = opts.GetMetadata()
return nil
}

0 comments on commit 8f4630b

Please sign in to comment.
You can’t perform that action at this time.