diff options
Diffstat (limited to '')
45 files changed, 2699 insertions, 158 deletions
diff --git a/api/Makefile b/api/Makefile index 81f3748..2e0edd4 100644 --- a/api/Makefile +++ b/api/Makefile @@ -5,15 +5,15 @@ GEN_DIR = gen BUF = buf # Targets -.PHONY: all lint generate generate-js clean +.PHONY: all lint generate-go generate-js clean all: lint generate lint: $(BUF) lint -generate: - $(BUF) generate --template buf.gen.yaml +generate-go: + $(BUF) generate --template buf.gen.go.yaml generate-js: $(BUF) generate --template buf.gen.js.yaml --include-imports diff --git a/api/buf.gen.yaml b/api/buf.gen.go.yaml index 7713112..ae699d9 100644 --- a/api/buf.gen.yaml +++ b/api/buf.gen.go.yaml @@ -5,13 +5,13 @@ managed: - module: buf.build/googleapis/googleapis override: - file_option: go_package_prefix - value: github.com/ansg191/ibd-trader-backend/api/gen + value: github.com/ansg191/ibd-trader/backend/api plugins: - remote: buf.build/protocolbuffers/go - out: gen + out: ../backend/api opt: paths=source_relative - remote: buf.build/grpc/go - out: gen + out: ../backend/api opt: - paths=source_relative inputs: diff --git a/backend/.gitignore b/backend/.gitignore index 03cab26..a64e003 100644 --- a/backend/.gitignore +++ b/backend/.gitignore @@ -37,7 +37,10 @@ config.yaml # Go workspace file go.work -### GoLand template +# Created by https://www.toptal.com/developers/gitignore/api/goland+all +# Edit at https://www.toptal.com/developers/gitignore?templates=goland+all + +### GoLand+all ### # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 @@ -116,3 +119,13 @@ fabric.properties # Android studio 3.1+ serialized cache file .idea/caches/build_file_checksums.ser +### GoLand+all Patch ### +# Ignore everything but code style settings and run configurations +# that are supposed to be shared within teams. + +.idea/* + +!.idea/codeStyles +!.idea/runConfigurations + +# End of https://www.toptal.com/developers/gitignore/api/goland+all diff --git a/backend/.idea/.gitignore b/backend/.idea/.gitignore deleted file mode 100644 index 13566b8..0000000 --- a/backend/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/backend/.idea/dataSources.xml b/backend/.idea/dataSources.xml deleted file mode 100644 index 66cd183..0000000 --- a/backend/.idea/dataSources.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project version="4"> - <component name="DataSourceManagerImpl" format="xml" multifile-model="true"> - <data-source source="LOCAL" name="postgres@localhost" uuid="5df21c3c-074c-4cb3-91b3-a87c24731550"> - <driver-ref>postgresql</driver-ref> - <synchronize>true</synchronize> - <jdbc-driver>org.postgresql.Driver</jdbc-driver> - <jdbc-url>jdbc:postgresql://localhost:5432/postgres</jdbc-url> - <working-dir>$ProjectFileDir$</working-dir> - </data-source> - <data-source source="LOCAL" name="0@localhost" uuid="5306b4f0-7d5f-4ef3-a260-54bd3d0c859c"> - <driver-ref>redis</driver-ref> - <synchronize>true</synchronize> - <jdbc-driver>jdbc.RedisDriver</jdbc-driver> - <jdbc-url>jdbc:redis://localhost:6379/0</jdbc-url> - <working-dir>$ProjectFileDir$</working-dir> - </data-source> - </component> -</project>
\ No newline at end of file diff --git a/backend/.idea/ibd-trader.iml b/backend/.idea/ibd-trader.iml deleted file mode 100644 index 5e764c4..0000000 --- a/backend/.idea/ibd-trader.iml +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<module type="WEB_MODULE" version="4"> - <component name="Go" enabled="true" /> - <component name="NewModuleRootManager"> - <content url="file://$MODULE_DIR$" /> - <orderEntry type="inheritedJdk" /> - <orderEntry type="sourceFolder" forTests="false" /> - </component> -</module>
\ No newline at end of file diff --git a/backend/.idea/modules.xml b/backend/.idea/modules.xml deleted file mode 100644 index fe04cd3..0000000 --- a/backend/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project version="4"> - <component name="ProjectModuleManager"> - <modules> - <module fileurl="file://$PROJECT_DIR$/.idea/ibd-trader.iml" filepath="$PROJECT_DIR$/.idea/ibd-trader.iml" /> - </modules> - </component> -</project>
\ No newline at end of file diff --git a/backend/.idea/sqldialects.xml b/backend/.idea/sqldialects.xml deleted file mode 100644 index 6df4889..0000000 --- a/backend/.idea/sqldialects.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project version="4"> - <component name="SqlDialectMappings"> - <file url="PROJECT" dialect="PostgreSQL" /> - </component> -</project>
\ No newline at end of file diff --git a/backend/.idea/vcs.xml b/backend/.idea/vcs.xml deleted file mode 100644 index 7036dcb..0000000 --- a/backend/.idea/vcs.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project version="4"> - <component name="VcsDirectoryMappings"> - <mapping directory="" vcs="Git" /> - <mapping directory="$PROJECT_DIR$/api" vcs="Git" /> - </component> -</project>
\ No newline at end of file diff --git a/backend/api/idb/stock/v1/stock.pb.go b/backend/api/idb/stock/v1/stock.pb.go new file mode 100644 index 0000000..8af539f --- /dev/null +++ b/backend/api/idb/stock/v1/stock.pb.go @@ -0,0 +1,1228 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: idb/stock/v1/stock.proto + +package stockv1 + +import ( + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + money "google.golang.org/genproto/googleapis/type/money" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// StockListType represents the name of a stock list. +type StockListType int32 + +const ( + // Unspecified stock list type. + StockListType_STOCK_LIST_TYPE_UNSPECIFIED StockListType = 0 + // The IBD50 stock list. + StockListType_STOCK_LIST_TYPE_IBD50 StockListType = 1 + // The Cap20 stock list. + StockListType_STOCK_LIST_TYPE_CAP20 StockListType = 2 +) + +// Enum value maps for StockListType. +var ( + StockListType_name = map[int32]string{ + 0: "STOCK_LIST_TYPE_UNSPECIFIED", + 1: "STOCK_LIST_TYPE_IBD50", + 2: "STOCK_LIST_TYPE_CAP20", + } + StockListType_value = map[string]int32{ + "STOCK_LIST_TYPE_UNSPECIFIED": 0, + "STOCK_LIST_TYPE_IBD50": 1, + "STOCK_LIST_TYPE_CAP20": 2, + } +) + +func (x StockListType) Enum() *StockListType { + p := new(StockListType) + *p = x + return p +} + +func (x StockListType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StockListType) Descriptor() protoreflect.EnumDescriptor { + return file_idb_stock_v1_stock_proto_enumTypes[0].Descriptor() +} + +func (StockListType) Type() protoreflect.EnumType { + return &file_idb_stock_v1_stock_proto_enumTypes[0] +} + +func (x StockListType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StockListType.Descriptor instead. +func (StockListType) EnumDescriptor() ([]byte, []int) { + return file_idb_stock_v1_stock_proto_rawDescGZIP(), []int{0} +} + +// LetterGrade represents a letter grade from E to A+. +type LetterGrade int32 + +const ( + LetterGrade_LETTER_GRADE_UNSPECIFIED LetterGrade = 0 + LetterGrade_LETTER_GRADE_A_PLUS LetterGrade = 1 + LetterGrade_LETTER_GRADE_A LetterGrade = 2 + LetterGrade_LETTER_GRADE_A_MINUS LetterGrade = 3 + LetterGrade_LETTER_GRADE_B_PLUS LetterGrade = 4 + LetterGrade_LETTER_GRADE_B LetterGrade = 5 + LetterGrade_LETTER_GRADE_B_MINUS LetterGrade = 6 + LetterGrade_LETTER_GRADE_C_PLUS LetterGrade = 7 + LetterGrade_LETTER_GRADE_C LetterGrade = 8 + LetterGrade_LETTER_GRADE_C_MINUS LetterGrade = 9 + LetterGrade_LETTER_GRADE_D_PLUS LetterGrade = 10 + LetterGrade_LETTER_GRADE_D LetterGrade = 11 + LetterGrade_LETTER_GRADE_D_MINUS LetterGrade = 12 + LetterGrade_LETTER_GRADE_E_PLUS LetterGrade = 13 + LetterGrade_LETTER_GRADE_E LetterGrade = 14 +) + +// Enum value maps for LetterGrade. +var ( + LetterGrade_name = map[int32]string{ + 0: "LETTER_GRADE_UNSPECIFIED", + 1: "LETTER_GRADE_A_PLUS", + 2: "LETTER_GRADE_A", + 3: "LETTER_GRADE_A_MINUS", + 4: "LETTER_GRADE_B_PLUS", + 5: "LETTER_GRADE_B", + 6: "LETTER_GRADE_B_MINUS", + 7: "LETTER_GRADE_C_PLUS", + 8: "LETTER_GRADE_C", + 9: "LETTER_GRADE_C_MINUS", + 10: "LETTER_GRADE_D_PLUS", + 11: "LETTER_GRADE_D", + 12: "LETTER_GRADE_D_MINUS", + 13: "LETTER_GRADE_E_PLUS", + 14: "LETTER_GRADE_E", + } + LetterGrade_value = map[string]int32{ + "LETTER_GRADE_UNSPECIFIED": 0, + "LETTER_GRADE_A_PLUS": 1, + "LETTER_GRADE_A": 2, + "LETTER_GRADE_A_MINUS": 3, + "LETTER_GRADE_B_PLUS": 4, + "LETTER_GRADE_B": 5, + "LETTER_GRADE_B_MINUS": 6, + "LETTER_GRADE_C_PLUS": 7, + "LETTER_GRADE_C": 8, + "LETTER_GRADE_C_MINUS": 9, + "LETTER_GRADE_D_PLUS": 10, + "LETTER_GRADE_D": 11, + "LETTER_GRADE_D_MINUS": 12, + "LETTER_GRADE_E_PLUS": 13, + "LETTER_GRADE_E": 14, + } +) + +func (x LetterGrade) Enum() *LetterGrade { + p := new(LetterGrade) + *p = x + return p +} + +func (x LetterGrade) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LetterGrade) Descriptor() protoreflect.EnumDescriptor { + return file_idb_stock_v1_stock_proto_enumTypes[1].Descriptor() +} + +func (LetterGrade) Type() protoreflect.EnumType { + return &file_idb_stock_v1_stock_proto_enumTypes[1] +} + +func (x LetterGrade) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LetterGrade.Descriptor instead. +func (LetterGrade) EnumDescriptor() ([]byte, []int) { + return file_idb_stock_v1_stock_proto_rawDescGZIP(), []int{1} +} + +// Stock represents a stock. +type Stock struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The ticker symbol of the stock (e.g. "AAPL"). + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` + // The name of the stock (e.g. "Apple Inc."). + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // The URL to the IBD page for the stock. + IbdUrl *string `protobuf:"bytes,3,opt,name=ibd_url,json=ibdUrl,proto3,oneof" json:"ibd_url,omitempty"` + // The most recent ratings for the stock. + Ratings *StockRatings `protobuf:"bytes,4,opt,name=ratings,proto3" json:"ratings,omitempty"` +} + +func (x *Stock) Reset() { + *x = Stock{} + if protoimpl.UnsafeEnabled { + mi := &file_idb_stock_v1_stock_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Stock) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Stock) ProtoMessage() {} + +func (x *Stock) ProtoReflect() protoreflect.Message { + mi := &file_idb_stock_v1_stock_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Stock.ProtoReflect.Descriptor instead. +func (*Stock) Descriptor() ([]byte, []int) { + return file_idb_stock_v1_stock_proto_rawDescGZIP(), []int{0} +} + +func (x *Stock) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *Stock) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Stock) GetIbdUrl() string { + if x != nil && x.IbdUrl != nil { + return *x.IbdUrl + } + return "" +} + +func (x *Stock) GetRatings() *StockRatings { + if x != nil { + return x.Ratings + } + return nil +} + +// StockRatings represents the ratings for a stock scraped from IBD. +type StockRatings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Unique identifier for this stock rating instance. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // The ratings for the stock. + Ratings *StockRatings_Ratings `protobuf:"bytes,3,opt,name=ratings,proto3" json:"ratings,omitempty"` + // The price of the stock at the time of the ratings being scraped. + Price *money.Money `protobuf:"bytes,4,opt,name=price,proto3" json:"price,omitempty"` + // The time the ratings were scraped. + LastUpdate *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=last_update,json=lastUpdate,proto3" json:"last_update,omitempty"` + // The chart analysis for the stock. + ChartAnalysis *ChartAnalysis `protobuf:"bytes,6,opt,name=chart_analysis,json=chartAnalysis,proto3" json:"chart_analysis,omitempty"` +} + +func (x *StockRatings) Reset() { + *x = StockRatings{} + if protoimpl.UnsafeEnabled { + mi := &file_idb_stock_v1_stock_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StockRatings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StockRatings) ProtoMessage() {} + +func (x *StockRatings) ProtoReflect() protoreflect.Message { + mi := &file_idb_stock_v1_stock_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StockRatings.ProtoReflect.Descriptor instead. +func (*StockRatings) Descriptor() ([]byte, []int) { + return file_idb_stock_v1_stock_proto_rawDescGZIP(), []int{1} +} + +func (x *StockRatings) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *StockRatings) GetRatings() *StockRatings_Ratings { + if x != nil { + return x.Ratings + } + return nil +} + +func (x *StockRatings) GetPrice() *money.Money { + if x != nil { + return x.Price + } + return nil +} + +func (x *StockRatings) GetLastUpdate() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdate + } + return nil +} + +func (x *StockRatings) GetChartAnalysis() *ChartAnalysis { + if x != nil { + return x.ChartAnalysis + } + return nil +} + +// ChartAnalysis represents the chart analysis for a stock. +type ChartAnalysis struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Unique identifier for this chart analysis instance. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // The raw analysis. + RawAnalysis string `protobuf:"bytes,2,opt,name=raw_analysis,json=rawAnalysis,proto3" json:"raw_analysis,omitempty"` +} + +func (x *ChartAnalysis) Reset() { + *x = ChartAnalysis{} + if protoimpl.UnsafeEnabled { + mi := &file_idb_stock_v1_stock_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChartAnalysis) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChartAnalysis) ProtoMessage() {} + +func (x *ChartAnalysis) ProtoReflect() protoreflect.Message { + mi := &file_idb_stock_v1_stock_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChartAnalysis.ProtoReflect.Descriptor instead. +func (*ChartAnalysis) Descriptor() ([]byte, []int) { + return file_idb_stock_v1_stock_proto_rawDescGZIP(), []int{2} +} + +func (x *ChartAnalysis) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ChartAnalysis) GetRawAnalysis() string { + if x != nil { + return x.RawAnalysis + } + return "" +} + +type StockScrapeOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` + StartTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` +} + +func (x *StockScrapeOperationMetadata) Reset() { + *x = StockScrapeOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_idb_stock_v1_stock_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StockScrapeOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StockScrapeOperationMetadata) ProtoMessage() {} + +func (x *StockScrapeOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_idb_stock_v1_stock_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StockScrapeOperationMetadata.ProtoReflect.Descriptor instead. +func (*StockScrapeOperationMetadata) Descriptor() ([]byte, []int) { + return file_idb_stock_v1_stock_proto_rawDescGZIP(), []int{3} +} + +func (x *StockScrapeOperationMetadata) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *StockScrapeOperationMetadata) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +type CreateStockRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` +} + +func (x *CreateStockRequest) Reset() { + *x = CreateStockRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_idb_stock_v1_stock_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateStockRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateStockRequest) ProtoMessage() {} + +func (x *CreateStockRequest) ProtoReflect() protoreflect.Message { + mi := &file_idb_stock_v1_stock_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateStockRequest.ProtoReflect.Descriptor instead. +func (*CreateStockRequest) Descriptor() ([]byte, []int) { + return file_idb_stock_v1_stock_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateStockRequest) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +type CreateStockResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Operation *longrunningpb.Operation `protobuf:"bytes,1,opt,name=operation,proto3" json:"operation,omitempty"` +} + +func (x *CreateStockResponse) Reset() { + *x = CreateStockResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_idb_stock_v1_stock_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateStockResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateStockResponse) ProtoMessage() {} + +func (x *CreateStockResponse) ProtoReflect() protoreflect.Message { + mi := &file_idb_stock_v1_stock_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateStockResponse.ProtoReflect.Descriptor instead. +func (*CreateStockResponse) Descriptor() ([]byte, []int) { + return file_idb_stock_v1_stock_proto_rawDescGZIP(), []int{5} +} + +func (x *CreateStockResponse) GetOperation() *longrunningpb.Operation { + if x != nil { + return x.Operation + } + return nil +} + +type GetStockRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` +} + +func (x *GetStockRequest) Reset() { + *x = GetStockRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_idb_stock_v1_stock_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetStockRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetStockRequest) ProtoMessage() {} + +func (x *GetStockRequest) ProtoReflect() protoreflect.Message { + mi := &file_idb_stock_v1_stock_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetStockRequest.ProtoReflect.Descriptor instead. +func (*GetStockRequest) Descriptor() ([]byte, []int) { + return file_idb_stock_v1_stock_proto_rawDescGZIP(), []int{6} +} + +func (x *GetStockRequest) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +type GetStockResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Stock *Stock `protobuf:"bytes,1,opt,name=stock,proto3" json:"stock,omitempty"` +} + +func (x *GetStockResponse) Reset() { + *x = GetStockResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_idb_stock_v1_stock_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetStockResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetStockResponse) ProtoMessage() {} + +func (x *GetStockResponse) ProtoReflect() protoreflect.Message { + mi := &file_idb_stock_v1_stock_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetStockResponse.ProtoReflect.Descriptor instead. +func (*GetStockResponse) Descriptor() ([]byte, []int) { + return file_idb_stock_v1_stock_proto_rawDescGZIP(), []int{7} +} + +func (x *GetStockResponse) GetStock() *Stock { + if x != nil { + return x.Stock + } + return nil +} + +type ListStocksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type StockListType `protobuf:"varint,1,opt,name=type,proto3,enum=idb.stock.v1.StockListType" json:"type,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListStocksRequest) Reset() { + *x = ListStocksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_idb_stock_v1_stock_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListStocksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListStocksRequest) ProtoMessage() {} + +func (x *ListStocksRequest) ProtoReflect() protoreflect.Message { + mi := &file_idb_stock_v1_stock_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListStocksRequest.ProtoReflect.Descriptor instead. +func (*ListStocksRequest) Descriptor() ([]byte, []int) { + return file_idb_stock_v1_stock_proto_rawDescGZIP(), []int{8} +} + +func (x *ListStocksRequest) GetType() StockListType { + if x != nil { + return x.Type + } + return StockListType_STOCK_LIST_TYPE_UNSPECIFIED +} + +func (x *ListStocksRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListStocksRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListStocksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Stocks []*Stock `protobuf:"bytes,1,rep,name=stocks,proto3" json:"stocks,omitempty"` + LastUpdate *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=last_update,json=lastUpdate,proto3" json:"last_update,omitempty"` + NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListStocksResponse) Reset() { + *x = ListStocksResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_idb_stock_v1_stock_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListStocksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListStocksResponse) ProtoMessage() {} + +func (x *ListStocksResponse) ProtoReflect() protoreflect.Message { + mi := &file_idb_stock_v1_stock_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListStocksResponse.ProtoReflect.Descriptor instead. +func (*ListStocksResponse) Descriptor() ([]byte, []int) { + return file_idb_stock_v1_stock_proto_rawDescGZIP(), []int{9} +} + +func (x *ListStocksResponse) GetStocks() []*Stock { + if x != nil { + return x.Stocks + } + return nil +} + +func (x *ListStocksResponse) GetLastUpdate() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdate + } + return nil +} + +func (x *ListStocksResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Ratings for the stock. +type StockRatings_Ratings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The composite rating. (1-99) + Composite uint32 `protobuf:"varint,1,opt,name=composite,proto3" json:"composite,omitempty"` + // The EPS rating. (1-99) + Eps uint32 `protobuf:"varint,2,opt,name=eps,proto3" json:"eps,omitempty"` + // The relative strength rating. (1-99) + RelativeStrength uint32 `protobuf:"varint,3,opt,name=relative_strength,json=relativeStrength,proto3" json:"relative_strength,omitempty"` + // The group relative strength rating. (E-A+) + GroupRelStrength LetterGrade `protobuf:"varint,4,opt,name=group_rel_strength,json=groupRelStrength,proto3,enum=idb.stock.v1.LetterGrade" json:"group_rel_strength,omitempty"` + // The SMR rating. (E-A+) + Smr LetterGrade `protobuf:"varint,5,opt,name=smr,proto3,enum=idb.stock.v1.LetterGrade" json:"smr,omitempty"` + // The accumulation/distribution rating. (E-A+) + AccDis LetterGrade `protobuf:"varint,6,opt,name=acc_dis,json=accDis,proto3,enum=idb.stock.v1.LetterGrade" json:"acc_dis,omitempty"` +} + +func (x *StockRatings_Ratings) Reset() { + *x = StockRatings_Ratings{} + if protoimpl.UnsafeEnabled { + mi := &file_idb_stock_v1_stock_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StockRatings_Ratings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StockRatings_Ratings) ProtoMessage() {} + +func (x *StockRatings_Ratings) ProtoReflect() protoreflect.Message { + mi := &file_idb_stock_v1_stock_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StockRatings_Ratings.ProtoReflect.Descriptor instead. +func (*StockRatings_Ratings) Descriptor() ([]byte, []int) { + return file_idb_stock_v1_stock_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *StockRatings_Ratings) GetComposite() uint32 { + if x != nil { + return x.Composite + } + return 0 +} + +func (x *StockRatings_Ratings) GetEps() uint32 { + if x != nil { + return x.Eps + } + return 0 +} + +func (x *StockRatings_Ratings) GetRelativeStrength() uint32 { + if x != nil { + return x.RelativeStrength + } + return 0 +} + +func (x *StockRatings_Ratings) GetGroupRelStrength() LetterGrade { + if x != nil { + return x.GroupRelStrength + } + return LetterGrade_LETTER_GRADE_UNSPECIFIED +} + +func (x *StockRatings_Ratings) GetSmr() LetterGrade { + if x != nil { + return x.Smr + } + return LetterGrade_LETTER_GRADE_UNSPECIFIED +} + +func (x *StockRatings_Ratings) GetAccDis() LetterGrade { + if x != nil { + return x.AccDis + } + return LetterGrade_LETTER_GRADE_UNSPECIFIED +} + +var File_idb_stock_v1_stock_proto protoreflect.FileDescriptor + +var file_idb_stock_v1_stock_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x69, 0x64, 0x62, 0x2f, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x73, + 0x74, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x69, 0x64, 0x62, 0x2e, + 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x1a, 0x23, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x6f, 0x6e, 0x65, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x93, 0x01, 0x0a, 0x05, 0x53, 0x74, 0x6f, 0x63, + 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, + 0x07, 0x69, 0x62, 0x64, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x06, 0x69, 0x62, 0x64, 0x55, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x07, 0x72, + 0x61, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x69, + 0x64, 0x62, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x63, + 0x6b, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x07, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x69, 0x62, 0x64, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0x9a, 0x04, + 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3c, + 0x0a, 0x07, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x69, 0x64, 0x62, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x74, 0x6f, 0x63, 0x6b, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x52, 0x61, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x52, 0x07, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x28, 0x0a, 0x05, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x52, + 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x05, 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, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x12, 0x42, 0x0a, 0x0e, 0x63, 0x68, 0x61, 0x72, 0x74, 0x5f, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x73, 0x69, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x69, 0x64, + 0x62, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x72, 0x74, + 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x52, 0x0d, 0x63, 0x68, 0x61, 0x72, 0x74, 0x41, + 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x1a, 0x90, 0x02, 0x0a, 0x07, 0x52, 0x61, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x70, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, + 0x65, 0x70, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x73, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x12, 0x47, 0x0a, 0x12, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x72, 0x65, 0x6c, 0x5f, 0x73, 0x74, + 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x69, + 0x64, 0x62, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x65, 0x74, 0x74, + 0x65, 0x72, 0x47, 0x72, 0x61, 0x64, 0x65, 0x52, 0x10, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, + 0x6c, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x2b, 0x0a, 0x03, 0x73, 0x6d, 0x72, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x69, 0x64, 0x62, 0x2e, 0x73, 0x74, 0x6f, + 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x65, 0x74, 0x74, 0x65, 0x72, 0x47, 0x72, 0x61, 0x64, + 0x65, 0x52, 0x03, 0x73, 0x6d, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x5f, 0x64, 0x69, + 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x69, 0x64, 0x62, 0x2e, 0x73, 0x74, + 0x6f, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x65, 0x74, 0x74, 0x65, 0x72, 0x47, 0x72, 0x61, + 0x64, 0x65, 0x52, 0x06, 0x61, 0x63, 0x63, 0x44, 0x69, 0x73, 0x22, 0x42, 0x0a, 0x0d, 0x43, 0x68, + 0x61, 0x72, 0x74, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x72, + 0x61, 0x77, 0x5f, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x72, 0x61, 0x77, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x22, 0x71, + 0x0a, 0x1c, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x53, 0x63, 0x72, 0x61, 0x70, 0x65, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 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, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x22, 0x2c, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x63, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, + 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x22, + 0x52, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x29, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x22, 0x3d, + 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x29, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x69, 0x64, 0x62, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x22, 0x80, 0x01, + 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1b, 0x2e, 0x69, 0x64, 0x62, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x22, 0xa6, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x6f, 0x63, 0x6b, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x69, 0x64, 0x62, 0x2e, 0x73, 0x74, + 0x6f, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x52, 0x06, 0x73, 0x74, + 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 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, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, + 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x2a, 0x66, 0x0a, 0x0d, 0x53, 0x74, 0x6f, + 0x63, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x54, + 0x4f, 0x43, 0x4b, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x53, + 0x54, 0x4f, 0x43, 0x4b, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, + 0x42, 0x44, 0x35, 0x30, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x54, 0x4f, 0x43, 0x4b, 0x5f, + 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x41, 0x50, 0x32, 0x30, 0x10, + 0x02, 0x2a, 0xf4, 0x02, 0x0a, 0x0b, 0x4c, 0x65, 0x74, 0x74, 0x65, 0x72, 0x47, 0x72, 0x61, 0x64, + 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x4c, 0x45, 0x54, 0x54, 0x45, 0x52, 0x5f, 0x47, 0x52, 0x41, 0x44, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x17, 0x0a, 0x13, 0x4c, 0x45, 0x54, 0x54, 0x45, 0x52, 0x5f, 0x47, 0x52, 0x41, 0x44, 0x45, 0x5f, + 0x41, 0x5f, 0x50, 0x4c, 0x55, 0x53, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x45, 0x54, 0x54, + 0x45, 0x52, 0x5f, 0x47, 0x52, 0x41, 0x44, 0x45, 0x5f, 0x41, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, + 0x4c, 0x45, 0x54, 0x54, 0x45, 0x52, 0x5f, 0x47, 0x52, 0x41, 0x44, 0x45, 0x5f, 0x41, 0x5f, 0x4d, + 0x49, 0x4e, 0x55, 0x53, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x4c, 0x45, 0x54, 0x54, 0x45, 0x52, + 0x5f, 0x47, 0x52, 0x41, 0x44, 0x45, 0x5f, 0x42, 0x5f, 0x50, 0x4c, 0x55, 0x53, 0x10, 0x04, 0x12, + 0x12, 0x0a, 0x0e, 0x4c, 0x45, 0x54, 0x54, 0x45, 0x52, 0x5f, 0x47, 0x52, 0x41, 0x44, 0x45, 0x5f, + 0x42, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x4c, 0x45, 0x54, 0x54, 0x45, 0x52, 0x5f, 0x47, 0x52, + 0x41, 0x44, 0x45, 0x5f, 0x42, 0x5f, 0x4d, 0x49, 0x4e, 0x55, 0x53, 0x10, 0x06, 0x12, 0x17, 0x0a, + 0x13, 0x4c, 0x45, 0x54, 0x54, 0x45, 0x52, 0x5f, 0x47, 0x52, 0x41, 0x44, 0x45, 0x5f, 0x43, 0x5f, + 0x50, 0x4c, 0x55, 0x53, 0x10, 0x07, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x45, 0x54, 0x54, 0x45, 0x52, + 0x5f, 0x47, 0x52, 0x41, 0x44, 0x45, 0x5f, 0x43, 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x4c, 0x45, + 0x54, 0x54, 0x45, 0x52, 0x5f, 0x47, 0x52, 0x41, 0x44, 0x45, 0x5f, 0x43, 0x5f, 0x4d, 0x49, 0x4e, + 0x55, 0x53, 0x10, 0x09, 0x12, 0x17, 0x0a, 0x13, 0x4c, 0x45, 0x54, 0x54, 0x45, 0x52, 0x5f, 0x47, + 0x52, 0x41, 0x44, 0x45, 0x5f, 0x44, 0x5f, 0x50, 0x4c, 0x55, 0x53, 0x10, 0x0a, 0x12, 0x12, 0x0a, + 0x0e, 0x4c, 0x45, 0x54, 0x54, 0x45, 0x52, 0x5f, 0x47, 0x52, 0x41, 0x44, 0x45, 0x5f, 0x44, 0x10, + 0x0b, 0x12, 0x18, 0x0a, 0x14, 0x4c, 0x45, 0x54, 0x54, 0x45, 0x52, 0x5f, 0x47, 0x52, 0x41, 0x44, + 0x45, 0x5f, 0x44, 0x5f, 0x4d, 0x49, 0x4e, 0x55, 0x53, 0x10, 0x0c, 0x12, 0x17, 0x0a, 0x13, 0x4c, + 0x45, 0x54, 0x54, 0x45, 0x52, 0x5f, 0x47, 0x52, 0x41, 0x44, 0x45, 0x5f, 0x45, 0x5f, 0x50, 0x4c, + 0x55, 0x53, 0x10, 0x0d, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x45, 0x54, 0x54, 0x45, 0x52, 0x5f, 0x47, + 0x52, 0x41, 0x44, 0x45, 0x5f, 0x45, 0x10, 0x0e, 0x32, 0xa8, 0x02, 0x0a, 0x0c, 0x53, 0x74, 0x6f, + 0x63, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7c, 0x0a, 0x0b, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x12, 0x20, 0x2e, 0x69, 0x64, 0x62, 0x2e, 0x73, + 0x74, 0x6f, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, + 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x69, 0x64, 0x62, + 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0xca, + 0x41, 0x25, 0x0a, 0x05, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x12, 0x1c, 0x53, 0x74, 0x6f, 0x63, 0x6b, + 0x53, 0x63, 0x72, 0x61, 0x70, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x49, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x53, 0x74, + 0x6f, 0x63, 0x6b, 0x12, 0x1d, 0x2e, 0x69, 0x64, 0x62, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x69, 0x64, 0x62, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x73, + 0x12, 0x1f, 0x2e, 0x69, 0x64, 0x62, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x20, 0x2e, 0x69, 0x64, 0x62, 0x2e, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x42, 0xb0, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x64, 0x62, 0x2e, + 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x61, 0x6e, 0x73, 0x67, 0x31, 0x39, 0x31, 0x2f, 0x69, 0x62, 0x64, 0x2d, 0x74, + 0x72, 0x61, 0x64, 0x65, 0x72, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x69, 0x64, 0x62, 0x2f, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x2f, 0x76, 0x31, 0x3b, 0x73, + 0x74, 0x6f, 0x63, 0x6b, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x49, 0x53, 0x58, 0xaa, 0x02, 0x0c, 0x49, + 0x64, 0x62, 0x2e, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x49, 0x64, + 0x62, 0x5c, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x49, 0x64, 0x62, + 0x5c, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x49, 0x64, 0x62, 0x3a, 0x3a, 0x53, 0x74, 0x6f, + 0x63, 0x6b, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_idb_stock_v1_stock_proto_rawDescOnce sync.Once + file_idb_stock_v1_stock_proto_rawDescData = file_idb_stock_v1_stock_proto_rawDesc +) + +func file_idb_stock_v1_stock_proto_rawDescGZIP() []byte { + file_idb_stock_v1_stock_proto_rawDescOnce.Do(func() { + file_idb_stock_v1_stock_proto_rawDescData = protoimpl.X.CompressGZIP(file_idb_stock_v1_stock_proto_rawDescData) + }) + return file_idb_stock_v1_stock_proto_rawDescData +} + +var file_idb_stock_v1_stock_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_idb_stock_v1_stock_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_idb_stock_v1_stock_proto_goTypes = []any{ + (StockListType)(0), // 0: idb.stock.v1.StockListType + (LetterGrade)(0), // 1: idb.stock.v1.LetterGrade + (*Stock)(nil), // 2: idb.stock.v1.Stock + (*StockRatings)(nil), // 3: idb.stock.v1.StockRatings + (*ChartAnalysis)(nil), // 4: idb.stock.v1.ChartAnalysis + (*StockScrapeOperationMetadata)(nil), // 5: idb.stock.v1.StockScrapeOperationMetadata + (*CreateStockRequest)(nil), // 6: idb.stock.v1.CreateStockRequest + (*CreateStockResponse)(nil), // 7: idb.stock.v1.CreateStockResponse + (*GetStockRequest)(nil), // 8: idb.stock.v1.GetStockRequest + (*GetStockResponse)(nil), // 9: idb.stock.v1.GetStockResponse + (*ListStocksRequest)(nil), // 10: idb.stock.v1.ListStocksRequest + (*ListStocksResponse)(nil), // 11: idb.stock.v1.ListStocksResponse + (*StockRatings_Ratings)(nil), // 12: idb.stock.v1.StockRatings.Ratings + (*money.Money)(nil), // 13: google.type.Money + (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp + (*longrunningpb.Operation)(nil), // 15: google.longrunning.Operation +} +var file_idb_stock_v1_stock_proto_depIdxs = []int32{ + 3, // 0: idb.stock.v1.Stock.ratings:type_name -> idb.stock.v1.StockRatings + 12, // 1: idb.stock.v1.StockRatings.ratings:type_name -> idb.stock.v1.StockRatings.Ratings + 13, // 2: idb.stock.v1.StockRatings.price:type_name -> google.type.Money + 14, // 3: idb.stock.v1.StockRatings.last_update:type_name -> google.protobuf.Timestamp + 4, // 4: idb.stock.v1.StockRatings.chart_analysis:type_name -> idb.stock.v1.ChartAnalysis + 14, // 5: idb.stock.v1.StockScrapeOperationMetadata.start_time:type_name -> google.protobuf.Timestamp + 15, // 6: idb.stock.v1.CreateStockResponse.operation:type_name -> google.longrunning.Operation + 2, // 7: idb.stock.v1.GetStockResponse.stock:type_name -> idb.stock.v1.Stock + 0, // 8: idb.stock.v1.ListStocksRequest.type:type_name -> idb.stock.v1.StockListType + 2, // 9: idb.stock.v1.ListStocksResponse.stocks:type_name -> idb.stock.v1.Stock + 14, // 10: idb.stock.v1.ListStocksResponse.last_update:type_name -> google.protobuf.Timestamp + 1, // 11: idb.stock.v1.StockRatings.Ratings.group_rel_strength:type_name -> idb.stock.v1.LetterGrade + 1, // 12: idb.stock.v1.StockRatings.Ratings.smr:type_name -> idb.stock.v1.LetterGrade + 1, // 13: idb.stock.v1.StockRatings.Ratings.acc_dis:type_name -> idb.stock.v1.LetterGrade + 6, // 14: idb.stock.v1.StockService.CreateStock:input_type -> idb.stock.v1.CreateStockRequest + 8, // 15: idb.stock.v1.StockService.GetStock:input_type -> idb.stock.v1.GetStockRequest + 10, // 16: idb.stock.v1.StockService.ListStocks:input_type -> idb.stock.v1.ListStocksRequest + 7, // 17: idb.stock.v1.StockService.CreateStock:output_type -> idb.stock.v1.CreateStockResponse + 9, // 18: idb.stock.v1.StockService.GetStock:output_type -> idb.stock.v1.GetStockResponse + 11, // 19: idb.stock.v1.StockService.ListStocks:output_type -> idb.stock.v1.ListStocksResponse + 17, // [17:20] is the sub-list for method output_type + 14, // [14:17] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name +} + +func init() { file_idb_stock_v1_stock_proto_init() } +func file_idb_stock_v1_stock_proto_init() { + if File_idb_stock_v1_stock_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_idb_stock_v1_stock_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Stock); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idb_stock_v1_stock_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*StockRatings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idb_stock_v1_stock_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ChartAnalysis); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idb_stock_v1_stock_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*StockScrapeOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idb_stock_v1_stock_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*CreateStockRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idb_stock_v1_stock_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*CreateStockResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idb_stock_v1_stock_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*GetStockRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idb_stock_v1_stock_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*GetStockResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idb_stock_v1_stock_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*ListStocksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idb_stock_v1_stock_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*ListStocksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idb_stock_v1_stock_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*StockRatings_Ratings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_idb_stock_v1_stock_proto_msgTypes[0].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_idb_stock_v1_stock_proto_rawDesc, + NumEnums: 2, + NumMessages: 11, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_idb_stock_v1_stock_proto_goTypes, + DependencyIndexes: file_idb_stock_v1_stock_proto_depIdxs, + EnumInfos: file_idb_stock_v1_stock_proto_enumTypes, + MessageInfos: file_idb_stock_v1_stock_proto_msgTypes, + }.Build() + File_idb_stock_v1_stock_proto = out.File + file_idb_stock_v1_stock_proto_rawDesc = nil + file_idb_stock_v1_stock_proto_goTypes = nil + file_idb_stock_v1_stock_proto_depIdxs = nil +} diff --git a/backend/api/idb/stock/v1/stock_grpc.pb.go b/backend/api/idb/stock/v1/stock_grpc.pb.go new file mode 100644 index 0000000..ae2d02c --- /dev/null +++ b/backend/api/idb/stock/v1/stock_grpc.pb.go @@ -0,0 +1,205 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: idb/stock/v1/stock.proto + +package stockv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + StockService_CreateStock_FullMethodName = "/idb.stock.v1.StockService/CreateStock" + StockService_GetStock_FullMethodName = "/idb.stock.v1.StockService/GetStock" + StockService_ListStocks_FullMethodName = "/idb.stock.v1.StockService/ListStocks" +) + +// StockServiceClient is the client API for StockService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// StockService provides methods for interacting with stock data. +type StockServiceClient interface { + CreateStock(ctx context.Context, in *CreateStockRequest, opts ...grpc.CallOption) (*CreateStockResponse, error) + // GetStock returns a stock by symbol. + GetStock(ctx context.Context, in *GetStockRequest, opts ...grpc.CallOption) (*GetStockResponse, error) + // ListStocks returns a list of stocks. + ListStocks(ctx context.Context, in *ListStocksRequest, opts ...grpc.CallOption) (*ListStocksResponse, error) +} + +type stockServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewStockServiceClient(cc grpc.ClientConnInterface) StockServiceClient { + return &stockServiceClient{cc} +} + +func (c *stockServiceClient) CreateStock(ctx context.Context, in *CreateStockRequest, opts ...grpc.CallOption) (*CreateStockResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreateStockResponse) + err := c.cc.Invoke(ctx, StockService_CreateStock_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *stockServiceClient) GetStock(ctx context.Context, in *GetStockRequest, opts ...grpc.CallOption) (*GetStockResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetStockResponse) + err := c.cc.Invoke(ctx, StockService_GetStock_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *stockServiceClient) ListStocks(ctx context.Context, in *ListStocksRequest, opts ...grpc.CallOption) (*ListStocksResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListStocksResponse) + err := c.cc.Invoke(ctx, StockService_ListStocks_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// StockServiceServer is the server API for StockService service. +// All implementations must embed UnimplementedStockServiceServer +// for forward compatibility. +// +// StockService provides methods for interacting with stock data. +type StockServiceServer interface { + CreateStock(context.Context, *CreateStockRequest) (*CreateStockResponse, error) + // GetStock returns a stock by symbol. + GetStock(context.Context, *GetStockRequest) (*GetStockResponse, error) + // ListStocks returns a list of stocks. + ListStocks(context.Context, *ListStocksRequest) (*ListStocksResponse, error) + mustEmbedUnimplementedStockServiceServer() +} + +// UnimplementedStockServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedStockServiceServer struct{} + +func (UnimplementedStockServiceServer) CreateStock(context.Context, *CreateStockRequest) (*CreateStockResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateStock not implemented") +} +func (UnimplementedStockServiceServer) GetStock(context.Context, *GetStockRequest) (*GetStockResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStock not implemented") +} +func (UnimplementedStockServiceServer) ListStocks(context.Context, *ListStocksRequest) (*ListStocksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListStocks not implemented") +} +func (UnimplementedStockServiceServer) mustEmbedUnimplementedStockServiceServer() {} +func (UnimplementedStockServiceServer) testEmbeddedByValue() {} + +// UnsafeStockServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to StockServiceServer will +// result in compilation errors. +type UnsafeStockServiceServer interface { + mustEmbedUnimplementedStockServiceServer() +} + +func RegisterStockServiceServer(s grpc.ServiceRegistrar, srv StockServiceServer) { + // If the following call pancis, it indicates UnimplementedStockServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&StockService_ServiceDesc, srv) +} + +func _StockService_CreateStock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateStockRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StockServiceServer).CreateStock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StockService_CreateStock_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StockServiceServer).CreateStock(ctx, req.(*CreateStockRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StockService_GetStock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetStockRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StockServiceServer).GetStock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StockService_GetStock_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StockServiceServer).GetStock(ctx, req.(*GetStockRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StockService_ListStocks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListStocksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StockServiceServer).ListStocks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StockService_ListStocks_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StockServiceServer).ListStocks(ctx, req.(*ListStocksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// StockService_ServiceDesc is the grpc.ServiceDesc for StockService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var StockService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "idb.stock.v1.StockService", + HandlerType: (*StockServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateStock", + Handler: _StockService_CreateStock_Handler, + }, + { + MethodName: "GetStock", + Handler: _StockService_GetStock_Handler, + }, + { + MethodName: "ListStocks", + Handler: _StockService_ListStocks_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "idb/stock/v1/stock.proto", +} diff --git a/backend/api/idb/user/v1/user.pb.go b/backend/api/idb/user/v1/user.pb.go new file mode 100644 index 0000000..4cdd183 --- /dev/null +++ b/backend/api/idb/user/v1/user.pb.go @@ -0,0 +1,875 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: idb/user/v1/user.proto + +package userv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type User struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The subject of the user returned from Auth0. + Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` + // The username of the user's IBD account. + IbdUsername *string `protobuf:"bytes,2,opt,name=ibd_username,json=ibdUsername,proto3,oneof" json:"ibd_username,omitempty"` + // The password of the user's IBD account. + // The password is optional because it is never returned from the server. + // It is only used when updating a user. + IbdPassword *string `protobuf:"bytes,3,opt,name=ibd_password,json=ibdPassword,proto3,oneof" json:"ibd_password,omitempty"` +} + +func (x *User) Reset() { + *x = User{} + if protoimpl.UnsafeEnabled { + mi := &file_idb_user_v1_user_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *User) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*User) ProtoMessage() {} + +func (x *User) ProtoReflect() protoreflect.Message { + mi := &file_idb_user_v1_user_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use User.ProtoReflect.Descriptor instead. +func (*User) Descriptor() ([]byte, []int) { + return file_idb_user_v1_user_proto_rawDescGZIP(), []int{0} +} + +func (x *User) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + +func (x *User) GetIbdUsername() string { + if x != nil && x.IbdUsername != nil { + return *x.IbdUsername + } + return "" +} + +func (x *User) GetIbdPassword() string { + if x != nil && x.IbdPassword != nil { + return *x.IbdPassword + } + return "" +} + +type CreateUserRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` +} + +func (x *CreateUserRequest) Reset() { + *x = CreateUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_idb_user_v1_user_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateUserRequest) ProtoMessage() {} + +func (x *CreateUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_idb_user_v1_user_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead. +func (*CreateUserRequest) Descriptor() ([]byte, []int) { + return file_idb_user_v1_user_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateUserRequest) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + +type CreateUserResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` +} + +func (x *CreateUserResponse) Reset() { + *x = CreateUserResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_idb_user_v1_user_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateUserResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateUserResponse) ProtoMessage() {} + +func (x *CreateUserResponse) ProtoReflect() protoreflect.Message { + mi := &file_idb_user_v1_user_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateUserResponse.ProtoReflect.Descriptor instead. +func (*CreateUserResponse) Descriptor() ([]byte, []int) { + return file_idb_user_v1_user_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateUserResponse) GetUser() *User { + if x != nil { + return x.User + } + return nil +} + +type GetUserRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` +} + +func (x *GetUserRequest) Reset() { + *x = GetUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_idb_user_v1_user_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserRequest) ProtoMessage() {} + +func (x *GetUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_idb_user_v1_user_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead. +func (*GetUserRequest) Descriptor() ([]byte, []int) { + return file_idb_user_v1_user_proto_rawDescGZIP(), []int{3} +} + +func (x *GetUserRequest) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + +type GetUserResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` +} + +func (x *GetUserResponse) Reset() { + *x = GetUserResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_idb_user_v1_user_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUserResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserResponse) ProtoMessage() {} + +func (x *GetUserResponse) ProtoReflect() protoreflect.Message { + mi := &file_idb_user_v1_user_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead. +func (*GetUserResponse) Descriptor() ([]byte, []int) { + return file_idb_user_v1_user_proto_rawDescGZIP(), []int{4} +} + +func (x *GetUserResponse) GetUser() *User { + if x != nil { + return x.User + } + return nil +} + +type UpdateUserRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateUserRequest) Reset() { + *x = UpdateUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_idb_user_v1_user_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateUserRequest) ProtoMessage() {} + +func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_idb_user_v1_user_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead. +func (*UpdateUserRequest) Descriptor() ([]byte, []int) { + return file_idb_user_v1_user_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateUserRequest) GetUser() *User { + if x != nil { + return x.User + } + return nil +} + +func (x *UpdateUserRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +type UpdateUserResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` +} + +func (x *UpdateUserResponse) Reset() { + *x = UpdateUserResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_idb_user_v1_user_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateUserResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateUserResponse) ProtoMessage() {} + +func (x *UpdateUserResponse) ProtoReflect() protoreflect.Message { + mi := &file_idb_user_v1_user_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateUserResponse.ProtoReflect.Descriptor instead. +func (*UpdateUserResponse) Descriptor() ([]byte, []int) { + return file_idb_user_v1_user_proto_rawDescGZIP(), []int{6} +} + +func (x *UpdateUserResponse) GetUser() *User { + if x != nil { + return x.User + } + return nil +} + +type CheckIBDUsernameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IbdUsername string `protobuf:"bytes,1,opt,name=ibd_username,json=ibdUsername,proto3" json:"ibd_username,omitempty"` +} + +func (x *CheckIBDUsernameRequest) Reset() { + *x = CheckIBDUsernameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_idb_user_v1_user_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckIBDUsernameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckIBDUsernameRequest) ProtoMessage() {} + +func (x *CheckIBDUsernameRequest) ProtoReflect() protoreflect.Message { + mi := &file_idb_user_v1_user_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckIBDUsernameRequest.ProtoReflect.Descriptor instead. +func (*CheckIBDUsernameRequest) Descriptor() ([]byte, []int) { + return file_idb_user_v1_user_proto_rawDescGZIP(), []int{7} +} + +func (x *CheckIBDUsernameRequest) GetIbdUsername() string { + if x != nil { + return x.IbdUsername + } + return "" +} + +type CheckIBDUsernameResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` +} + +func (x *CheckIBDUsernameResponse) Reset() { + *x = CheckIBDUsernameResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_idb_user_v1_user_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckIBDUsernameResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckIBDUsernameResponse) ProtoMessage() {} + +func (x *CheckIBDUsernameResponse) ProtoReflect() protoreflect.Message { + mi := &file_idb_user_v1_user_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckIBDUsernameResponse.ProtoReflect.Descriptor instead. +func (*CheckIBDUsernameResponse) Descriptor() ([]byte, []int) { + return file_idb_user_v1_user_proto_rawDescGZIP(), []int{8} +} + +func (x *CheckIBDUsernameResponse) GetExists() bool { + if x != nil { + return x.Exists + } + return false +} + +type AuthenticateUserRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` +} + +func (x *AuthenticateUserRequest) Reset() { + *x = AuthenticateUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_idb_user_v1_user_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AuthenticateUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthenticateUserRequest) ProtoMessage() {} + +func (x *AuthenticateUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_idb_user_v1_user_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuthenticateUserRequest.ProtoReflect.Descriptor instead. +func (*AuthenticateUserRequest) Descriptor() ([]byte, []int) { + return file_idb_user_v1_user_proto_rawDescGZIP(), []int{9} +} + +func (x *AuthenticateUserRequest) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + +type AuthenticateUserResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Authenticated bool `protobuf:"varint,1,opt,name=authenticated,proto3" json:"authenticated,omitempty"` +} + +func (x *AuthenticateUserResponse) Reset() { + *x = AuthenticateUserResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_idb_user_v1_user_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AuthenticateUserResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthenticateUserResponse) ProtoMessage() {} + +func (x *AuthenticateUserResponse) ProtoReflect() protoreflect.Message { + mi := &file_idb_user_v1_user_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuthenticateUserResponse.ProtoReflect.Descriptor instead. +func (*AuthenticateUserResponse) Descriptor() ([]byte, []int) { + return file_idb_user_v1_user_proto_rawDescGZIP(), []int{10} +} + +func (x *AuthenticateUserResponse) GetAuthenticated() bool { + if x != nil { + return x.Authenticated + } + return false +} + +var File_idb_user_v1_user_proto protoreflect.FileDescriptor + +var file_idb_user_v1_user_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x69, 0x64, 0x62, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x69, 0x64, 0x62, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, + 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x92, 0x01, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, + 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x26, 0x0a, 0x0c, 0x69, 0x62, + 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x0b, 0x69, 0x62, 0x64, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x69, 0x62, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0b, 0x69, 0x62, 0x64, 0x50, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x69, + 0x62, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, + 0x69, 0x62, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x2d, 0x0a, 0x11, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x3b, 0x0a, 0x12, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x11, 0x2e, 0x69, 0x64, 0x62, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x2a, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x22, 0x38, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x69, 0x64, 0x62, 0x2e, 0x75, 0x73, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x77, + 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x69, 0x64, 0x62, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 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, 0x3b, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, + 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x69, 0x64, + 0x62, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, + 0x75, 0x73, 0x65, 0x72, 0x22, 0x3c, 0x0a, 0x17, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x42, 0x44, + 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x21, 0x0a, 0x0c, 0x69, 0x62, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x62, 0x64, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0x32, 0x0a, 0x18, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x42, 0x44, 0x55, 0x73, + 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x33, 0x0a, 0x17, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, + 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x40, 0x0a, 0x18, 0x41, + 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x65, + 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, + 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x32, 0xb3, 0x03, + 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4d, 0x0a, + 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x69, 0x64, + 0x62, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x69, 0x64, + 0x62, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x07, + 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1b, 0x2e, 0x69, 0x64, 0x62, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x69, 0x64, 0x62, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, + 0x12, 0x1e, 0x2e, 0x69, 0x64, 0x62, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1f, 0x2e, 0x69, 0x64, 0x62, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x5f, 0x0a, 0x10, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x42, 0x44, 0x55, 0x73, 0x65, + 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x2e, 0x69, 0x64, 0x62, 0x2e, 0x75, 0x73, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x42, 0x44, 0x55, 0x73, 0x65, 0x72, + 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x69, 0x64, + 0x62, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, + 0x42, 0x44, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x10, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x24, 0x2e, 0x69, 0x64, 0x62, 0x2e, 0x75, 0x73, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x69, + 0x64, 0x62, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, + 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x42, 0xa8, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x64, 0x62, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x61, 0x6e, 0x73, 0x67, 0x31, 0x39, 0x31, 0x2f, 0x69, 0x62, 0x64, 0x2d, 0x74, 0x72, 0x61, + 0x64, 0x65, 0x72, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x69, 0x64, 0x62, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x73, 0x65, 0x72, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x49, 0x55, 0x58, 0xaa, 0x02, 0x0b, 0x49, 0x64, 0x62, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0b, 0x49, 0x64, 0x62, 0x5c, 0x55, 0x73, 0x65, + 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x17, 0x49, 0x64, 0x62, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, + 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x0d, 0x49, 0x64, 0x62, 0x3a, 0x3a, 0x55, 0x73, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_idb_user_v1_user_proto_rawDescOnce sync.Once + file_idb_user_v1_user_proto_rawDescData = file_idb_user_v1_user_proto_rawDesc +) + +func file_idb_user_v1_user_proto_rawDescGZIP() []byte { + file_idb_user_v1_user_proto_rawDescOnce.Do(func() { + file_idb_user_v1_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_idb_user_v1_user_proto_rawDescData) + }) + return file_idb_user_v1_user_proto_rawDescData +} + +var file_idb_user_v1_user_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_idb_user_v1_user_proto_goTypes = []any{ + (*User)(nil), // 0: idb.user.v1.User + (*CreateUserRequest)(nil), // 1: idb.user.v1.CreateUserRequest + (*CreateUserResponse)(nil), // 2: idb.user.v1.CreateUserResponse + (*GetUserRequest)(nil), // 3: idb.user.v1.GetUserRequest + (*GetUserResponse)(nil), // 4: idb.user.v1.GetUserResponse + (*UpdateUserRequest)(nil), // 5: idb.user.v1.UpdateUserRequest + (*UpdateUserResponse)(nil), // 6: idb.user.v1.UpdateUserResponse + (*CheckIBDUsernameRequest)(nil), // 7: idb.user.v1.CheckIBDUsernameRequest + (*CheckIBDUsernameResponse)(nil), // 8: idb.user.v1.CheckIBDUsernameResponse + (*AuthenticateUserRequest)(nil), // 9: idb.user.v1.AuthenticateUserRequest + (*AuthenticateUserResponse)(nil), // 10: idb.user.v1.AuthenticateUserResponse + (*fieldmaskpb.FieldMask)(nil), // 11: google.protobuf.FieldMask +} +var file_idb_user_v1_user_proto_depIdxs = []int32{ + 0, // 0: idb.user.v1.CreateUserResponse.user:type_name -> idb.user.v1.User + 0, // 1: idb.user.v1.GetUserResponse.user:type_name -> idb.user.v1.User + 0, // 2: idb.user.v1.UpdateUserRequest.user:type_name -> idb.user.v1.User + 11, // 3: idb.user.v1.UpdateUserRequest.update_mask:type_name -> google.protobuf.FieldMask + 0, // 4: idb.user.v1.UpdateUserResponse.user:type_name -> idb.user.v1.User + 1, // 5: idb.user.v1.UserService.CreateUser:input_type -> idb.user.v1.CreateUserRequest + 3, // 6: idb.user.v1.UserService.GetUser:input_type -> idb.user.v1.GetUserRequest + 5, // 7: idb.user.v1.UserService.UpdateUser:input_type -> idb.user.v1.UpdateUserRequest + 7, // 8: idb.user.v1.UserService.CheckIBDUsername:input_type -> idb.user.v1.CheckIBDUsernameRequest + 9, // 9: idb.user.v1.UserService.AuthenticateUser:input_type -> idb.user.v1.AuthenticateUserRequest + 2, // 10: idb.user.v1.UserService.CreateUser:output_type -> idb.user.v1.CreateUserResponse + 4, // 11: idb.user.v1.UserService.GetUser:output_type -> idb.user.v1.GetUserResponse + 6, // 12: idb.user.v1.UserService.UpdateUser:output_type -> idb.user.v1.UpdateUserResponse + 8, // 13: idb.user.v1.UserService.CheckIBDUsername:output_type -> idb.user.v1.CheckIBDUsernameResponse + 10, // 14: idb.user.v1.UserService.AuthenticateUser:output_type -> idb.user.v1.AuthenticateUserResponse + 10, // [10:15] is the sub-list for method output_type + 5, // [5:10] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_idb_user_v1_user_proto_init() } +func file_idb_user_v1_user_proto_init() { + if File_idb_user_v1_user_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_idb_user_v1_user_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*User); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idb_user_v1_user_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*CreateUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idb_user_v1_user_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*CreateUserResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idb_user_v1_user_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*GetUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idb_user_v1_user_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*GetUserResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idb_user_v1_user_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*UpdateUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idb_user_v1_user_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*UpdateUserResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idb_user_v1_user_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*CheckIBDUsernameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idb_user_v1_user_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*CheckIBDUsernameResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idb_user_v1_user_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*AuthenticateUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idb_user_v1_user_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*AuthenticateUserResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_idb_user_v1_user_proto_msgTypes[0].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_idb_user_v1_user_proto_rawDesc, + NumEnums: 0, + NumMessages: 11, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_idb_user_v1_user_proto_goTypes, + DependencyIndexes: file_idb_user_v1_user_proto_depIdxs, + MessageInfos: file_idb_user_v1_user_proto_msgTypes, + }.Build() + File_idb_user_v1_user_proto = out.File + file_idb_user_v1_user_proto_rawDesc = nil + file_idb_user_v1_user_proto_goTypes = nil + file_idb_user_v1_user_proto_depIdxs = nil +} diff --git a/backend/api/idb/user/v1/user_grpc.pb.go b/backend/api/idb/user/v1/user_grpc.pb.go new file mode 100644 index 0000000..ad16ecf --- /dev/null +++ b/backend/api/idb/user/v1/user_grpc.pb.go @@ -0,0 +1,277 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: idb/user/v1/user.proto + +package userv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + UserService_CreateUser_FullMethodName = "/idb.user.v1.UserService/CreateUser" + UserService_GetUser_FullMethodName = "/idb.user.v1.UserService/GetUser" + UserService_UpdateUser_FullMethodName = "/idb.user.v1.UserService/UpdateUser" + UserService_CheckIBDUsername_FullMethodName = "/idb.user.v1.UserService/CheckIBDUsername" + UserService_AuthenticateUser_FullMethodName = "/idb.user.v1.UserService/AuthenticateUser" +) + +// UserServiceClient is the client API for UserService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// The user service provides methods for interacting with user data. +type UserServiceClient interface { + CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error) + GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) + UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error) + CheckIBDUsername(ctx context.Context, in *CheckIBDUsernameRequest, opts ...grpc.CallOption) (*CheckIBDUsernameResponse, error) + AuthenticateUser(ctx context.Context, in *AuthenticateUserRequest, opts ...grpc.CallOption) (*AuthenticateUserResponse, error) +} + +type userServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient { + return &userServiceClient{cc} +} + +func (c *userServiceClient) CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreateUserResponse) + err := c.cc.Invoke(ctx, UserService_CreateUser_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetUserResponse) + err := c.cc.Invoke(ctx, UserService_GetUser_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userServiceClient) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UpdateUserResponse) + err := c.cc.Invoke(ctx, UserService_UpdateUser_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userServiceClient) CheckIBDUsername(ctx context.Context, in *CheckIBDUsernameRequest, opts ...grpc.CallOption) (*CheckIBDUsernameResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CheckIBDUsernameResponse) + err := c.cc.Invoke(ctx, UserService_CheckIBDUsername_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userServiceClient) AuthenticateUser(ctx context.Context, in *AuthenticateUserRequest, opts ...grpc.CallOption) (*AuthenticateUserResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AuthenticateUserResponse) + err := c.cc.Invoke(ctx, UserService_AuthenticateUser_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// UserServiceServer is the server API for UserService service. +// All implementations must embed UnimplementedUserServiceServer +// for forward compatibility. +// +// The user service provides methods for interacting with user data. +type UserServiceServer interface { + CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error) + GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) + UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error) + CheckIBDUsername(context.Context, *CheckIBDUsernameRequest) (*CheckIBDUsernameResponse, error) + AuthenticateUser(context.Context, *AuthenticateUserRequest) (*AuthenticateUserResponse, error) + mustEmbedUnimplementedUserServiceServer() +} + +// UnimplementedUserServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedUserServiceServer struct{} + +func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateUser not implemented") +} +func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented") +} +func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateUser not implemented") +} +func (UnimplementedUserServiceServer) CheckIBDUsername(context.Context, *CheckIBDUsernameRequest) (*CheckIBDUsernameResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CheckIBDUsername not implemented") +} +func (UnimplementedUserServiceServer) AuthenticateUser(context.Context, *AuthenticateUserRequest) (*AuthenticateUserResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AuthenticateUser not implemented") +} +func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {} +func (UnimplementedUserServiceServer) testEmbeddedByValue() {} + +// UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to UserServiceServer will +// result in compilation errors. +type UnsafeUserServiceServer interface { + mustEmbedUnimplementedUserServiceServer() +} + +func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) { + // If the following call pancis, it indicates UnimplementedUserServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&UserService_ServiceDesc, srv) +} + +func _UserService_CreateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).CreateUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_CreateUser_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).CreateUser(ctx, req.(*CreateUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserService_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).GetUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_GetUser_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).GetUser(ctx, req.(*GetUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserService_UpdateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).UpdateUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_UpdateUser_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).UpdateUser(ctx, req.(*UpdateUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserService_CheckIBDUsername_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CheckIBDUsernameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).CheckIBDUsername(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_CheckIBDUsername_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).CheckIBDUsername(ctx, req.(*CheckIBDUsernameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserService_AuthenticateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AuthenticateUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).AuthenticateUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_AuthenticateUser_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).AuthenticateUser(ctx, req.(*AuthenticateUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var UserService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "idb.user.v1.UserService", + HandlerType: (*UserServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateUser", + Handler: _UserService_CreateUser_Handler, + }, + { + MethodName: "GetUser", + Handler: _UserService_GetUser_Handler, + }, + { + MethodName: "UpdateUser", + Handler: _UserService_UpdateUser_Handler, + }, + { + MethodName: "CheckIBDUsername", + Handler: _UserService_CheckIBDUsername_Handler, + }, + { + MethodName: "AuthenticateUser", + Handler: _UserService_AuthenticateUser_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "idb/user/v1/user.proto", +} diff --git a/backend/cmd/main.go b/backend/cmd/main.go index 2a34780..b09aab4 100644 --- a/backend/cmd/main.go +++ b/backend/cmd/main.go @@ -11,18 +11,18 @@ import ( "os/signal" "time" - "github.com/ansg191/ibd-trader-backend/internal/analyzer/openai" - auth2 "github.com/ansg191/ibd-trader-backend/internal/auth" - "github.com/ansg191/ibd-trader-backend/internal/config" - "github.com/ansg191/ibd-trader-backend/internal/database" - "github.com/ansg191/ibd-trader-backend/internal/ibd" - "github.com/ansg191/ibd-trader-backend/internal/ibd/transport" - "github.com/ansg191/ibd-trader-backend/internal/ibd/transport/scrapfly" - "github.com/ansg191/ibd-trader-backend/internal/keys" - "github.com/ansg191/ibd-trader-backend/internal/leader/election" - "github.com/ansg191/ibd-trader-backend/internal/leader/manager" - "github.com/ansg191/ibd-trader-backend/internal/server" - "github.com/ansg191/ibd-trader-backend/internal/worker" + "github.com/ansg191/ibd-trader/backend/internal/analyzer/openai" + auth2 "github.com/ansg191/ibd-trader/backend/internal/auth" + "github.com/ansg191/ibd-trader/backend/internal/config" + "github.com/ansg191/ibd-trader/backend/internal/database" + "github.com/ansg191/ibd-trader/backend/internal/ibd" + "github.com/ansg191/ibd-trader/backend/internal/ibd/transport" + "github.com/ansg191/ibd-trader/backend/internal/ibd/transport/scrapfly" + "github.com/ansg191/ibd-trader/backend/internal/keys" + "github.com/ansg191/ibd-trader/backend/internal/leader/election" + "github.com/ansg191/ibd-trader/backend/internal/leader/manager" + "github.com/ansg191/ibd-trader/backend/internal/server" + "github.com/ansg191/ibd-trader/backend/internal/worker" "github.com/lmittmann/tint" "github.com/redis/go-redis/v9" diff --git a/backend/go.mod b/backend/go.mod index 7b717b2..75dc6db 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -1,4 +1,4 @@ -module github.com/ansg191/ibd-trader-backend +module github.com/ansg191/ibd-trader/backend go 1.22.0 diff --git a/backend/internal/analyzer/openai/openai.go b/backend/internal/analyzer/openai/openai.go index 0419c57..d75b179 100644 --- a/backend/internal/analyzer/openai/openai.go +++ b/backend/internal/analyzer/openai/openai.go @@ -9,8 +9,8 @@ import ( "strings" "time" - "github.com/ansg191/ibd-trader-backend/internal/analyzer" - "github.com/ansg191/ibd-trader-backend/internal/utils" + "github.com/ansg191/ibd-trader/backend/internal/analyzer" + "github.com/ansg191/ibd-trader/backend/internal/utils" "github.com/Rhymond/go-money" "github.com/sashabaranov/go-openai" diff --git a/backend/internal/auth/auth.go b/backend/internal/auth/auth.go index edad914..7467574 100644 --- a/backend/internal/auth/auth.go +++ b/backend/internal/auth/auth.go @@ -4,7 +4,7 @@ import ( "context" "errors" - "github.com/ansg191/ibd-trader-backend/internal/config" + "github.com/ansg191/ibd-trader/backend/internal/config" "github.com/coreos/go-oidc/v3/oidc" "golang.org/x/oauth2" diff --git a/backend/internal/config/config.go b/backend/internal/config/config.go index c37588b..f99eb9b 100644 --- a/backend/internal/config/config.go +++ b/backend/internal/config/config.go @@ -1,8 +1,8 @@ package config import ( - "github.com/ansg191/ibd-trader-backend/internal/keys" - "github.com/ansg191/ibd-trader-backend/internal/leader/manager/ibd" + "github.com/ansg191/ibd-trader/backend/internal/keys" + "github.com/ansg191/ibd-trader/backend/internal/leader/manager/ibd" "github.com/spf13/viper" ) diff --git a/backend/internal/database/cookies.go b/backend/internal/database/cookies.go index 3ea21d0..380595e 100644 --- a/backend/internal/database/cookies.go +++ b/backend/internal/database/cookies.go @@ -8,7 +8,7 @@ import ( "net/http" "time" - "github.com/ansg191/ibd-trader-backend/internal/keys" + "github.com/ansg191/ibd-trader/backend/internal/keys" ) func GetAnyCookie(ctx context.Context, exec Executor, kms keys.KeyManagementService) (*IBDCookie, error) { diff --git a/backend/internal/database/database.go b/backend/internal/database/database.go index 409dd3c..6b59500 100644 --- a/backend/internal/database/database.go +++ b/backend/internal/database/database.go @@ -10,8 +10,8 @@ import ( "sync" "time" - "github.com/ansg191/ibd-trader-backend/db" - "github.com/ansg191/ibd-trader-backend/internal/keys" + "github.com/ansg191/ibd-trader/backend/db" + "github.com/ansg191/ibd-trader/backend/internal/keys" "github.com/golang-migrate/migrate/v4" _ "github.com/golang-migrate/migrate/v4/database/postgres" diff --git a/backend/internal/database/stocks.go b/backend/internal/database/stocks.go index 24f5fe7..4656a82 100644 --- a/backend/internal/database/stocks.go +++ b/backend/internal/database/stocks.go @@ -6,9 +6,9 @@ import ( "database/sql/driver" "errors" - pb "github.com/ansg191/ibd-trader-backend/api/gen/idb/stock/v1" - "github.com/ansg191/ibd-trader-backend/internal/analyzer" - "github.com/ansg191/ibd-trader-backend/internal/utils" + pb "github.com/ansg191/ibd-trader/backend/api/idb/stock/v1" + "github.com/ansg191/ibd-trader/backend/internal/analyzer" + "github.com/ansg191/ibd-trader/backend/internal/utils" "github.com/Rhymond/go-money" ) diff --git a/backend/internal/database/users.go b/backend/internal/database/users.go index f7998fb..6bd2071 100644 --- a/backend/internal/database/users.go +++ b/backend/internal/database/users.go @@ -6,7 +6,7 @@ import ( "errors" "fmt" - "github.com/ansg191/ibd-trader-backend/internal/keys" + "github.com/ansg191/ibd-trader/backend/internal/keys" ) var ErrUserNotFound = fmt.Errorf("user not found") diff --git a/backend/internal/ibd/auth.go b/backend/internal/ibd/auth.go index 7b82057..d8bfdf6 100644 --- a/backend/internal/ibd/auth.go +++ b/backend/internal/ibd/auth.go @@ -11,7 +11,7 @@ import ( "net/http" "strings" - "github.com/ansg191/ibd-trader-backend/internal/ibd/transport" + "github.com/ansg191/ibd-trader/backend/internal/ibd/transport" "golang.org/x/net/html" ) diff --git a/backend/internal/ibd/auth_test.go b/backend/internal/ibd/auth_test.go index 157b507..210d1f4 100644 --- a/backend/internal/ibd/auth_test.go +++ b/backend/internal/ibd/auth_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/ansg191/ibd-trader-backend/internal/ibd/transport" + "github.com/ansg191/ibd-trader/backend/internal/ibd/transport" "github.com/jarcoal/httpmock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/internal/ibd/client.go b/backend/internal/ibd/client.go index c8575e3..b6506d6 100644 --- a/backend/internal/ibd/client.go +++ b/backend/internal/ibd/client.go @@ -7,9 +7,9 @@ import ( "net/http" "slices" - "github.com/ansg191/ibd-trader-backend/internal/database" - "github.com/ansg191/ibd-trader-backend/internal/ibd/transport" - "github.com/ansg191/ibd-trader-backend/internal/keys" + "github.com/ansg191/ibd-trader/backend/internal/database" + "github.com/ansg191/ibd-trader/backend/internal/ibd/transport" + "github.com/ansg191/ibd-trader/backend/internal/keys" ) var ErrNoAvailableCookies = errors.New("no available cookies") diff --git a/backend/internal/ibd/client_test.go b/backend/internal/ibd/client_test.go index 2368a31..2fe2e71 100644 --- a/backend/internal/ibd/client_test.go +++ b/backend/internal/ibd/client_test.go @@ -9,8 +9,8 @@ import ( "testing" "time" - "github.com/ansg191/ibd-trader-backend/internal/database" - "github.com/ansg191/ibd-trader-backend/internal/keys" + "github.com/ansg191/ibd-trader/backend/internal/database" + "github.com/ansg191/ibd-trader/backend/internal/keys" _ "github.com/lib/pq" "github.com/ory/dockertest/v3" "github.com/ory/dockertest/v3/docker" diff --git a/backend/internal/ibd/ibd50.go b/backend/internal/ibd/ibd50.go index 52e28aa..c7f099a 100644 --- a/backend/internal/ibd/ibd50.go +++ b/backend/internal/ibd/ibd50.go @@ -10,7 +10,7 @@ import ( "net/url" "strconv" - "github.com/ansg191/ibd-trader-backend/internal/database" + "github.com/ansg191/ibd-trader/backend/internal/database" ) const ibd50Url = "https://research.investors.com/Services/SiteAjaxService.asmx/GetIBD50?sortcolumn1=%22ibd100rank%22&sortOrder1=%22asc%22&sortcolumn2=%22%22&sortOrder2=%22ASC%22" diff --git a/backend/internal/ibd/options.go b/backend/internal/ibd/options.go index 5c378d5..2b54707 100644 --- a/backend/internal/ibd/options.go +++ b/backend/internal/ibd/options.go @@ -1,6 +1,6 @@ package ibd -import "github.com/ansg191/ibd-trader-backend/internal/ibd/transport" +import "github.com/ansg191/ibd-trader/backend/internal/ibd/transport" type optionFunc func(*options) diff --git a/backend/internal/ibd/search.go b/backend/internal/ibd/search.go index 341b14b..5eaf153 100644 --- a/backend/internal/ibd/search.go +++ b/backend/internal/ibd/search.go @@ -9,7 +9,7 @@ import ( "net/url" "time" - "github.com/ansg191/ibd-trader-backend/internal/database" + "github.com/ansg191/ibd-trader/backend/internal/database" ) const ( diff --git a/backend/internal/ibd/search_test.go b/backend/internal/ibd/search_test.go index 05e93dc..a45699f 100644 --- a/backend/internal/ibd/search_test.go +++ b/backend/internal/ibd/search_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - "github.com/ansg191/ibd-trader-backend/internal/ibd/transport" + "github.com/ansg191/ibd-trader/backend/internal/ibd/transport" "github.com/jarcoal/httpmock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/internal/ibd/stockinfo.go b/backend/internal/ibd/stockinfo.go index 1e3b96f..3cd199a 100644 --- a/backend/internal/ibd/stockinfo.go +++ b/backend/internal/ibd/stockinfo.go @@ -9,8 +9,8 @@ import ( "strconv" "strings" - "github.com/ansg191/ibd-trader-backend/internal/database" - "github.com/ansg191/ibd-trader-backend/internal/utils" + "github.com/ansg191/ibd-trader/backend/internal/database" + "github.com/ansg191/ibd-trader/backend/internal/utils" "github.com/Rhymond/go-money" "golang.org/x/net/html" diff --git a/backend/internal/ibd/transport/scrapfly/scrapfly.go b/backend/internal/ibd/transport/scrapfly/scrapfly.go index 3b414de..892b931 100644 --- a/backend/internal/ibd/transport/scrapfly/scrapfly.go +++ b/backend/internal/ibd/transport/scrapfly/scrapfly.go @@ -8,7 +8,7 @@ import ( "net/url" "strconv" - "github.com/ansg191/ibd-trader-backend/internal/ibd/transport" + "github.com/ansg191/ibd-trader/backend/internal/ibd/transport" ) type ScrapflyTransport struct { diff --git a/backend/internal/keys/keys_test.go b/backend/internal/keys/keys_test.go index 34aa493..e838ec0 100644 --- a/backend/internal/keys/keys_test.go +++ b/backend/internal/keys/keys_test.go @@ -6,7 +6,7 @@ import ( "encoding/hex" "testing" - "github.com/ansg191/ibd-trader-backend/internal/keys" + "github.com/ansg191/ibd-trader/backend/internal/keys" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/internal/keys/mock_keys_test.go b/backend/internal/keys/mock_keys_test.go index 19316e0..dbdb7f2 100644 --- a/backend/internal/keys/mock_keys_test.go +++ b/backend/internal/keys/mock_keys_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/ansg191/ibd-trader-backend/internal/keys (interfaces: KeyManagementService) +// Source: github.com/ansg191/ibd-trader/backend/internal/keys (interfaces: KeyManagementService) // // Generated by this command: // diff --git a/backend/internal/leader/manager/ibd/auth/auth.go b/backend/internal/leader/manager/ibd/auth/auth.go index 9b5502d..2bcf060 100644 --- a/backend/internal/leader/manager/ibd/auth/auth.go +++ b/backend/internal/leader/manager/ibd/auth/auth.go @@ -5,8 +5,8 @@ import ( "log/slog" "time" - "github.com/ansg191/ibd-trader-backend/internal/database" - "github.com/ansg191/ibd-trader-backend/internal/redis/taskqueue" + "github.com/ansg191/ibd-trader/backend/internal/database" + "github.com/ansg191/ibd-trader/backend/internal/redis/taskqueue" "github.com/redis/go-redis/v9" "github.com/robfig/cron/v3" diff --git a/backend/internal/leader/manager/ibd/scrape/scrape.go b/backend/internal/leader/manager/ibd/scrape/scrape.go index 870ce5e..e1b5813 100644 --- a/backend/internal/leader/manager/ibd/scrape/scrape.go +++ b/backend/internal/leader/manager/ibd/scrape/scrape.go @@ -6,9 +6,9 @@ import ( "log/slog" "time" - "github.com/ansg191/ibd-trader-backend/internal/database" - "github.com/ansg191/ibd-trader-backend/internal/ibd" - "github.com/ansg191/ibd-trader-backend/internal/redis/taskqueue" + "github.com/ansg191/ibd-trader/backend/internal/database" + "github.com/ansg191/ibd-trader/backend/internal/ibd" + "github.com/ansg191/ibd-trader/backend/internal/redis/taskqueue" "github.com/redis/go-redis/v9" "github.com/robfig/cron/v3" diff --git a/backend/internal/leader/manager/manager.go b/backend/internal/leader/manager/manager.go index 61e27e0..0ba6732 100644 --- a/backend/internal/leader/manager/manager.go +++ b/backend/internal/leader/manager/manager.go @@ -6,11 +6,11 @@ import ( "log/slog" "sync" - "github.com/ansg191/ibd-trader-backend/internal/config" - "github.com/ansg191/ibd-trader-backend/internal/database" - "github.com/ansg191/ibd-trader-backend/internal/ibd" - "github.com/ansg191/ibd-trader-backend/internal/leader/manager/ibd/auth" - ibd2 "github.com/ansg191/ibd-trader-backend/internal/leader/manager/ibd/scrape" + "github.com/ansg191/ibd-trader/backend/internal/config" + "github.com/ansg191/ibd-trader/backend/internal/database" + "github.com/ansg191/ibd-trader/backend/internal/ibd" + "github.com/ansg191/ibd-trader/backend/internal/leader/manager/ibd/auth" + ibd2 "github.com/ansg191/ibd-trader/backend/internal/leader/manager/ibd/scrape" "github.com/redis/go-redis/v9" "github.com/robfig/cron/v3" diff --git a/backend/internal/server/idb/stock/v1/stock.go b/backend/internal/server/idb/stock/v1/stock.go index 8afc2b1..b87a921 100644 --- a/backend/internal/server/idb/stock/v1/stock.go +++ b/backend/internal/server/idb/stock/v1/stock.go @@ -5,10 +5,10 @@ import ( "fmt" "log/slog" - pb "github.com/ansg191/ibd-trader-backend/api/gen/idb/stock/v1" - "github.com/ansg191/ibd-trader-backend/internal/database" - "github.com/ansg191/ibd-trader-backend/internal/leader/manager/ibd/scrape" - "github.com/ansg191/ibd-trader-backend/internal/redis/taskqueue" + pb "github.com/ansg191/ibd-trader/backend/api/idb/stock/v1" + "github.com/ansg191/ibd-trader/backend/internal/database" + "github.com/ansg191/ibd-trader/backend/internal/leader/manager/ibd/scrape" + "github.com/ansg191/ibd-trader/backend/internal/redis/taskqueue" "cloud.google.com/go/longrunning/autogen/longrunningpb" "google.golang.org/grpc/codes" diff --git a/backend/internal/server/idb/user/v1/user.go b/backend/internal/server/idb/user/v1/user.go index 2f32e03..b942d7a 100644 --- a/backend/internal/server/idb/user/v1/user.go +++ b/backend/internal/server/idb/user/v1/user.go @@ -4,10 +4,10 @@ import ( "context" "errors" - pb "github.com/ansg191/ibd-trader-backend/api/gen/idb/user/v1" - "github.com/ansg191/ibd-trader-backend/internal/database" - "github.com/ansg191/ibd-trader-backend/internal/ibd" - "github.com/ansg191/ibd-trader-backend/internal/keys" + pb "github.com/ansg191/ibd-trader/backend/api/idb/user/v1" + "github.com/ansg191/ibd-trader/backend/internal/database" + "github.com/ansg191/ibd-trader/backend/internal/ibd" + "github.com/ansg191/ibd-trader/backend/internal/keys" "github.com/mennanov/fmutils" "google.golang.org/grpc/codes" diff --git a/backend/internal/server/operations.go b/backend/internal/server/operations.go index 2487427..6c493e1 100644 --- a/backend/internal/server/operations.go +++ b/backend/internal/server/operations.go @@ -8,10 +8,10 @@ import ( "strings" "cloud.google.com/go/longrunning/autogen/longrunningpb" - spb "github.com/ansg191/ibd-trader-backend/api/gen/idb/stock/v1" - "github.com/ansg191/ibd-trader-backend/internal/leader/manager/ibd/scrape" - "github.com/ansg191/ibd-trader-backend/internal/redis/taskqueue" - "github.com/ansg191/ibd-trader-backend/internal/server/idb/stock/v1" + spb "github.com/ansg191/ibd-trader/backend/api/idb/stock/v1" + "github.com/ansg191/ibd-trader/backend/internal/leader/manager/ibd/scrape" + "github.com/ansg191/ibd-trader/backend/internal/redis/taskqueue" + "github.com/ansg191/ibd-trader/backend/internal/server/idb/stock/v1" epb "google.golang.org/genproto/googleapis/rpc/errdetails" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/backend/internal/server/server.go b/backend/internal/server/server.go index c525cfd..9ecad3c 100644 --- a/backend/internal/server/server.go +++ b/backend/internal/server/server.go @@ -7,21 +7,21 @@ import ( "net" "cloud.google.com/go/longrunning/autogen/longrunningpb" - spb "github.com/ansg191/ibd-trader-backend/api/gen/idb/stock/v1" - upb "github.com/ansg191/ibd-trader-backend/api/gen/idb/user/v1" - "github.com/ansg191/ibd-trader-backend/internal/database" - "github.com/ansg191/ibd-trader-backend/internal/ibd" - "github.com/ansg191/ibd-trader-backend/internal/keys" - "github.com/ansg191/ibd-trader-backend/internal/leader/manager/ibd/scrape" - "github.com/ansg191/ibd-trader-backend/internal/redis/taskqueue" - "github.com/ansg191/ibd-trader-backend/internal/server/idb/stock/v1" - "github.com/ansg191/ibd-trader-backend/internal/server/idb/user/v1" + spb "github.com/ansg191/ibd-trader/backend/api/idb/stock/v1" + upb "github.com/ansg191/ibd-trader/backend/api/idb/user/v1" + "github.com/ansg191/ibd-trader/backend/internal/database" + "github.com/ansg191/ibd-trader/backend/internal/ibd" + "github.com/ansg191/ibd-trader/backend/internal/keys" + "github.com/ansg191/ibd-trader/backend/internal/leader/manager/ibd/scrape" + "github.com/ansg191/ibd-trader/backend/internal/redis/taskqueue" + "github.com/ansg191/ibd-trader/backend/internal/server/idb/stock/v1" + "github.com/ansg191/ibd-trader/backend/internal/server/idb/user/v1" "github.com/redis/go-redis/v9" "google.golang.org/grpc" "google.golang.org/grpc/reflection" ) -//go:generate make -C ../../api/ generate +//go:generate make -C ../../../api/ generate-go type Server struct { s *grpc.Server diff --git a/backend/internal/worker/analyzer/analyzer.go b/backend/internal/worker/analyzer/analyzer.go index 20621dd..b5d49d8 100644 --- a/backend/internal/worker/analyzer/analyzer.go +++ b/backend/internal/worker/analyzer/analyzer.go @@ -5,9 +5,9 @@ import ( "log/slog" "time" - "github.com/ansg191/ibd-trader-backend/internal/analyzer" - "github.com/ansg191/ibd-trader-backend/internal/database" - "github.com/ansg191/ibd-trader-backend/internal/redis/taskqueue" + "github.com/ansg191/ibd-trader/backend/internal/analyzer" + "github.com/ansg191/ibd-trader/backend/internal/database" + "github.com/ansg191/ibd-trader/backend/internal/redis/taskqueue" "github.com/redis/go-redis/v9" ) diff --git a/backend/internal/worker/auth/auth.go b/backend/internal/worker/auth/auth.go index 0daa112..721bf6f 100644 --- a/backend/internal/worker/auth/auth.go +++ b/backend/internal/worker/auth/auth.go @@ -8,11 +8,11 @@ import ( "log/slog" "time" - "github.com/ansg191/ibd-trader-backend/internal/database" - "github.com/ansg191/ibd-trader-backend/internal/ibd" - "github.com/ansg191/ibd-trader-backend/internal/keys" - "github.com/ansg191/ibd-trader-backend/internal/leader/manager/ibd/auth" - "github.com/ansg191/ibd-trader-backend/internal/redis/taskqueue" + "github.com/ansg191/ibd-trader/backend/internal/database" + "github.com/ansg191/ibd-trader/backend/internal/ibd" + "github.com/ansg191/ibd-trader/backend/internal/keys" + "github.com/ansg191/ibd-trader/backend/internal/leader/manager/ibd/auth" + "github.com/ansg191/ibd-trader/backend/internal/redis/taskqueue" "github.com/redis/go-redis/v9" ) diff --git a/backend/internal/worker/scraper/scraper.go b/backend/internal/worker/scraper/scraper.go index c5c1b6c..4a19dd2 100644 --- a/backend/internal/worker/scraper/scraper.go +++ b/backend/internal/worker/scraper/scraper.go @@ -7,11 +7,11 @@ import ( "log/slog" "time" - "github.com/ansg191/ibd-trader-backend/internal/database" - "github.com/ansg191/ibd-trader-backend/internal/ibd" - "github.com/ansg191/ibd-trader-backend/internal/leader/manager/ibd/scrape" - "github.com/ansg191/ibd-trader-backend/internal/redis/taskqueue" - "github.com/ansg191/ibd-trader-backend/internal/worker/analyzer" + "github.com/ansg191/ibd-trader/backend/internal/database" + "github.com/ansg191/ibd-trader/backend/internal/ibd" + "github.com/ansg191/ibd-trader/backend/internal/leader/manager/ibd/scrape" + "github.com/ansg191/ibd-trader/backend/internal/redis/taskqueue" + "github.com/ansg191/ibd-trader/backend/internal/worker/analyzer" "github.com/redis/go-redis/v9" ) diff --git a/backend/internal/worker/worker.go b/backend/internal/worker/worker.go index 6017fb7..ca4a53f 100644 --- a/backend/internal/worker/worker.go +++ b/backend/internal/worker/worker.go @@ -9,14 +9,14 @@ import ( "os" "time" - "github.com/ansg191/ibd-trader-backend/internal/analyzer" - "github.com/ansg191/ibd-trader-backend/internal/database" - "github.com/ansg191/ibd-trader-backend/internal/ibd" - "github.com/ansg191/ibd-trader-backend/internal/keys" - "github.com/ansg191/ibd-trader-backend/internal/leader/manager" - analyzer2 "github.com/ansg191/ibd-trader-backend/internal/worker/analyzer" - "github.com/ansg191/ibd-trader-backend/internal/worker/auth" - "github.com/ansg191/ibd-trader-backend/internal/worker/scraper" + "github.com/ansg191/ibd-trader/backend/internal/analyzer" + "github.com/ansg191/ibd-trader/backend/internal/database" + "github.com/ansg191/ibd-trader/backend/internal/ibd" + "github.com/ansg191/ibd-trader/backend/internal/keys" + "github.com/ansg191/ibd-trader/backend/internal/leader/manager" + analyzer2 "github.com/ansg191/ibd-trader/backend/internal/worker/analyzer" + "github.com/ansg191/ibd-trader/backend/internal/worker/auth" + "github.com/ansg191/ibd-trader/backend/internal/worker/scraper" "github.com/redis/go-redis/v9" "golang.org/x/sync/errgroup" |