From 48af1401d1a766f49a8ea8b582e21a1a7d5b1b72 Mon Sep 17 00:00:00 2001 From: Christian Banse Date: Wed, 8 Nov 2023 15:01:05 +0100 Subject: [PATCH] Calculating profit/loss on backend (#190) --- buf.gen.yaml | 4 +- gen/mgo.pb.go | 540 ++++++++++-------- gen/portfoliov1connect/mgo.connect.go | 324 +++++------ go.sum | 12 +- mgo.proto | 15 + service/portfolio/snapshot.go | 17 +- ui/src/lib/components/Performance.svelte | 17 +- .../components/PortfolioPositionRow.svelte | 18 +- ui/src/lib/gen/mgo_connect.ts | 2 +- ui/src/lib/gen/mgo_pb.ts | 37 +- ui/src/routes/portfolios/+page.svelte | 23 - 11 files changed, 542 insertions(+), 467 deletions(-) diff --git a/buf.gen.yaml b/buf.gen.yaml index c22d0147..65c5d735 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -4,7 +4,7 @@ managed: go_package_prefix: default: github.com/oxisto/money-gopher/gen plugins: - - plugin: buf.build/bufbuild/connect-go + - plugin: buf.build/connectrpc/go out: gen opt: - paths=source_relative @@ -12,7 +12,7 @@ plugins: out: gen opt: - paths=source_relative - - plugin: buf.build/bufbuild/connect-es + - plugin: buf.build/connectrpc/es out: ui/src/lib/gen opt: target=ts - plugin: buf.build/bufbuild/es diff --git a/gen/mgo.pb.go b/gen/mgo.pb.go index 80a0363c..f1e6e2b2 100644 --- a/gen/mgo.pb.go +++ b/gen/mgo.pb.go @@ -802,6 +802,12 @@ type PortfolioSnapshot struct { TotalPurchaseValue float32 `protobuf:"fixed32,10,opt,name=total_purchase_value,json=totalPurchaseValue,proto3" json:"total_purchase_value,omitempty"` // TotalMarketValue contains the total market value of all positions TotalMarketValue float32 `protobuf:"fixed32,11,opt,name=total_market_value,json=totalMarketValue,proto3" json:"total_market_value,omitempty"` + // TotalProfitOrLoss contains the total absolute amount of profit or loss in + // this snapshot. + TotalProfitOrLoss float32 `protobuf:"fixed32,20,opt,name=total_profit_or_loss,json=totalProfitOrLoss,proto3" json:"total_profit_or_loss,omitempty"` + // TotalGains contains the total relative amount of profit or loss in this + // snapshot. + TotalGains float32 `protobuf:"fixed32,21,opt,name=total_gains,json=totalGains,proto3" json:"total_gains,omitempty"` } func (x *PortfolioSnapshot) Reset() { @@ -871,6 +877,20 @@ func (x *PortfolioSnapshot) GetTotalMarketValue() float32 { return 0 } +func (x *PortfolioSnapshot) GetTotalProfitOrLoss() float32 { + if x != nil { + return x.TotalProfitOrLoss + } + return 0 +} + +func (x *PortfolioSnapshot) GetTotalGains() float32 { + if x != nil { + return x.TotalGains + } + return 0 +} + type PortfolioPosition struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -893,6 +913,11 @@ type PortfolioPosition struct { // TotalFees is the total amount of fees accumulating in this position through // various transactions. TotalFees float32 `protobuf:"fixed32,15,opt,name=total_fees,json=totalFees,proto3" json:"total_fees,omitempty"` + // ProfitOrLoss contains the absolute amount of profit or loss in this + // position. + ProfitOrLoss float32 `protobuf:"fixed32,20,opt,name=profit_or_loss,json=profitOrLoss,proto3" json:"profit_or_loss,omitempty"` + // Gains contains the relative amount of profit or loss in this position. + Gains float32 `protobuf:"fixed32,21,opt,name=gains,proto3" json:"gains,omitempty"` } func (x *PortfolioPosition) Reset() { @@ -976,6 +1001,20 @@ func (x *PortfolioPosition) GetTotalFees() float32 { return 0 } +func (x *PortfolioPosition) GetProfitOrLoss() float32 { + if x != nil { + return x.ProfitOrLoss + } + return 0 +} + +func (x *PortfolioPosition) GetGains() float32 { + if x != nil { + return x.Gains + } + return 0 +} + type PortfolioEvent struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1754,7 +1793,7 @@ var file_mgo_proto_rawDesc = []byte{ 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x73, 0x22, 0xca, 0x03, 0x0a, 0x11, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, + 0x6e, 0x74, 0x73, 0x22, 0x9c, 0x04, 0x0a, 0x11, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, @@ -1775,259 +1814,268 @@ var file_mgo_proto_rawDesc = []byte{ 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x02, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x1a, 0x61, 0x0a, 0x0e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, - 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, - 0x69, 0x6f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x22, 0x96, 0x02, 0x0a, 0x11, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x50, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, - 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, - 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x75, - 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x16, - 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, - 0x73, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0d, - 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x25, 0x0a, - 0x0e, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0d, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x50, - 0x72, 0x69, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0b, 0x6d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0b, 0x6d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x02, 0x52, 0x09, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, 0x22, 0xb2, 0x02, 0x0a, 0x0e, 0x50, 0x6f, - 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x38, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, - 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, - 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x6f, - 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, - 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, - 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x70, - 0x72, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x65, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, - 0x28, 0x02, 0x52, 0x04, 0x66, 0x65, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x78, 0x65, - 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x74, 0x61, 0x78, 0x65, 0x73, 0x22, 0xbf, - 0x01, 0x0a, 0x08, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x6e, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, - 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x53, - 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x4f, - 0x6e, 0x12, 0x2a, 0x0a, 0x0e, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x71, 0x75, 0x6f, - 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, - 0x0f, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x22, 0x94, 0x02, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, - 0x69, 0x74, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x65, 0x63, 0x75, - 0x72, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, 0x63, 0x6b, - 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, - 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x26, 0x0a, 0x0c, - 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x02, 0x48, 0x00, 0x52, 0x0b, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x51, 0x75, 0x6f, 0x74, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x55, 0x0a, 0x16, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x71, - 0x75, 0x6f, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x48, 0x01, 0x52, 0x14, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, - 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x42, 0x19, 0x0a, 0x17, - 0x5f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xa0, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, - 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x4b, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2e, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, - 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, - 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x48, 0x00, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x88, 0x01, 0x01, 0x1a, 0x2f, - 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x63, 0x75, - 0x72, 0x69, 0x74, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0d, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x54, 0x0a, 0x16, 0x4c, 0x69, - 0x73, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x69, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, - 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x75, - 0x72, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, - 0x22, 0x28, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x4f, 0x0a, 0x15, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x75, 0x65, 0x12, 0x2f, 0x0a, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x66, + 0x69, 0x74, 0x5f, 0x6f, 0x72, 0x5f, 0x6c, 0x6f, 0x73, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x02, + 0x52, 0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x4f, 0x72, 0x4c, + 0x6f, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x67, 0x61, 0x69, + 0x6e, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x47, + 0x61, 0x69, 0x6e, 0x73, 0x1a, 0x61, 0x0a, 0x0e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, + 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x66, + 0x6f, 0x6c, 0x69, 0x6f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x66, 0x69, 0x72, 0x73, + 0x74, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x22, 0xd2, 0x02, 0x0a, 0x11, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, + 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6f, + 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, + 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, + 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, + 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x75, 0x72, 0x63, + 0x68, 0x61, 0x73, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, + 0x52, 0x0d, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x25, 0x0a, 0x0e, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0d, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, + 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0b, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x02, 0x52, + 0x0b, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x02, + 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x70, + 0x72, 0x6f, 0x66, 0x69, 0x74, 0x5f, 0x6f, 0x72, 0x5f, 0x6c, 0x6f, 0x73, 0x73, 0x18, 0x14, 0x20, + 0x01, 0x28, 0x02, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x4f, 0x72, 0x4c, 0x6f, 0x73, + 0x73, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x02, + 0x52, 0x05, 0x67, 0x61, 0x69, 0x6e, 0x73, 0x22, 0xb2, 0x02, 0x0a, 0x0e, 0x50, 0x6f, 0x72, 0x74, + 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x38, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6d, + 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x6f, 0x72, 0x74, + 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x23, 0x0a, 0x0d, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x65, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x02, + 0x52, 0x04, 0x66, 0x65, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x78, 0x65, 0x73, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x74, 0x61, 0x78, 0x65, 0x73, 0x22, 0xbf, 0x01, 0x0a, + 0x08, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, + 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x3d, 0x0a, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x6e, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, + 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x53, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x12, + 0x2a, 0x0a, 0x0e, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x71, 0x75, 0x6f, 0x74, 0x65, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, + 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x94, + 0x02, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, + 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x1a, + 0x0a, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x26, 0x0a, 0x0c, 0x6c, 0x61, + 0x74, 0x65, 0x73, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, + 0x48, 0x00, 0x52, 0x0b, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x55, 0x0a, 0x16, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x71, 0x75, 0x6f, + 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, + 0x52, 0x14, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6c, 0x61, + 0x74, 0x65, 0x73, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x6c, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xa0, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, + 0x63, 0x75, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x4b, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2e, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, + 0x00, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x88, 0x01, 0x01, 0x1a, 0x2f, 0x0a, 0x06, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, + 0x74, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x54, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, + 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, + 0x74, 0x79, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0x28, + 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x4f, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x36, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, + 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, + 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x22, 0x8c, 0x01, 0x0a, 0x15, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, - 0x79, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x22, 0x8c, 0x01, 0x0a, 0x15, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, - 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, - 0x69, 0x74, 0x79, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x3b, 0x0a, - 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x2b, 0x0a, 0x15, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x42, 0x0a, 0x19, 0x54, 0x72, 0x69, 0x67, 0x67, - 0x65, 0x72, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, - 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x54, - 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0xf1, 0x01, 0x0a, 0x12, 0x50, 0x6f, - 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x24, 0x0a, 0x20, 0x50, 0x4f, 0x52, 0x54, 0x46, 0x4f, 0x4c, 0x49, 0x4f, 0x5f, 0x45, 0x56, - 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x4f, 0x52, 0x54, 0x46, 0x4f, - 0x4c, 0x49, 0x4f, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, - 0x55, 0x59, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x4f, 0x52, 0x54, 0x46, 0x4f, 0x4c, 0x49, - 0x4f, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x4c, - 0x4c, 0x10, 0x02, 0x12, 0x29, 0x0a, 0x25, 0x50, 0x4f, 0x52, 0x54, 0x46, 0x4f, 0x4c, 0x49, 0x4f, - 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x49, - 0x56, 0x45, 0x52, 0x59, 0x5f, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x03, 0x12, 0x2a, - 0x0a, 0x26, 0x50, 0x4f, 0x52, 0x54, 0x46, 0x4f, 0x4c, 0x49, 0x4f, 0x5f, 0x45, 0x56, 0x45, 0x4e, - 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x49, 0x56, 0x45, 0x52, 0x59, 0x5f, - 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x04, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x4f, - 0x52, 0x54, 0x46, 0x4f, 0x4c, 0x49, 0x4f, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x44, 0x49, 0x56, 0x49, 0x44, 0x45, 0x4e, 0x44, 0x10, 0x0a, 0x32, 0x86, 0x09, - 0x0a, 0x10, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, - 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x12, 0x28, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, - 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, - 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1b, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, - 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x12, 0x68, 0x0a, 0x0e, - 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x73, 0x12, 0x27, - 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, - 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, - 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x57, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x72, - 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x12, 0x25, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, - 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x72, + 0x79, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x3b, 0x0a, 0x0b, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x2b, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x42, 0x0a, 0x19, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x51, 0x75, 0x6f, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x63, 0x75, + 0x72, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x54, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0xf1, 0x01, 0x0a, 0x12, 0x50, 0x6f, 0x72, 0x74, + 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, + 0x0a, 0x20, 0x50, 0x4f, 0x52, 0x54, 0x46, 0x4f, 0x4c, 0x49, 0x4f, 0x5f, 0x45, 0x56, 0x45, 0x4e, + 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x4f, 0x52, 0x54, 0x46, 0x4f, 0x4c, 0x49, + 0x4f, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x55, 0x59, + 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x4f, 0x52, 0x54, 0x46, 0x4f, 0x4c, 0x49, 0x4f, 0x5f, + 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x4c, 0x4c, 0x10, + 0x02, 0x12, 0x29, 0x0a, 0x25, 0x50, 0x4f, 0x52, 0x54, 0x46, 0x4f, 0x4c, 0x49, 0x4f, 0x5f, 0x45, + 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x49, 0x56, 0x45, + 0x52, 0x59, 0x5f, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x03, 0x12, 0x2a, 0x0a, 0x26, + 0x50, 0x4f, 0x52, 0x54, 0x46, 0x4f, 0x4c, 0x49, 0x4f, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x49, 0x56, 0x45, 0x52, 0x59, 0x5f, 0x4f, 0x55, + 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x04, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x4f, 0x52, 0x54, + 0x46, 0x4f, 0x4c, 0x49, 0x4f, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x44, 0x49, 0x56, 0x49, 0x44, 0x45, 0x4e, 0x44, 0x10, 0x0a, 0x32, 0x86, 0x09, 0x0a, 0x10, + 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x58, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, + 0x6c, 0x69, 0x6f, 0x12, 0x28, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, + 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, - 0x58, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, - 0x69, 0x6f, 0x12, 0x28, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, - 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, - 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6d, - 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x12, 0x53, 0x0a, 0x0f, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x12, 0x28, 0x2e, 0x6d, + 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x12, 0x68, 0x0a, 0x0e, 0x4c, 0x69, + 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x73, 0x12, 0x27, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x6f, - 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x53, 0x6e, - 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x2d, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, - 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x72, - 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, - 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, - 0x69, 0x6f, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, - 0x73, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, - 0x69, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x2e, - 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, - 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x12, 0x84, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x72, - 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x32, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, - 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, - 0x6c, 0x69, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, - 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, - 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x1a, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, - 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, + 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, + 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x72, + 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x03, 0x90, 0x02, 0x01, 0x12, 0x57, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x66, + 0x6f, 0x6c, 0x69, 0x6f, 0x12, 0x25, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, + 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x66, + 0x6f, 0x6c, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6d, 0x67, + 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x58, 0x0a, + 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, + 0x12, 0x28, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, + 0x6c, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6d, 0x67, 0x6f, + 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, + 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x12, 0x53, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x12, 0x28, 0x2e, 0x6d, 0x67, 0x6f, + 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x6f, 0x0a, 0x14, + 0x47, 0x65, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x53, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x12, 0x2d, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, + 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x66, + 0x6f, 0x6c, 0x69, 0x6f, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, + 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, + 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x73, 0x0a, + 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x2e, 0x6d, 0x67, + 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x20, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x12, 0x84, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x66, + 0x6f, 0x6c, 0x69, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x32, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, + 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, + 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, + 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, - 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x12, 0x69, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, - 0x6c, 0x69, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, - 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, - 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x59, 0x0a, 0x12, 0x49, - 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x2b, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, - 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x32, 0xcd, 0x04, 0x0a, 0x11, 0x53, 0x65, 0x63, 0x75, 0x72, - 0x69, 0x74, 0x69, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x68, 0x0a, 0x0e, - 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x27, - 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, - 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, - 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x54, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, - 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x24, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, - 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x75, - 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6d, 0x67, - 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x55, 0x0a, 0x0e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x27, - 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, - 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, - 0x69, 0x74, 0x79, 0x12, 0x55, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, - 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x27, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, - 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, - 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, - 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x51, 0x0a, 0x0e, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x27, 0x2e, 0x6d, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, + 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, + 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x69, + 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, + 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x77, 0x0a, - 0x1a, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x51, 0x75, 0x6f, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x2e, 0x6d, 0x67, - 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x54, - 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, - 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xb2, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, - 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x42, - 0x08, 0x4d, 0x67, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x78, 0x69, 0x73, 0x74, 0x6f, 0x2f, 0x6d, - 0x6f, 0x6e, 0x65, 0x79, 0x2d, 0x67, 0x6f, 0x70, 0x68, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x6e, 0x3b, - 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x50, - 0x58, 0xaa, 0x02, 0x10, 0x4d, 0x67, 0x6f, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, - 0x6f, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x4d, 0x67, 0x6f, 0x5c, 0x50, 0x6f, 0x72, 0x74, 0x66, - 0x6f, 0x6c, 0x69, 0x6f, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x4d, 0x67, 0x6f, 0x5c, 0x50, 0x6f, - 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x4d, 0x67, 0x6f, 0x3a, 0x3a, 0x50, 0x6f, - 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x59, 0x0a, 0x12, 0x49, 0x6d, 0x70, + 0x6f, 0x72, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x2b, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, + 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x32, 0xcd, 0x04, 0x0a, 0x11, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x69, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x68, 0x0a, 0x0e, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x27, 0x2e, 0x6d, + 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, + 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x03, 0x90, 0x02, 0x01, 0x12, 0x54, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x12, 0x24, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, + 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, + 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, + 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x55, 0x0a, 0x0e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x27, 0x2e, 0x6d, + 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, + 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x12, 0x55, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x12, 0x27, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, + 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6d, + 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x51, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x27, 0x2e, 0x6d, 0x67, 0x6f, + 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x77, 0x0a, 0x1a, 0x54, + 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x51, 0x75, + 0x6f, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, + 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x67, 0x6f, 0x2e, 0x70, 0x6f, 0x72, + 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, + 0x72, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xb2, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x67, 0x6f, + 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x4d, + 0x67, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x78, 0x69, 0x73, 0x74, 0x6f, 0x2f, 0x6d, 0x6f, 0x6e, + 0x65, 0x79, 0x2d, 0x67, 0x6f, 0x70, 0x68, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x6e, 0x3b, 0x70, 0x6f, + 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x50, 0x58, 0xaa, + 0x02, 0x10, 0x4d, 0x67, 0x6f, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x10, 0x4d, 0x67, 0x6f, 0x5c, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, + 0x69, 0x6f, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x4d, 0x67, 0x6f, 0x5c, 0x50, 0x6f, 0x72, 0x74, + 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x4d, 0x67, 0x6f, 0x3a, 0x3a, 0x50, 0x6f, 0x72, 0x74, + 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/gen/portfoliov1connect/mgo.connect.go b/gen/portfoliov1connect/mgo.connect.go index ae3bc00b..3156b5b7 100644 --- a/gen/portfoliov1connect/mgo.connect.go +++ b/gen/portfoliov1connect/mgo.connect.go @@ -5,9 +5,9 @@ package portfoliov1connect import ( + connect "connectrpc.com/connect" context "context" errors "errors" - connect_go "connectrpc.com/connect" gen "github.com/oxisto/money-gopher/gen" emptypb "google.golang.org/protobuf/types/known/emptypb" http "net/http" @@ -19,7 +19,7 @@ import ( // generated with a version of connect newer than the one compiled into your binary. You can fix the // problem by either regenerating this code with an older version of connect or updating the connect // version compiled into your binary. -const _ = connect_go.IsAtLeastVersion1_7_0 +const _ = connect.IsAtLeastVersion1_7_0 const ( // PortfolioServiceName is the fully-qualified name of the PortfolioService service. @@ -91,17 +91,17 @@ const ( // PortfolioServiceClient is a client for the mgo.portfolio.v1.PortfolioService service. type PortfolioServiceClient interface { - CreatePortfolio(context.Context, *connect_go.Request[gen.CreatePortfolioRequest]) (*connect_go.Response[gen.Portfolio], error) - ListPortfolios(context.Context, *connect_go.Request[gen.ListPortfoliosRequest]) (*connect_go.Response[gen.ListPortfoliosResponse], error) - GetPortfolio(context.Context, *connect_go.Request[gen.GetPortfolioRequest]) (*connect_go.Response[gen.Portfolio], error) - UpdatePortfolio(context.Context, *connect_go.Request[gen.UpdatePortfolioRequest]) (*connect_go.Response[gen.Portfolio], error) - DeletePortfolio(context.Context, *connect_go.Request[gen.DeletePortfolioRequest]) (*connect_go.Response[emptypb.Empty], error) - GetPortfolioSnapshot(context.Context, *connect_go.Request[gen.GetPortfolioSnapshotRequest]) (*connect_go.Response[gen.PortfolioSnapshot], error) - CreatePortfolioTransaction(context.Context, *connect_go.Request[gen.CreatePortfolioTransactionRequest]) (*connect_go.Response[gen.PortfolioEvent], error) - ListPortfolioTransactions(context.Context, *connect_go.Request[gen.ListPortfolioTransactionsRequest]) (*connect_go.Response[gen.ListPortfolioTransactionsResponse], error) - UpdatePortfolioTransaction(context.Context, *connect_go.Request[gen.UpdatePortfolioTransactionRequest]) (*connect_go.Response[gen.PortfolioEvent], error) - DeletePortfolioTransaction(context.Context, *connect_go.Request[gen.DeletePortfolioTransactionRequest]) (*connect_go.Response[emptypb.Empty], error) - ImportTransactions(context.Context, *connect_go.Request[gen.ImportTransactionsRequest]) (*connect_go.Response[emptypb.Empty], error) + CreatePortfolio(context.Context, *connect.Request[gen.CreatePortfolioRequest]) (*connect.Response[gen.Portfolio], error) + ListPortfolios(context.Context, *connect.Request[gen.ListPortfoliosRequest]) (*connect.Response[gen.ListPortfoliosResponse], error) + GetPortfolio(context.Context, *connect.Request[gen.GetPortfolioRequest]) (*connect.Response[gen.Portfolio], error) + UpdatePortfolio(context.Context, *connect.Request[gen.UpdatePortfolioRequest]) (*connect.Response[gen.Portfolio], error) + DeletePortfolio(context.Context, *connect.Request[gen.DeletePortfolioRequest]) (*connect.Response[emptypb.Empty], error) + GetPortfolioSnapshot(context.Context, *connect.Request[gen.GetPortfolioSnapshotRequest]) (*connect.Response[gen.PortfolioSnapshot], error) + CreatePortfolioTransaction(context.Context, *connect.Request[gen.CreatePortfolioTransactionRequest]) (*connect.Response[gen.PortfolioEvent], error) + ListPortfolioTransactions(context.Context, *connect.Request[gen.ListPortfolioTransactionsRequest]) (*connect.Response[gen.ListPortfolioTransactionsResponse], error) + UpdatePortfolioTransaction(context.Context, *connect.Request[gen.UpdatePortfolioTransactionRequest]) (*connect.Response[gen.PortfolioEvent], error) + DeletePortfolioTransaction(context.Context, *connect.Request[gen.DeletePortfolioTransactionRequest]) (*connect.Response[emptypb.Empty], error) + ImportTransactions(context.Context, *connect.Request[gen.ImportTransactionsRequest]) (*connect.Response[emptypb.Empty], error) } // NewPortfolioServiceClient constructs a client for the mgo.portfolio.v1.PortfolioService service. @@ -111,63 +111,63 @@ type PortfolioServiceClient interface { // // The URL supplied here should be the base URL for the Connect or gRPC server (for example, // http://api.acme.com or https://acme.com/grpc). -func NewPortfolioServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) PortfolioServiceClient { +func NewPortfolioServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) PortfolioServiceClient { baseURL = strings.TrimRight(baseURL, "/") return &portfolioServiceClient{ - createPortfolio: connect_go.NewClient[gen.CreatePortfolioRequest, gen.Portfolio]( + createPortfolio: connect.NewClient[gen.CreatePortfolioRequest, gen.Portfolio]( httpClient, baseURL+PortfolioServiceCreatePortfolioProcedure, opts..., ), - listPortfolios: connect_go.NewClient[gen.ListPortfoliosRequest, gen.ListPortfoliosResponse]( + listPortfolios: connect.NewClient[gen.ListPortfoliosRequest, gen.ListPortfoliosResponse]( httpClient, baseURL+PortfolioServiceListPortfoliosProcedure, - connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), - connect_go.WithClientOptions(opts...), + connect.WithIdempotency(connect.IdempotencyNoSideEffects), + connect.WithClientOptions(opts...), ), - getPortfolio: connect_go.NewClient[gen.GetPortfolioRequest, gen.Portfolio]( + getPortfolio: connect.NewClient[gen.GetPortfolioRequest, gen.Portfolio]( httpClient, baseURL+PortfolioServiceGetPortfolioProcedure, - connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), - connect_go.WithClientOptions(opts...), + connect.WithIdempotency(connect.IdempotencyNoSideEffects), + connect.WithClientOptions(opts...), ), - updatePortfolio: connect_go.NewClient[gen.UpdatePortfolioRequest, gen.Portfolio]( + updatePortfolio: connect.NewClient[gen.UpdatePortfolioRequest, gen.Portfolio]( httpClient, baseURL+PortfolioServiceUpdatePortfolioProcedure, opts..., ), - deletePortfolio: connect_go.NewClient[gen.DeletePortfolioRequest, emptypb.Empty]( + deletePortfolio: connect.NewClient[gen.DeletePortfolioRequest, emptypb.Empty]( httpClient, baseURL+PortfolioServiceDeletePortfolioProcedure, opts..., ), - getPortfolioSnapshot: connect_go.NewClient[gen.GetPortfolioSnapshotRequest, gen.PortfolioSnapshot]( + getPortfolioSnapshot: connect.NewClient[gen.GetPortfolioSnapshotRequest, gen.PortfolioSnapshot]( httpClient, baseURL+PortfolioServiceGetPortfolioSnapshotProcedure, - connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), - connect_go.WithClientOptions(opts...), + connect.WithIdempotency(connect.IdempotencyNoSideEffects), + connect.WithClientOptions(opts...), ), - createPortfolioTransaction: connect_go.NewClient[gen.CreatePortfolioTransactionRequest, gen.PortfolioEvent]( + createPortfolioTransaction: connect.NewClient[gen.CreatePortfolioTransactionRequest, gen.PortfolioEvent]( httpClient, baseURL+PortfolioServiceCreatePortfolioTransactionProcedure, opts..., ), - listPortfolioTransactions: connect_go.NewClient[gen.ListPortfolioTransactionsRequest, gen.ListPortfolioTransactionsResponse]( + listPortfolioTransactions: connect.NewClient[gen.ListPortfolioTransactionsRequest, gen.ListPortfolioTransactionsResponse]( httpClient, baseURL+PortfolioServiceListPortfolioTransactionsProcedure, opts..., ), - updatePortfolioTransaction: connect_go.NewClient[gen.UpdatePortfolioTransactionRequest, gen.PortfolioEvent]( + updatePortfolioTransaction: connect.NewClient[gen.UpdatePortfolioTransactionRequest, gen.PortfolioEvent]( httpClient, baseURL+PortfolioServiceUpdatePortfolioTransactionProcedure, opts..., ), - deletePortfolioTransaction: connect_go.NewClient[gen.DeletePortfolioTransactionRequest, emptypb.Empty]( + deletePortfolioTransaction: connect.NewClient[gen.DeletePortfolioTransactionRequest, emptypb.Empty]( httpClient, baseURL+PortfolioServiceDeletePortfolioTransactionProcedure, opts..., ), - importTransactions: connect_go.NewClient[gen.ImportTransactionsRequest, emptypb.Empty]( + importTransactions: connect.NewClient[gen.ImportTransactionsRequest, emptypb.Empty]( httpClient, baseURL+PortfolioServiceImportTransactionsProcedure, opts..., @@ -177,87 +177,87 @@ func NewPortfolioServiceClient(httpClient connect_go.HTTPClient, baseURL string, // portfolioServiceClient implements PortfolioServiceClient. type portfolioServiceClient struct { - createPortfolio *connect_go.Client[gen.CreatePortfolioRequest, gen.Portfolio] - listPortfolios *connect_go.Client[gen.ListPortfoliosRequest, gen.ListPortfoliosResponse] - getPortfolio *connect_go.Client[gen.GetPortfolioRequest, gen.Portfolio] - updatePortfolio *connect_go.Client[gen.UpdatePortfolioRequest, gen.Portfolio] - deletePortfolio *connect_go.Client[gen.DeletePortfolioRequest, emptypb.Empty] - getPortfolioSnapshot *connect_go.Client[gen.GetPortfolioSnapshotRequest, gen.PortfolioSnapshot] - createPortfolioTransaction *connect_go.Client[gen.CreatePortfolioTransactionRequest, gen.PortfolioEvent] - listPortfolioTransactions *connect_go.Client[gen.ListPortfolioTransactionsRequest, gen.ListPortfolioTransactionsResponse] - updatePortfolioTransaction *connect_go.Client[gen.UpdatePortfolioTransactionRequest, gen.PortfolioEvent] - deletePortfolioTransaction *connect_go.Client[gen.DeletePortfolioTransactionRequest, emptypb.Empty] - importTransactions *connect_go.Client[gen.ImportTransactionsRequest, emptypb.Empty] + createPortfolio *connect.Client[gen.CreatePortfolioRequest, gen.Portfolio] + listPortfolios *connect.Client[gen.ListPortfoliosRequest, gen.ListPortfoliosResponse] + getPortfolio *connect.Client[gen.GetPortfolioRequest, gen.Portfolio] + updatePortfolio *connect.Client[gen.UpdatePortfolioRequest, gen.Portfolio] + deletePortfolio *connect.Client[gen.DeletePortfolioRequest, emptypb.Empty] + getPortfolioSnapshot *connect.Client[gen.GetPortfolioSnapshotRequest, gen.PortfolioSnapshot] + createPortfolioTransaction *connect.Client[gen.CreatePortfolioTransactionRequest, gen.PortfolioEvent] + listPortfolioTransactions *connect.Client[gen.ListPortfolioTransactionsRequest, gen.ListPortfolioTransactionsResponse] + updatePortfolioTransaction *connect.Client[gen.UpdatePortfolioTransactionRequest, gen.PortfolioEvent] + deletePortfolioTransaction *connect.Client[gen.DeletePortfolioTransactionRequest, emptypb.Empty] + importTransactions *connect.Client[gen.ImportTransactionsRequest, emptypb.Empty] } // CreatePortfolio calls mgo.portfolio.v1.PortfolioService.CreatePortfolio. -func (c *portfolioServiceClient) CreatePortfolio(ctx context.Context, req *connect_go.Request[gen.CreatePortfolioRequest]) (*connect_go.Response[gen.Portfolio], error) { +func (c *portfolioServiceClient) CreatePortfolio(ctx context.Context, req *connect.Request[gen.CreatePortfolioRequest]) (*connect.Response[gen.Portfolio], error) { return c.createPortfolio.CallUnary(ctx, req) } // ListPortfolios calls mgo.portfolio.v1.PortfolioService.ListPortfolios. -func (c *portfolioServiceClient) ListPortfolios(ctx context.Context, req *connect_go.Request[gen.ListPortfoliosRequest]) (*connect_go.Response[gen.ListPortfoliosResponse], error) { +func (c *portfolioServiceClient) ListPortfolios(ctx context.Context, req *connect.Request[gen.ListPortfoliosRequest]) (*connect.Response[gen.ListPortfoliosResponse], error) { return c.listPortfolios.CallUnary(ctx, req) } // GetPortfolio calls mgo.portfolio.v1.PortfolioService.GetPortfolio. -func (c *portfolioServiceClient) GetPortfolio(ctx context.Context, req *connect_go.Request[gen.GetPortfolioRequest]) (*connect_go.Response[gen.Portfolio], error) { +func (c *portfolioServiceClient) GetPortfolio(ctx context.Context, req *connect.Request[gen.GetPortfolioRequest]) (*connect.Response[gen.Portfolio], error) { return c.getPortfolio.CallUnary(ctx, req) } // UpdatePortfolio calls mgo.portfolio.v1.PortfolioService.UpdatePortfolio. -func (c *portfolioServiceClient) UpdatePortfolio(ctx context.Context, req *connect_go.Request[gen.UpdatePortfolioRequest]) (*connect_go.Response[gen.Portfolio], error) { +func (c *portfolioServiceClient) UpdatePortfolio(ctx context.Context, req *connect.Request[gen.UpdatePortfolioRequest]) (*connect.Response[gen.Portfolio], error) { return c.updatePortfolio.CallUnary(ctx, req) } // DeletePortfolio calls mgo.portfolio.v1.PortfolioService.DeletePortfolio. -func (c *portfolioServiceClient) DeletePortfolio(ctx context.Context, req *connect_go.Request[gen.DeletePortfolioRequest]) (*connect_go.Response[emptypb.Empty], error) { +func (c *portfolioServiceClient) DeletePortfolio(ctx context.Context, req *connect.Request[gen.DeletePortfolioRequest]) (*connect.Response[emptypb.Empty], error) { return c.deletePortfolio.CallUnary(ctx, req) } // GetPortfolioSnapshot calls mgo.portfolio.v1.PortfolioService.GetPortfolioSnapshot. -func (c *portfolioServiceClient) GetPortfolioSnapshot(ctx context.Context, req *connect_go.Request[gen.GetPortfolioSnapshotRequest]) (*connect_go.Response[gen.PortfolioSnapshot], error) { +func (c *portfolioServiceClient) GetPortfolioSnapshot(ctx context.Context, req *connect.Request[gen.GetPortfolioSnapshotRequest]) (*connect.Response[gen.PortfolioSnapshot], error) { return c.getPortfolioSnapshot.CallUnary(ctx, req) } // CreatePortfolioTransaction calls mgo.portfolio.v1.PortfolioService.CreatePortfolioTransaction. -func (c *portfolioServiceClient) CreatePortfolioTransaction(ctx context.Context, req *connect_go.Request[gen.CreatePortfolioTransactionRequest]) (*connect_go.Response[gen.PortfolioEvent], error) { +func (c *portfolioServiceClient) CreatePortfolioTransaction(ctx context.Context, req *connect.Request[gen.CreatePortfolioTransactionRequest]) (*connect.Response[gen.PortfolioEvent], error) { return c.createPortfolioTransaction.CallUnary(ctx, req) } // ListPortfolioTransactions calls mgo.portfolio.v1.PortfolioService.ListPortfolioTransactions. -func (c *portfolioServiceClient) ListPortfolioTransactions(ctx context.Context, req *connect_go.Request[gen.ListPortfolioTransactionsRequest]) (*connect_go.Response[gen.ListPortfolioTransactionsResponse], error) { +func (c *portfolioServiceClient) ListPortfolioTransactions(ctx context.Context, req *connect.Request[gen.ListPortfolioTransactionsRequest]) (*connect.Response[gen.ListPortfolioTransactionsResponse], error) { return c.listPortfolioTransactions.CallUnary(ctx, req) } // UpdatePortfolioTransaction calls mgo.portfolio.v1.PortfolioService.UpdatePortfolioTransaction. -func (c *portfolioServiceClient) UpdatePortfolioTransaction(ctx context.Context, req *connect_go.Request[gen.UpdatePortfolioTransactionRequest]) (*connect_go.Response[gen.PortfolioEvent], error) { +func (c *portfolioServiceClient) UpdatePortfolioTransaction(ctx context.Context, req *connect.Request[gen.UpdatePortfolioTransactionRequest]) (*connect.Response[gen.PortfolioEvent], error) { return c.updatePortfolioTransaction.CallUnary(ctx, req) } // DeletePortfolioTransaction calls mgo.portfolio.v1.PortfolioService.DeletePortfolioTransaction. -func (c *portfolioServiceClient) DeletePortfolioTransaction(ctx context.Context, req *connect_go.Request[gen.DeletePortfolioTransactionRequest]) (*connect_go.Response[emptypb.Empty], error) { +func (c *portfolioServiceClient) DeletePortfolioTransaction(ctx context.Context, req *connect.Request[gen.DeletePortfolioTransactionRequest]) (*connect.Response[emptypb.Empty], error) { return c.deletePortfolioTransaction.CallUnary(ctx, req) } // ImportTransactions calls mgo.portfolio.v1.PortfolioService.ImportTransactions. -func (c *portfolioServiceClient) ImportTransactions(ctx context.Context, req *connect_go.Request[gen.ImportTransactionsRequest]) (*connect_go.Response[emptypb.Empty], error) { +func (c *portfolioServiceClient) ImportTransactions(ctx context.Context, req *connect.Request[gen.ImportTransactionsRequest]) (*connect.Response[emptypb.Empty], error) { return c.importTransactions.CallUnary(ctx, req) } // PortfolioServiceHandler is an implementation of the mgo.portfolio.v1.PortfolioService service. type PortfolioServiceHandler interface { - CreatePortfolio(context.Context, *connect_go.Request[gen.CreatePortfolioRequest]) (*connect_go.Response[gen.Portfolio], error) - ListPortfolios(context.Context, *connect_go.Request[gen.ListPortfoliosRequest]) (*connect_go.Response[gen.ListPortfoliosResponse], error) - GetPortfolio(context.Context, *connect_go.Request[gen.GetPortfolioRequest]) (*connect_go.Response[gen.Portfolio], error) - UpdatePortfolio(context.Context, *connect_go.Request[gen.UpdatePortfolioRequest]) (*connect_go.Response[gen.Portfolio], error) - DeletePortfolio(context.Context, *connect_go.Request[gen.DeletePortfolioRequest]) (*connect_go.Response[emptypb.Empty], error) - GetPortfolioSnapshot(context.Context, *connect_go.Request[gen.GetPortfolioSnapshotRequest]) (*connect_go.Response[gen.PortfolioSnapshot], error) - CreatePortfolioTransaction(context.Context, *connect_go.Request[gen.CreatePortfolioTransactionRequest]) (*connect_go.Response[gen.PortfolioEvent], error) - ListPortfolioTransactions(context.Context, *connect_go.Request[gen.ListPortfolioTransactionsRequest]) (*connect_go.Response[gen.ListPortfolioTransactionsResponse], error) - UpdatePortfolioTransaction(context.Context, *connect_go.Request[gen.UpdatePortfolioTransactionRequest]) (*connect_go.Response[gen.PortfolioEvent], error) - DeletePortfolioTransaction(context.Context, *connect_go.Request[gen.DeletePortfolioTransactionRequest]) (*connect_go.Response[emptypb.Empty], error) - ImportTransactions(context.Context, *connect_go.Request[gen.ImportTransactionsRequest]) (*connect_go.Response[emptypb.Empty], error) + CreatePortfolio(context.Context, *connect.Request[gen.CreatePortfolioRequest]) (*connect.Response[gen.Portfolio], error) + ListPortfolios(context.Context, *connect.Request[gen.ListPortfoliosRequest]) (*connect.Response[gen.ListPortfoliosResponse], error) + GetPortfolio(context.Context, *connect.Request[gen.GetPortfolioRequest]) (*connect.Response[gen.Portfolio], error) + UpdatePortfolio(context.Context, *connect.Request[gen.UpdatePortfolioRequest]) (*connect.Response[gen.Portfolio], error) + DeletePortfolio(context.Context, *connect.Request[gen.DeletePortfolioRequest]) (*connect.Response[emptypb.Empty], error) + GetPortfolioSnapshot(context.Context, *connect.Request[gen.GetPortfolioSnapshotRequest]) (*connect.Response[gen.PortfolioSnapshot], error) + CreatePortfolioTransaction(context.Context, *connect.Request[gen.CreatePortfolioTransactionRequest]) (*connect.Response[gen.PortfolioEvent], error) + ListPortfolioTransactions(context.Context, *connect.Request[gen.ListPortfolioTransactionsRequest]) (*connect.Response[gen.ListPortfolioTransactionsResponse], error) + UpdatePortfolioTransaction(context.Context, *connect.Request[gen.UpdatePortfolioTransactionRequest]) (*connect.Response[gen.PortfolioEvent], error) + DeletePortfolioTransaction(context.Context, *connect.Request[gen.DeletePortfolioTransactionRequest]) (*connect.Response[emptypb.Empty], error) + ImportTransactions(context.Context, *connect.Request[gen.ImportTransactionsRequest]) (*connect.Response[emptypb.Empty], error) } // NewPortfolioServiceHandler builds an HTTP handler from the service implementation. It returns the @@ -265,61 +265,61 @@ type PortfolioServiceHandler interface { // // By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf // and JSON codecs. They also support gzip compression. -func NewPortfolioServiceHandler(svc PortfolioServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) { - portfolioServiceCreatePortfolioHandler := connect_go.NewUnaryHandler( +func NewPortfolioServiceHandler(svc PortfolioServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + portfolioServiceCreatePortfolioHandler := connect.NewUnaryHandler( PortfolioServiceCreatePortfolioProcedure, svc.CreatePortfolio, opts..., ) - portfolioServiceListPortfoliosHandler := connect_go.NewUnaryHandler( + portfolioServiceListPortfoliosHandler := connect.NewUnaryHandler( PortfolioServiceListPortfoliosProcedure, svc.ListPortfolios, - connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), - connect_go.WithHandlerOptions(opts...), + connect.WithIdempotency(connect.IdempotencyNoSideEffects), + connect.WithHandlerOptions(opts...), ) - portfolioServiceGetPortfolioHandler := connect_go.NewUnaryHandler( + portfolioServiceGetPortfolioHandler := connect.NewUnaryHandler( PortfolioServiceGetPortfolioProcedure, svc.GetPortfolio, - connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), - connect_go.WithHandlerOptions(opts...), + connect.WithIdempotency(connect.IdempotencyNoSideEffects), + connect.WithHandlerOptions(opts...), ) - portfolioServiceUpdatePortfolioHandler := connect_go.NewUnaryHandler( + portfolioServiceUpdatePortfolioHandler := connect.NewUnaryHandler( PortfolioServiceUpdatePortfolioProcedure, svc.UpdatePortfolio, opts..., ) - portfolioServiceDeletePortfolioHandler := connect_go.NewUnaryHandler( + portfolioServiceDeletePortfolioHandler := connect.NewUnaryHandler( PortfolioServiceDeletePortfolioProcedure, svc.DeletePortfolio, opts..., ) - portfolioServiceGetPortfolioSnapshotHandler := connect_go.NewUnaryHandler( + portfolioServiceGetPortfolioSnapshotHandler := connect.NewUnaryHandler( PortfolioServiceGetPortfolioSnapshotProcedure, svc.GetPortfolioSnapshot, - connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), - connect_go.WithHandlerOptions(opts...), + connect.WithIdempotency(connect.IdempotencyNoSideEffects), + connect.WithHandlerOptions(opts...), ) - portfolioServiceCreatePortfolioTransactionHandler := connect_go.NewUnaryHandler( + portfolioServiceCreatePortfolioTransactionHandler := connect.NewUnaryHandler( PortfolioServiceCreatePortfolioTransactionProcedure, svc.CreatePortfolioTransaction, opts..., ) - portfolioServiceListPortfolioTransactionsHandler := connect_go.NewUnaryHandler( + portfolioServiceListPortfolioTransactionsHandler := connect.NewUnaryHandler( PortfolioServiceListPortfolioTransactionsProcedure, svc.ListPortfolioTransactions, opts..., ) - portfolioServiceUpdatePortfolioTransactionHandler := connect_go.NewUnaryHandler( + portfolioServiceUpdatePortfolioTransactionHandler := connect.NewUnaryHandler( PortfolioServiceUpdatePortfolioTransactionProcedure, svc.UpdatePortfolioTransaction, opts..., ) - portfolioServiceDeletePortfolioTransactionHandler := connect_go.NewUnaryHandler( + portfolioServiceDeletePortfolioTransactionHandler := connect.NewUnaryHandler( PortfolioServiceDeletePortfolioTransactionProcedure, svc.DeletePortfolioTransaction, opts..., ) - portfolioServiceImportTransactionsHandler := connect_go.NewUnaryHandler( + portfolioServiceImportTransactionsHandler := connect.NewUnaryHandler( PortfolioServiceImportTransactionsProcedure, svc.ImportTransactions, opts..., @@ -357,58 +357,58 @@ func NewPortfolioServiceHandler(svc PortfolioServiceHandler, opts ...connect_go. // UnimplementedPortfolioServiceHandler returns CodeUnimplemented from all methods. type UnimplementedPortfolioServiceHandler struct{} -func (UnimplementedPortfolioServiceHandler) CreatePortfolio(context.Context, *connect_go.Request[gen.CreatePortfolioRequest]) (*connect_go.Response[gen.Portfolio], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("mgo.portfolio.v1.PortfolioService.CreatePortfolio is not implemented")) +func (UnimplementedPortfolioServiceHandler) CreatePortfolio(context.Context, *connect.Request[gen.CreatePortfolioRequest]) (*connect.Response[gen.Portfolio], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgo.portfolio.v1.PortfolioService.CreatePortfolio is not implemented")) } -func (UnimplementedPortfolioServiceHandler) ListPortfolios(context.Context, *connect_go.Request[gen.ListPortfoliosRequest]) (*connect_go.Response[gen.ListPortfoliosResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("mgo.portfolio.v1.PortfolioService.ListPortfolios is not implemented")) +func (UnimplementedPortfolioServiceHandler) ListPortfolios(context.Context, *connect.Request[gen.ListPortfoliosRequest]) (*connect.Response[gen.ListPortfoliosResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgo.portfolio.v1.PortfolioService.ListPortfolios is not implemented")) } -func (UnimplementedPortfolioServiceHandler) GetPortfolio(context.Context, *connect_go.Request[gen.GetPortfolioRequest]) (*connect_go.Response[gen.Portfolio], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("mgo.portfolio.v1.PortfolioService.GetPortfolio is not implemented")) +func (UnimplementedPortfolioServiceHandler) GetPortfolio(context.Context, *connect.Request[gen.GetPortfolioRequest]) (*connect.Response[gen.Portfolio], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgo.portfolio.v1.PortfolioService.GetPortfolio is not implemented")) } -func (UnimplementedPortfolioServiceHandler) UpdatePortfolio(context.Context, *connect_go.Request[gen.UpdatePortfolioRequest]) (*connect_go.Response[gen.Portfolio], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("mgo.portfolio.v1.PortfolioService.UpdatePortfolio is not implemented")) +func (UnimplementedPortfolioServiceHandler) UpdatePortfolio(context.Context, *connect.Request[gen.UpdatePortfolioRequest]) (*connect.Response[gen.Portfolio], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgo.portfolio.v1.PortfolioService.UpdatePortfolio is not implemented")) } -func (UnimplementedPortfolioServiceHandler) DeletePortfolio(context.Context, *connect_go.Request[gen.DeletePortfolioRequest]) (*connect_go.Response[emptypb.Empty], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("mgo.portfolio.v1.PortfolioService.DeletePortfolio is not implemented")) +func (UnimplementedPortfolioServiceHandler) DeletePortfolio(context.Context, *connect.Request[gen.DeletePortfolioRequest]) (*connect.Response[emptypb.Empty], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgo.portfolio.v1.PortfolioService.DeletePortfolio is not implemented")) } -func (UnimplementedPortfolioServiceHandler) GetPortfolioSnapshot(context.Context, *connect_go.Request[gen.GetPortfolioSnapshotRequest]) (*connect_go.Response[gen.PortfolioSnapshot], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("mgo.portfolio.v1.PortfolioService.GetPortfolioSnapshot is not implemented")) +func (UnimplementedPortfolioServiceHandler) GetPortfolioSnapshot(context.Context, *connect.Request[gen.GetPortfolioSnapshotRequest]) (*connect.Response[gen.PortfolioSnapshot], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgo.portfolio.v1.PortfolioService.GetPortfolioSnapshot is not implemented")) } -func (UnimplementedPortfolioServiceHandler) CreatePortfolioTransaction(context.Context, *connect_go.Request[gen.CreatePortfolioTransactionRequest]) (*connect_go.Response[gen.PortfolioEvent], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("mgo.portfolio.v1.PortfolioService.CreatePortfolioTransaction is not implemented")) +func (UnimplementedPortfolioServiceHandler) CreatePortfolioTransaction(context.Context, *connect.Request[gen.CreatePortfolioTransactionRequest]) (*connect.Response[gen.PortfolioEvent], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgo.portfolio.v1.PortfolioService.CreatePortfolioTransaction is not implemented")) } -func (UnimplementedPortfolioServiceHandler) ListPortfolioTransactions(context.Context, *connect_go.Request[gen.ListPortfolioTransactionsRequest]) (*connect_go.Response[gen.ListPortfolioTransactionsResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("mgo.portfolio.v1.PortfolioService.ListPortfolioTransactions is not implemented")) +func (UnimplementedPortfolioServiceHandler) ListPortfolioTransactions(context.Context, *connect.Request[gen.ListPortfolioTransactionsRequest]) (*connect.Response[gen.ListPortfolioTransactionsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgo.portfolio.v1.PortfolioService.ListPortfolioTransactions is not implemented")) } -func (UnimplementedPortfolioServiceHandler) UpdatePortfolioTransaction(context.Context, *connect_go.Request[gen.UpdatePortfolioTransactionRequest]) (*connect_go.Response[gen.PortfolioEvent], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("mgo.portfolio.v1.PortfolioService.UpdatePortfolioTransaction is not implemented")) +func (UnimplementedPortfolioServiceHandler) UpdatePortfolioTransaction(context.Context, *connect.Request[gen.UpdatePortfolioTransactionRequest]) (*connect.Response[gen.PortfolioEvent], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgo.portfolio.v1.PortfolioService.UpdatePortfolioTransaction is not implemented")) } -func (UnimplementedPortfolioServiceHandler) DeletePortfolioTransaction(context.Context, *connect_go.Request[gen.DeletePortfolioTransactionRequest]) (*connect_go.Response[emptypb.Empty], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("mgo.portfolio.v1.PortfolioService.DeletePortfolioTransaction is not implemented")) +func (UnimplementedPortfolioServiceHandler) DeletePortfolioTransaction(context.Context, *connect.Request[gen.DeletePortfolioTransactionRequest]) (*connect.Response[emptypb.Empty], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgo.portfolio.v1.PortfolioService.DeletePortfolioTransaction is not implemented")) } -func (UnimplementedPortfolioServiceHandler) ImportTransactions(context.Context, *connect_go.Request[gen.ImportTransactionsRequest]) (*connect_go.Response[emptypb.Empty], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("mgo.portfolio.v1.PortfolioService.ImportTransactions is not implemented")) +func (UnimplementedPortfolioServiceHandler) ImportTransactions(context.Context, *connect.Request[gen.ImportTransactionsRequest]) (*connect.Response[emptypb.Empty], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgo.portfolio.v1.PortfolioService.ImportTransactions is not implemented")) } // SecuritiesServiceClient is a client for the mgo.portfolio.v1.SecuritiesService service. type SecuritiesServiceClient interface { - ListSecurities(context.Context, *connect_go.Request[gen.ListSecuritiesRequest]) (*connect_go.Response[gen.ListSecuritiesResponse], error) - GetSecurity(context.Context, *connect_go.Request[gen.GetSecurityRequest]) (*connect_go.Response[gen.Security], error) - CreateSecurity(context.Context, *connect_go.Request[gen.CreateSecurityRequest]) (*connect_go.Response[gen.Security], error) - UpdateSecurity(context.Context, *connect_go.Request[gen.UpdateSecurityRequest]) (*connect_go.Response[gen.Security], error) - DeleteSecurity(context.Context, *connect_go.Request[gen.DeleteSecurityRequest]) (*connect_go.Response[emptypb.Empty], error) - TriggerSecurityQuoteUpdate(context.Context, *connect_go.Request[gen.TriggerQuoteUpdateRequest]) (*connect_go.Response[gen.TriggerQuoteUpdateResponse], error) + ListSecurities(context.Context, *connect.Request[gen.ListSecuritiesRequest]) (*connect.Response[gen.ListSecuritiesResponse], error) + GetSecurity(context.Context, *connect.Request[gen.GetSecurityRequest]) (*connect.Response[gen.Security], error) + CreateSecurity(context.Context, *connect.Request[gen.CreateSecurityRequest]) (*connect.Response[gen.Security], error) + UpdateSecurity(context.Context, *connect.Request[gen.UpdateSecurityRequest]) (*connect.Response[gen.Security], error) + DeleteSecurity(context.Context, *connect.Request[gen.DeleteSecurityRequest]) (*connect.Response[emptypb.Empty], error) + TriggerSecurityQuoteUpdate(context.Context, *connect.Request[gen.TriggerQuoteUpdateRequest]) (*connect.Response[gen.TriggerQuoteUpdateResponse], error) } // NewSecuritiesServiceClient constructs a client for the mgo.portfolio.v1.SecuritiesService @@ -418,37 +418,37 @@ type SecuritiesServiceClient interface { // // The URL supplied here should be the base URL for the Connect or gRPC server (for example, // http://api.acme.com or https://acme.com/grpc). -func NewSecuritiesServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) SecuritiesServiceClient { +func NewSecuritiesServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) SecuritiesServiceClient { baseURL = strings.TrimRight(baseURL, "/") return &securitiesServiceClient{ - listSecurities: connect_go.NewClient[gen.ListSecuritiesRequest, gen.ListSecuritiesResponse]( + listSecurities: connect.NewClient[gen.ListSecuritiesRequest, gen.ListSecuritiesResponse]( httpClient, baseURL+SecuritiesServiceListSecuritiesProcedure, - connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), - connect_go.WithClientOptions(opts...), + connect.WithIdempotency(connect.IdempotencyNoSideEffects), + connect.WithClientOptions(opts...), ), - getSecurity: connect_go.NewClient[gen.GetSecurityRequest, gen.Security]( + getSecurity: connect.NewClient[gen.GetSecurityRequest, gen.Security]( httpClient, baseURL+SecuritiesServiceGetSecurityProcedure, - connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), - connect_go.WithClientOptions(opts...), + connect.WithIdempotency(connect.IdempotencyNoSideEffects), + connect.WithClientOptions(opts...), ), - createSecurity: connect_go.NewClient[gen.CreateSecurityRequest, gen.Security]( + createSecurity: connect.NewClient[gen.CreateSecurityRequest, gen.Security]( httpClient, baseURL+SecuritiesServiceCreateSecurityProcedure, opts..., ), - updateSecurity: connect_go.NewClient[gen.UpdateSecurityRequest, gen.Security]( + updateSecurity: connect.NewClient[gen.UpdateSecurityRequest, gen.Security]( httpClient, baseURL+SecuritiesServiceUpdateSecurityProcedure, opts..., ), - deleteSecurity: connect_go.NewClient[gen.DeleteSecurityRequest, emptypb.Empty]( + deleteSecurity: connect.NewClient[gen.DeleteSecurityRequest, emptypb.Empty]( httpClient, baseURL+SecuritiesServiceDeleteSecurityProcedure, opts..., ), - triggerSecurityQuoteUpdate: connect_go.NewClient[gen.TriggerQuoteUpdateRequest, gen.TriggerQuoteUpdateResponse]( + triggerSecurityQuoteUpdate: connect.NewClient[gen.TriggerQuoteUpdateRequest, gen.TriggerQuoteUpdateResponse]( httpClient, baseURL+SecuritiesServiceTriggerSecurityQuoteUpdateProcedure, opts..., @@ -458,52 +458,52 @@ func NewSecuritiesServiceClient(httpClient connect_go.HTTPClient, baseURL string // securitiesServiceClient implements SecuritiesServiceClient. type securitiesServiceClient struct { - listSecurities *connect_go.Client[gen.ListSecuritiesRequest, gen.ListSecuritiesResponse] - getSecurity *connect_go.Client[gen.GetSecurityRequest, gen.Security] - createSecurity *connect_go.Client[gen.CreateSecurityRequest, gen.Security] - updateSecurity *connect_go.Client[gen.UpdateSecurityRequest, gen.Security] - deleteSecurity *connect_go.Client[gen.DeleteSecurityRequest, emptypb.Empty] - triggerSecurityQuoteUpdate *connect_go.Client[gen.TriggerQuoteUpdateRequest, gen.TriggerQuoteUpdateResponse] + listSecurities *connect.Client[gen.ListSecuritiesRequest, gen.ListSecuritiesResponse] + getSecurity *connect.Client[gen.GetSecurityRequest, gen.Security] + createSecurity *connect.Client[gen.CreateSecurityRequest, gen.Security] + updateSecurity *connect.Client[gen.UpdateSecurityRequest, gen.Security] + deleteSecurity *connect.Client[gen.DeleteSecurityRequest, emptypb.Empty] + triggerSecurityQuoteUpdate *connect.Client[gen.TriggerQuoteUpdateRequest, gen.TriggerQuoteUpdateResponse] } // ListSecurities calls mgo.portfolio.v1.SecuritiesService.ListSecurities. -func (c *securitiesServiceClient) ListSecurities(ctx context.Context, req *connect_go.Request[gen.ListSecuritiesRequest]) (*connect_go.Response[gen.ListSecuritiesResponse], error) { +func (c *securitiesServiceClient) ListSecurities(ctx context.Context, req *connect.Request[gen.ListSecuritiesRequest]) (*connect.Response[gen.ListSecuritiesResponse], error) { return c.listSecurities.CallUnary(ctx, req) } // GetSecurity calls mgo.portfolio.v1.SecuritiesService.GetSecurity. -func (c *securitiesServiceClient) GetSecurity(ctx context.Context, req *connect_go.Request[gen.GetSecurityRequest]) (*connect_go.Response[gen.Security], error) { +func (c *securitiesServiceClient) GetSecurity(ctx context.Context, req *connect.Request[gen.GetSecurityRequest]) (*connect.Response[gen.Security], error) { return c.getSecurity.CallUnary(ctx, req) } // CreateSecurity calls mgo.portfolio.v1.SecuritiesService.CreateSecurity. -func (c *securitiesServiceClient) CreateSecurity(ctx context.Context, req *connect_go.Request[gen.CreateSecurityRequest]) (*connect_go.Response[gen.Security], error) { +func (c *securitiesServiceClient) CreateSecurity(ctx context.Context, req *connect.Request[gen.CreateSecurityRequest]) (*connect.Response[gen.Security], error) { return c.createSecurity.CallUnary(ctx, req) } // UpdateSecurity calls mgo.portfolio.v1.SecuritiesService.UpdateSecurity. -func (c *securitiesServiceClient) UpdateSecurity(ctx context.Context, req *connect_go.Request[gen.UpdateSecurityRequest]) (*connect_go.Response[gen.Security], error) { +func (c *securitiesServiceClient) UpdateSecurity(ctx context.Context, req *connect.Request[gen.UpdateSecurityRequest]) (*connect.Response[gen.Security], error) { return c.updateSecurity.CallUnary(ctx, req) } // DeleteSecurity calls mgo.portfolio.v1.SecuritiesService.DeleteSecurity. -func (c *securitiesServiceClient) DeleteSecurity(ctx context.Context, req *connect_go.Request[gen.DeleteSecurityRequest]) (*connect_go.Response[emptypb.Empty], error) { +func (c *securitiesServiceClient) DeleteSecurity(ctx context.Context, req *connect.Request[gen.DeleteSecurityRequest]) (*connect.Response[emptypb.Empty], error) { return c.deleteSecurity.CallUnary(ctx, req) } // TriggerSecurityQuoteUpdate calls mgo.portfolio.v1.SecuritiesService.TriggerSecurityQuoteUpdate. -func (c *securitiesServiceClient) TriggerSecurityQuoteUpdate(ctx context.Context, req *connect_go.Request[gen.TriggerQuoteUpdateRequest]) (*connect_go.Response[gen.TriggerQuoteUpdateResponse], error) { +func (c *securitiesServiceClient) TriggerSecurityQuoteUpdate(ctx context.Context, req *connect.Request[gen.TriggerQuoteUpdateRequest]) (*connect.Response[gen.TriggerQuoteUpdateResponse], error) { return c.triggerSecurityQuoteUpdate.CallUnary(ctx, req) } // SecuritiesServiceHandler is an implementation of the mgo.portfolio.v1.SecuritiesService service. type SecuritiesServiceHandler interface { - ListSecurities(context.Context, *connect_go.Request[gen.ListSecuritiesRequest]) (*connect_go.Response[gen.ListSecuritiesResponse], error) - GetSecurity(context.Context, *connect_go.Request[gen.GetSecurityRequest]) (*connect_go.Response[gen.Security], error) - CreateSecurity(context.Context, *connect_go.Request[gen.CreateSecurityRequest]) (*connect_go.Response[gen.Security], error) - UpdateSecurity(context.Context, *connect_go.Request[gen.UpdateSecurityRequest]) (*connect_go.Response[gen.Security], error) - DeleteSecurity(context.Context, *connect_go.Request[gen.DeleteSecurityRequest]) (*connect_go.Response[emptypb.Empty], error) - TriggerSecurityQuoteUpdate(context.Context, *connect_go.Request[gen.TriggerQuoteUpdateRequest]) (*connect_go.Response[gen.TriggerQuoteUpdateResponse], error) + ListSecurities(context.Context, *connect.Request[gen.ListSecuritiesRequest]) (*connect.Response[gen.ListSecuritiesResponse], error) + GetSecurity(context.Context, *connect.Request[gen.GetSecurityRequest]) (*connect.Response[gen.Security], error) + CreateSecurity(context.Context, *connect.Request[gen.CreateSecurityRequest]) (*connect.Response[gen.Security], error) + UpdateSecurity(context.Context, *connect.Request[gen.UpdateSecurityRequest]) (*connect.Response[gen.Security], error) + DeleteSecurity(context.Context, *connect.Request[gen.DeleteSecurityRequest]) (*connect.Response[emptypb.Empty], error) + TriggerSecurityQuoteUpdate(context.Context, *connect.Request[gen.TriggerQuoteUpdateRequest]) (*connect.Response[gen.TriggerQuoteUpdateResponse], error) } // NewSecuritiesServiceHandler builds an HTTP handler from the service implementation. It returns @@ -511,35 +511,35 @@ type SecuritiesServiceHandler interface { // // By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf // and JSON codecs. They also support gzip compression. -func NewSecuritiesServiceHandler(svc SecuritiesServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) { - securitiesServiceListSecuritiesHandler := connect_go.NewUnaryHandler( +func NewSecuritiesServiceHandler(svc SecuritiesServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + securitiesServiceListSecuritiesHandler := connect.NewUnaryHandler( SecuritiesServiceListSecuritiesProcedure, svc.ListSecurities, - connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), - connect_go.WithHandlerOptions(opts...), + connect.WithIdempotency(connect.IdempotencyNoSideEffects), + connect.WithHandlerOptions(opts...), ) - securitiesServiceGetSecurityHandler := connect_go.NewUnaryHandler( + securitiesServiceGetSecurityHandler := connect.NewUnaryHandler( SecuritiesServiceGetSecurityProcedure, svc.GetSecurity, - connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), - connect_go.WithHandlerOptions(opts...), + connect.WithIdempotency(connect.IdempotencyNoSideEffects), + connect.WithHandlerOptions(opts...), ) - securitiesServiceCreateSecurityHandler := connect_go.NewUnaryHandler( + securitiesServiceCreateSecurityHandler := connect.NewUnaryHandler( SecuritiesServiceCreateSecurityProcedure, svc.CreateSecurity, opts..., ) - securitiesServiceUpdateSecurityHandler := connect_go.NewUnaryHandler( + securitiesServiceUpdateSecurityHandler := connect.NewUnaryHandler( SecuritiesServiceUpdateSecurityProcedure, svc.UpdateSecurity, opts..., ) - securitiesServiceDeleteSecurityHandler := connect_go.NewUnaryHandler( + securitiesServiceDeleteSecurityHandler := connect.NewUnaryHandler( SecuritiesServiceDeleteSecurityProcedure, svc.DeleteSecurity, opts..., ) - securitiesServiceTriggerSecurityQuoteUpdateHandler := connect_go.NewUnaryHandler( + securitiesServiceTriggerSecurityQuoteUpdateHandler := connect.NewUnaryHandler( SecuritiesServiceTriggerSecurityQuoteUpdateProcedure, svc.TriggerSecurityQuoteUpdate, opts..., @@ -567,26 +567,26 @@ func NewSecuritiesServiceHandler(svc SecuritiesServiceHandler, opts ...connect_g // UnimplementedSecuritiesServiceHandler returns CodeUnimplemented from all methods. type UnimplementedSecuritiesServiceHandler struct{} -func (UnimplementedSecuritiesServiceHandler) ListSecurities(context.Context, *connect_go.Request[gen.ListSecuritiesRequest]) (*connect_go.Response[gen.ListSecuritiesResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("mgo.portfolio.v1.SecuritiesService.ListSecurities is not implemented")) +func (UnimplementedSecuritiesServiceHandler) ListSecurities(context.Context, *connect.Request[gen.ListSecuritiesRequest]) (*connect.Response[gen.ListSecuritiesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgo.portfolio.v1.SecuritiesService.ListSecurities is not implemented")) } -func (UnimplementedSecuritiesServiceHandler) GetSecurity(context.Context, *connect_go.Request[gen.GetSecurityRequest]) (*connect_go.Response[gen.Security], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("mgo.portfolio.v1.SecuritiesService.GetSecurity is not implemented")) +func (UnimplementedSecuritiesServiceHandler) GetSecurity(context.Context, *connect.Request[gen.GetSecurityRequest]) (*connect.Response[gen.Security], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgo.portfolio.v1.SecuritiesService.GetSecurity is not implemented")) } -func (UnimplementedSecuritiesServiceHandler) CreateSecurity(context.Context, *connect_go.Request[gen.CreateSecurityRequest]) (*connect_go.Response[gen.Security], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("mgo.portfolio.v1.SecuritiesService.CreateSecurity is not implemented")) +func (UnimplementedSecuritiesServiceHandler) CreateSecurity(context.Context, *connect.Request[gen.CreateSecurityRequest]) (*connect.Response[gen.Security], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgo.portfolio.v1.SecuritiesService.CreateSecurity is not implemented")) } -func (UnimplementedSecuritiesServiceHandler) UpdateSecurity(context.Context, *connect_go.Request[gen.UpdateSecurityRequest]) (*connect_go.Response[gen.Security], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("mgo.portfolio.v1.SecuritiesService.UpdateSecurity is not implemented")) +func (UnimplementedSecuritiesServiceHandler) UpdateSecurity(context.Context, *connect.Request[gen.UpdateSecurityRequest]) (*connect.Response[gen.Security], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgo.portfolio.v1.SecuritiesService.UpdateSecurity is not implemented")) } -func (UnimplementedSecuritiesServiceHandler) DeleteSecurity(context.Context, *connect_go.Request[gen.DeleteSecurityRequest]) (*connect_go.Response[emptypb.Empty], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("mgo.portfolio.v1.SecuritiesService.DeleteSecurity is not implemented")) +func (UnimplementedSecuritiesServiceHandler) DeleteSecurity(context.Context, *connect.Request[gen.DeleteSecurityRequest]) (*connect.Response[emptypb.Empty], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgo.portfolio.v1.SecuritiesService.DeleteSecurity is not implemented")) } -func (UnimplementedSecuritiesServiceHandler) TriggerSecurityQuoteUpdate(context.Context, *connect_go.Request[gen.TriggerQuoteUpdateRequest]) (*connect_go.Response[gen.TriggerQuoteUpdateResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("mgo.portfolio.v1.SecuritiesService.TriggerSecurityQuoteUpdate is not implemented")) +func (UnimplementedSecuritiesServiceHandler) TriggerSecurityQuoteUpdate(context.Context, *connect.Request[gen.TriggerQuoteUpdateRequest]) (*connect.Response[gen.TriggerQuoteUpdateResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mgo.portfolio.v1.SecuritiesService.TriggerSecurityQuoteUpdate is not implemented")) } diff --git a/go.sum b/go.sum index 159d750e..44cb9c8d 100644 --- a/go.sum +++ b/go.sum @@ -1,25 +1,17 @@ -connectrpc.com/connect v1.10.1 h1:vnoz6AZnSIu8/SGU6458VtrFZFhkEZTqn6xgAzMS5og= -connectrpc.com/connect v1.10.1/go.mod h1:ARfc9N8ifAehhTXIVUG5effZoJ5DG9ATm6/x6kVhvP8= -connectrpc.com/connect v1.11.1 h1:dqRwblixqkVh+OFBOOL1yIf1jS/yP0MSJLijRj29bFg= -connectrpc.com/connect v1.11.1/go.mod h1:3AGaO6RRGMx5IKFfqbe3hvK1NqLosFNP2BxDYTPmNPo= connectrpc.com/connect v1.12.0 h1:HwKdOY0lGhhoHdsza+hW55aqHEC64pYpObRNoAgn70g= connectrpc.com/connect v1.12.0/go.mod h1:3AGaO6RRGMx5IKFfqbe3hvK1NqLosFNP2BxDYTPmNPo= +github.com/bufbuild/connect-go v1.10.0 h1:QAJ3G9A1OYQW2Jbk3DeoJbkCxuKArrvZgDt47mjdTbg= +github.com/bufbuild/connect-go v1.10.0/go.mod h1:CAIePUgkDR5pAFaylSMtNK45ANQjp9JvpluG20rhpV8= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM= -github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/mattn/go-sqlite3 v1.14.18 h1:JL0eqdCOq6DJVNPSvArO/bIV9/P7fbGrV00LZHc+5aI= github.com/mattn/go-sqlite3 v1.14.18/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/oxisto/assert v0.0.6 h1:Z/wRt0qndURRof+eOGr7GbcJ6BHZT2nyZd9diuZHS8o= github.com/oxisto/assert v0.0.6/go.mod h1:07ANKfyBm6j+pZk1qArFueno6fCoEGKvPbPeJSQkH3s= -golang.org/x/net v0.16.0 h1:7eBu7KsSvFDtSXUIDbh3aqlK4DPsZ1rByC8PFfBThos= -golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/mgo.proto b/mgo.proto index 02e2daf7..305d76c2 100644 --- a/mgo.proto +++ b/mgo.proto @@ -78,6 +78,14 @@ message PortfolioSnapshot { // TotalMarketValue contains the total market value of all positions float total_market_value = 11; + + // TotalProfitOrLoss contains the total absolute amount of profit or loss in + // this snapshot. + float total_profit_or_loss = 20; + + // TotalGains contains the total relative amount of profit or loss in this + // snapshot. + float total_gains = 21; } message PortfolioPosition { @@ -104,6 +112,13 @@ message PortfolioPosition { // TotalFees is the total amount of fees accumulating in this position through // various transactions. float total_fees = 15; + + // ProfitOrLoss contains the absolute amount of profit or loss in this + // position. + float profit_or_loss = 20; + + // Gains contains the relative amount of profit or loss in this position. + float gains = 21; } enum PortfolioEventType { diff --git a/service/portfolio/snapshot.go b/service/portfolio/snapshot.go index c723f789..0d9e0eb9 100644 --- a/service/portfolio/snapshot.go +++ b/service/portfolio/snapshot.go @@ -92,7 +92,7 @@ func (svc *service) GetPortfolioSnapshot(ctx context.Context, req *connect.Reque continue } - snap.Positions[name] = &portfoliov1.PortfolioPosition{ + pos := &portfoliov1.PortfolioPosition{ Security: secmap[name], Amount: c.Amount, PurchaseValue: c.NetValue(), @@ -101,11 +101,22 @@ func (svc *service) GetPortfolioSnapshot(ctx context.Context, req *connect.Reque MarketPrice: marketPrice(secmap, name, c.NetPrice()), } + // Calculate loss and gains + pos.ProfitOrLoss = pos.MarketValue - pos.PurchaseValue + pos.Gains = (pos.MarketValue - pos.PurchaseValue) / pos.PurchaseValue + // Add to total value(s) - snap.TotalPurchaseValue += snap.Positions[name].PurchaseValue - snap.TotalMarketValue += snap.Positions[name].MarketValue + snap.TotalPurchaseValue += pos.PurchaseValue + snap.TotalMarketValue += pos.MarketValue + snap.TotalProfitOrLoss += pos.ProfitOrLoss + + // Store position in map + snap.Positions[name] = pos } + // Calculate total gains + snap.TotalGains = (snap.TotalMarketValue - snap.TotalPurchaseValue) / snap.TotalPurchaseValue + return connect.NewResponse(snap), nil } diff --git a/ui/src/lib/components/Performance.svelte b/ui/src/lib/components/Performance.svelte index affb4487..401b8795 100644 --- a/ui/src/lib/components/Performance.svelte +++ b/ui/src/lib/components/Performance.svelte @@ -6,26 +6,21 @@ export let snapshot: PortfolioSnapshot; export let icon: boolean = true; - - $: perf = - ((snapshot.totalMarketValue - snapshot.totalPurchaseValue) / snapshot.totalPurchaseValue) * 100; - $: perfAbs = snapshot.totalMarketValue - snapshot.totalPurchaseValue;
{#if icon} 0 ? ArrowTrendingUp : ArrowTrendingDown} - class="{perf < 0 ? 'text-red-400' : 'text-green-400'} + src={snapshot.totalGains > 0 ? ArrowTrendingUp : ArrowTrendingDown} + class="{snapshot.totalGains < 0 ? 'text-red-400' : 'text-green-400'} mr-1.5 h-5 w-5 flex-shrink-0" aria-hidden="true" /> {/if} - {Intl.NumberFormat(navigator.language, { maximumFractionDigits: 2 }).format(perf)} % ({currency( - perfAbs, - 'EUR' - )}) + {Intl.NumberFormat(navigator.language, { maximumFractionDigits: 2 }).format( + snapshot.totalGains * 100 + )} % ({currency(snapshot.totalProfitOrLoss, 'EUR')})
diff --git a/ui/src/lib/components/PortfolioPositionRow.svelte b/ui/src/lib/components/PortfolioPositionRow.svelte index dddd4c79..8e6fba3f 100644 --- a/ui/src/lib/components/PortfolioPositionRow.svelte +++ b/ui/src/lib/components/PortfolioPositionRow.svelte @@ -6,8 +6,6 @@ export let position: PortfolioPosition; - $: perf = ((position.marketPrice - position.purchasePrice) / position.purchasePrice) * 100; - function shorten(text: string): string { let max = 30; @@ -51,24 +49,28 @@
{Intl.NumberFormat(navigator.language, { maximumFractionDigits: 2 - }).format(perf)} % + }).format(position.gains * 100)} %
- {currency(position.marketValue - position.purchaseValue, 'EUR')} + {currency(position.profitOrLoss, 'EUR')}
diff --git a/ui/src/lib/gen/mgo_connect.ts b/ui/src/lib/gen/mgo_connect.ts index e7273557..6afcd499 100644 --- a/ui/src/lib/gen/mgo_connect.ts +++ b/ui/src/lib/gen/mgo_connect.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-connect-es v0.12.0 with parameter "target=ts" +// @generated by protoc-gen-connect-es v1.1.3 with parameter "target=ts" // @generated from file mgo.proto (package mgo.portfolio.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/ui/src/lib/gen/mgo_pb.ts b/ui/src/lib/gen/mgo_pb.ts index fe0cfe75..cdbdb436 100644 --- a/ui/src/lib/gen/mgo_pb.ts +++ b/ui/src/lib/gen/mgo_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.3.0 with parameter "target=ts" +// @generated by protoc-gen-es v1.4.2 with parameter "target=ts" // @generated from file mgo.proto (package mgo.portfolio.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck @@ -650,6 +650,22 @@ export class PortfolioSnapshot extends Message { */ totalMarketValue = 0; + /** + * TotalProfitOrLoss contains the total absolute amount of profit or loss in + * this snapshot. + * + * @generated from field: float total_profit_or_loss = 20; + */ + totalProfitOrLoss = 0; + + /** + * TotalGains contains the total relative amount of profit or loss in this + * snapshot. + * + * @generated from field: float total_gains = 21; + */ + totalGains = 0; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -663,6 +679,8 @@ export class PortfolioSnapshot extends Message { { no: 3, name: "first_transaction_time", kind: "message", T: Timestamp, opt: true }, { no: 10, name: "total_purchase_value", kind: "scalar", T: 2 /* ScalarType.FLOAT */ }, { no: 11, name: "total_market_value", kind: "scalar", T: 2 /* ScalarType.FLOAT */ }, + { no: 20, name: "total_profit_or_loss", kind: "scalar", T: 2 /* ScalarType.FLOAT */ }, + { no: 21, name: "total_gains", kind: "scalar", T: 2 /* ScalarType.FLOAT */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): PortfolioSnapshot { @@ -736,6 +754,21 @@ export class PortfolioPosition extends Message { */ totalFees = 0; + /** + * ProfitOrLoss contains the absolute amount of profit or loss in this + * position. + * + * @generated from field: float profit_or_loss = 20; + */ + profitOrLoss = 0; + + /** + * Gains contains the relative amount of profit or loss in this position. + * + * @generated from field: float gains = 21; + */ + gains = 0; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -751,6 +784,8 @@ export class PortfolioPosition extends Message { { no: 10, name: "market_value", kind: "scalar", T: 2 /* ScalarType.FLOAT */ }, { no: 11, name: "market_price", kind: "scalar", T: 2 /* ScalarType.FLOAT */ }, { no: 15, name: "total_fees", kind: "scalar", T: 2 /* ScalarType.FLOAT */ }, + { no: 20, name: "profit_or_loss", kind: "scalar", T: 2 /* ScalarType.FLOAT */ }, + { no: 21, name: "gains", kind: "scalar", T: 2 /* ScalarType.FLOAT */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): PortfolioPosition { diff --git a/ui/src/routes/portfolios/+page.svelte b/ui/src/routes/portfolios/+page.svelte index 36efdf37..b61c3cd4 100644 --- a/ui/src/routes/portfolios/+page.svelte +++ b/ui/src/routes/portfolios/+page.svelte @@ -1,30 +1,7 @@