diff --git a/stalker.pb.go b/stalker.pb.go index 246cf87..ff541a8 100644 --- a/stalker.pb.go +++ b/stalker.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.34.0 +// protoc (unknown) // source: stalker.proto package stalker @@ -2358,6 +2358,164 @@ func (x *GetSteamStatsRequest) GetGlobalUserId() int64 { return 0 } +// USDebtSnapshot represents the latest available US National Debt data point. +// Values are the last Treasury value plus deltas by record_date, not a live quote. +type USDebtSnapshot struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Date the Treasury value refers to (record_date) + RecordDate *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=record_date,json=recordDate,proto3" json:"record_date,omitempty"` + TotalDebtUsd int64 `protobuf:"varint,2,opt,name=total_debt_usd,json=totalDebtUsd,proto3" json:"total_debt_usd,omitempty"` // tot_pub_debt_out_amt + DebtHeldPublicUsd int64 `protobuf:"varint,3,opt,name=debt_held_public_usd,json=debtHeldPublicUsd,proto3" json:"debt_held_public_usd,omitempty"` // debt_held_public_amt + IntragovernmentalUsd int64 `protobuf:"varint,4,opt,name=intragovernmental_usd,json=intragovernmentalUsd,proto3" json:"intragovernmental_usd,omitempty"` // intragov_hold_amt + Change_1DUsd int64 `protobuf:"varint,5,opt,name=change_1d_usd,json=change1dUsd,proto3" json:"change_1d_usd,omitempty"` // delta vs ~1 day earlier by record_date + Change_7DUsd int64 `protobuf:"varint,6,opt,name=change_7d_usd,json=change7dUsd,proto3" json:"change_7d_usd,omitempty"` // delta vs ~7 days earlier by record_date + Change_1YUsd int64 `protobuf:"varint,7,opt,name=change_1y_usd,json=change1yUsd,proto3" json:"change_1y_usd,omitempty"` // delta vs ~1 year earlier by record_date + // Time the value was fetched from the Treasury API + FetchedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=fetched_at,json=fetchedAt,proto3" json:"fetched_at,omitempty"` + // True when the last poll failed or the stored value is older than expected + Stale bool `protobuf:"varint,9,opt,name=stale,proto3" json:"stale,omitempty"` + // Time of the last successful poll (zero if unknown) + LastSuccessAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=last_success_at,json=lastSuccessAt,proto3" json:"last_success_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *USDebtSnapshot) Reset() { + *x = USDebtSnapshot{} + mi := &file_stalker_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *USDebtSnapshot) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*USDebtSnapshot) ProtoMessage() {} + +func (x *USDebtSnapshot) ProtoReflect() protoreflect.Message { + mi := &file_stalker_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use USDebtSnapshot.ProtoReflect.Descriptor instead. +func (*USDebtSnapshot) Descriptor() ([]byte, []int) { + return file_stalker_proto_rawDescGZIP(), []int{34} +} + +func (x *USDebtSnapshot) GetRecordDate() *timestamppb.Timestamp { + if x != nil { + return x.RecordDate + } + return nil +} + +func (x *USDebtSnapshot) GetTotalDebtUsd() int64 { + if x != nil { + return x.TotalDebtUsd + } + return 0 +} + +func (x *USDebtSnapshot) GetDebtHeldPublicUsd() int64 { + if x != nil { + return x.DebtHeldPublicUsd + } + return 0 +} + +func (x *USDebtSnapshot) GetIntragovernmentalUsd() int64 { + if x != nil { + return x.IntragovernmentalUsd + } + return 0 +} + +func (x *USDebtSnapshot) GetChange_1DUsd() int64 { + if x != nil { + return x.Change_1DUsd + } + return 0 +} + +func (x *USDebtSnapshot) GetChange_7DUsd() int64 { + if x != nil { + return x.Change_7DUsd + } + return 0 +} + +func (x *USDebtSnapshot) GetChange_1YUsd() int64 { + if x != nil { + return x.Change_1YUsd + } + return 0 +} + +func (x *USDebtSnapshot) GetFetchedAt() *timestamppb.Timestamp { + if x != nil { + return x.FetchedAt + } + return nil +} + +func (x *USDebtSnapshot) GetStale() bool { + if x != nil { + return x.Stale + } + return false +} + +func (x *USDebtSnapshot) GetLastSuccessAt() *timestamppb.Timestamp { + if x != nil { + return x.LastSuccessAt + } + return nil +} + +type GetUSDebtRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetUSDebtRequest) Reset() { + *x = GetUSDebtRequest{} + mi := &file_stalker_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetUSDebtRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUSDebtRequest) ProtoMessage() {} + +func (x *GetUSDebtRequest) ProtoReflect() protoreflect.Message { + mi := &file_stalker_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUSDebtRequest.ProtoReflect.Descriptor instead. +func (*GetUSDebtRequest) Descriptor() ([]byte, []int) { + return file_stalker_proto_rawDescGZIP(), []int{35} +} + var File_stalker_proto protoreflect.FileDescriptor const file_stalker_proto_rawDesc = "" + @@ -2574,7 +2732,22 @@ const file_stalker_proto_rawDesc = "" + "\x1cGetSteamGameSessionsResponse\x125\n" + "\bsessions\x18\x01 \x03(\v2\x19.stalker.SteamGameSessionR\bsessions\"<\n" + "\x14GetSteamStatsRequest\x12$\n" + - "\x0eglobal_user_id\x18\x01 \x01(\x03R\fglobalUserId2\xb4\n" + + "\x0eglobal_user_id\x18\x01 \x01(\x03R\fglobalUserId\"\xda\x03\n" + + "\x0eUSDebtSnapshot\x12;\n" + + "\vrecord_date\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "recordDate\x12$\n" + + "\x0etotal_debt_usd\x18\x02 \x01(\x03R\ftotalDebtUsd\x12/\n" + + "\x14debt_held_public_usd\x18\x03 \x01(\x03R\x11debtHeldPublicUsd\x123\n" + + "\x15intragovernmental_usd\x18\x04 \x01(\x03R\x14intragovernmentalUsd\x12\"\n" + + "\rchange_1d_usd\x18\x05 \x01(\x03R\vchange1dUsd\x12\"\n" + + "\rchange_7d_usd\x18\x06 \x01(\x03R\vchange7dUsd\x12\"\n" + + "\rchange_1y_usd\x18\a \x01(\x03R\vchange1yUsd\x129\n" + + "\n" + + "fetched_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\tfetchedAt\x12\x14\n" + + "\x05stale\x18\t \x01(\bR\x05stale\x12B\n" + + "\x0flast_success_at\x18\n" + + " \x01(\v2\x1a.google.protobuf.TimestampR\rlastSuccessAt\"\x12\n" + + "\x10GetUSDebtRequest2\xf5\n" + "\n" + "\x0eStalkerService\x12=\n" + "\fSearchPlayer\x12\x1c.stalker.SearchPlayerRequest\x1a\x0f.stalker.Player\x12?\n" + @@ -2592,7 +2765,8 @@ const file_stalker_proto_rawDesc = "" + "\x16GetLinkedSteamAccounts\x12&.stalker.GetLinkedSteamAccountsRequest\x1a'.stalker.GetLinkedSteamAccountsResponse\x12W\n" + "\x10GetSteamSessions\x12 .stalker.GetSteamSessionsRequest\x1a!.stalker.GetSteamSessionsResponse\x12c\n" + "\x14GetSteamGameSessions\x12$.stalker.GetSteamGameSessionsRequest\x1a%.stalker.GetSteamGameSessionsResponse\x12C\n" + - "\rGetSteamStats\x12\x1d.stalker.GetSteamStatsRequest\x1a\x13.stalker.SteamStatsB\x1fZ\x1dstalker-service/proto/stalkerb\x06proto3" + "\rGetSteamStats\x12\x1d.stalker.GetSteamStatsRequest\x1a\x13.stalker.SteamStats\x12?\n" + + "\tGetUSDebt\x12\x19.stalker.GetUSDebtRequest\x1a\x17.stalker.USDebtSnapshotB\x1fZ\x1dstalker-service/proto/stalkerb\x06proto3" var ( file_stalker_proto_rawDescOnce sync.Once @@ -2606,7 +2780,7 @@ func file_stalker_proto_rawDescGZIP() []byte { return file_stalker_proto_rawDescData } -var file_stalker_proto_msgTypes = make([]protoimpl.MessageInfo, 37) +var file_stalker_proto_msgTypes = make([]protoimpl.MessageInfo, 39) var file_stalker_proto_goTypes = []any{ (*Player)(nil), // 0: stalker.Player (*MatchStats)(nil), // 1: stalker.MatchStats @@ -2642,81 +2816,88 @@ var file_stalker_proto_goTypes = []any{ (*GetSteamGameSessionsRequest)(nil), // 31: stalker.GetSteamGameSessionsRequest (*GetSteamGameSessionsResponse)(nil), // 32: stalker.GetSteamGameSessionsResponse (*GetSteamStatsRequest)(nil), // 33: stalker.GetSteamStatsRequest - nil, // 34: stalker.MatchResult.TeamsEntry - nil, // 35: stalker.MatchResults.ScoreEntry - nil, // 36: stalker.MatchDetails.TeamsEntry - (*timestamppb.Timestamp)(nil), // 37: google.protobuf.Timestamp - (*emptypb.Empty)(nil), // 38: google.protobuf.Empty + (*USDebtSnapshot)(nil), // 34: stalker.USDebtSnapshot + (*GetUSDebtRequest)(nil), // 35: stalker.GetUSDebtRequest + nil, // 36: stalker.MatchResult.TeamsEntry + nil, // 37: stalker.MatchResults.ScoreEntry + nil, // 38: stalker.MatchDetails.TeamsEntry + (*timestamppb.Timestamp)(nil), // 39: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 40: google.protobuf.Empty } var file_stalker_proto_depIdxs = []int32{ 1, // 0: stalker.TeamPlayer.stats:type_name -> stalker.MatchStats 2, // 1: stalker.Team.players:type_name -> stalker.TeamPlayer - 34, // 2: stalker.MatchResult.teams:type_name -> stalker.MatchResult.TeamsEntry + 36, // 2: stalker.MatchResult.teams:type_name -> stalker.MatchResult.TeamsEntry 5, // 3: stalker.MatchResult.results:type_name -> stalker.MatchResults 1, // 4: stalker.MatchResult.player_stats:type_name -> stalker.MatchStats - 35, // 5: stalker.MatchResults.score:type_name -> stalker.MatchResults.ScoreEntry - 36, // 6: stalker.MatchDetails.teams:type_name -> stalker.MatchDetails.TeamsEntry + 37, // 5: stalker.MatchResults.score:type_name -> stalker.MatchResults.ScoreEntry + 38, // 6: stalker.MatchDetails.teams:type_name -> stalker.MatchDetails.TeamsEntry 5, // 7: stalker.MatchDetails.results:type_name -> stalker.MatchResults - 37, // 8: stalker.FaceITMatch.match_start_time:type_name -> google.protobuf.Timestamp - 37, // 9: stalker.FaceITMatch.match_end_time:type_name -> google.protobuf.Timestamp - 37, // 10: stalker.FaceITMatch.synced_at:type_name -> google.protobuf.Timestamp - 37, // 11: stalker.FaceITMatch.updated_at:type_name -> google.protobuf.Timestamp - 37, // 12: stalker.LinkedAccount.linked_at:type_name -> google.protobuf.Timestamp - 37, // 13: stalker.LinkedAccount.updated_at:type_name -> google.protobuf.Timestamp + 39, // 8: stalker.FaceITMatch.match_start_time:type_name -> google.protobuf.Timestamp + 39, // 9: stalker.FaceITMatch.match_end_time:type_name -> google.protobuf.Timestamp + 39, // 10: stalker.FaceITMatch.synced_at:type_name -> google.protobuf.Timestamp + 39, // 11: stalker.FaceITMatch.updated_at:type_name -> google.protobuf.Timestamp + 39, // 12: stalker.LinkedAccount.linked_at:type_name -> google.protobuf.Timestamp + 39, // 13: stalker.LinkedAccount.updated_at:type_name -> google.protobuf.Timestamp 4, // 14: stalker.GetPlayerMatchesResponse.matches:type_name -> stalker.MatchResult 7, // 15: stalker.SaveMatchesRequest.matches:type_name -> stalker.FaceITMatch 7, // 16: stalker.GetUserMatchesResponse.matches:type_name -> stalker.FaceITMatch - 37, // 17: stalker.GetMatchesSinceRequest.since:type_name -> google.protobuf.Timestamp + 39, // 17: stalker.GetMatchesSinceRequest.since:type_name -> google.protobuf.Timestamp 8, // 18: stalker.GetLinkedSteamAccountsResponse.accounts:type_name -> stalker.LinkedAccount - 37, // 19: stalker.SteamOnlineSession.started_at:type_name -> google.protobuf.Timestamp - 37, // 20: stalker.SteamOnlineSession.ended_at:type_name -> google.protobuf.Timestamp - 37, // 21: stalker.SteamGameSession.started_at:type_name -> google.protobuf.Timestamp - 37, // 22: stalker.SteamGameSession.ended_at:type_name -> google.protobuf.Timestamp - 37, // 23: stalker.GetSteamSessionsRequest.from:type_name -> google.protobuf.Timestamp - 37, // 24: stalker.GetSteamSessionsRequest.to:type_name -> google.protobuf.Timestamp + 39, // 19: stalker.SteamOnlineSession.started_at:type_name -> google.protobuf.Timestamp + 39, // 20: stalker.SteamOnlineSession.ended_at:type_name -> google.protobuf.Timestamp + 39, // 21: stalker.SteamGameSession.started_at:type_name -> google.protobuf.Timestamp + 39, // 22: stalker.SteamGameSession.ended_at:type_name -> google.protobuf.Timestamp + 39, // 23: stalker.GetSteamSessionsRequest.from:type_name -> google.protobuf.Timestamp + 39, // 24: stalker.GetSteamSessionsRequest.to:type_name -> google.protobuf.Timestamp 26, // 25: stalker.GetSteamSessionsResponse.sessions:type_name -> stalker.SteamOnlineSession - 37, // 26: stalker.GetSteamGameSessionsRequest.from:type_name -> google.protobuf.Timestamp - 37, // 27: stalker.GetSteamGameSessionsRequest.to:type_name -> google.protobuf.Timestamp + 39, // 26: stalker.GetSteamGameSessionsRequest.from:type_name -> google.protobuf.Timestamp + 39, // 27: stalker.GetSteamGameSessionsRequest.to:type_name -> google.protobuf.Timestamp 27, // 28: stalker.GetSteamGameSessionsResponse.sessions:type_name -> stalker.SteamGameSession - 3, // 29: stalker.MatchResult.TeamsEntry.value:type_name -> stalker.Team - 3, // 30: stalker.MatchDetails.TeamsEntry.value:type_name -> stalker.Team - 10, // 31: stalker.StalkerService.SearchPlayer:input_type -> stalker.SearchPlayerRequest - 11, // 32: stalker.StalkerService.GetPlayerByID:input_type -> stalker.GetPlayerByIDRequest - 12, // 33: stalker.StalkerService.GetPlayerMatches:input_type -> stalker.GetPlayerMatchesRequest - 14, // 34: stalker.StalkerService.GetMatchDetails:input_type -> stalker.GetMatchDetailsRequest - 15, // 35: stalker.StalkerService.SaveMatches:input_type -> stalker.SaveMatchesRequest - 16, // 36: stalker.StalkerService.GetUserMatches:input_type -> stalker.GetUserMatchesRequest - 18, // 37: stalker.StalkerService.GetUserMatchStats:input_type -> stalker.GetUserMatchStatsRequest - 19, // 38: stalker.StalkerService.GetMatchesSince:input_type -> stalker.GetMatchesSinceRequest - 20, // 39: stalker.StalkerService.GetMatchesLastNDays:input_type -> stalker.GetMatchesLastNDaysRequest - 21, // 40: stalker.StalkerService.LinkFaceITAccount:input_type -> stalker.LinkFaceITAccountRequest - 22, // 41: stalker.StalkerService.GetLinkedFaceITAccount:input_type -> stalker.GetLinkedFaceITAccountRequest - 23, // 42: stalker.StalkerService.LinkSteamAccount:input_type -> stalker.LinkSteamAccountRequest - 24, // 43: stalker.StalkerService.GetLinkedSteamAccounts:input_type -> stalker.GetLinkedSteamAccountsRequest - 29, // 44: stalker.StalkerService.GetSteamSessions:input_type -> stalker.GetSteamSessionsRequest - 31, // 45: stalker.StalkerService.GetSteamGameSessions:input_type -> stalker.GetSteamGameSessionsRequest - 33, // 46: stalker.StalkerService.GetSteamStats:input_type -> stalker.GetSteamStatsRequest - 0, // 47: stalker.StalkerService.SearchPlayer:output_type -> stalker.Player - 0, // 48: stalker.StalkerService.GetPlayerByID:output_type -> stalker.Player - 13, // 49: stalker.StalkerService.GetPlayerMatches:output_type -> stalker.GetPlayerMatchesResponse - 6, // 50: stalker.StalkerService.GetMatchDetails:output_type -> stalker.MatchDetails - 38, // 51: stalker.StalkerService.SaveMatches:output_type -> google.protobuf.Empty - 17, // 52: stalker.StalkerService.GetUserMatches:output_type -> stalker.GetUserMatchesResponse - 9, // 53: stalker.StalkerService.GetUserMatchStats:output_type -> stalker.UserMatchStats - 17, // 54: stalker.StalkerService.GetMatchesSince:output_type -> stalker.GetUserMatchesResponse - 17, // 55: stalker.StalkerService.GetMatchesLastNDays:output_type -> stalker.GetUserMatchesResponse - 8, // 56: stalker.StalkerService.LinkFaceITAccount:output_type -> stalker.LinkedAccount - 8, // 57: stalker.StalkerService.GetLinkedFaceITAccount:output_type -> stalker.LinkedAccount - 8, // 58: stalker.StalkerService.LinkSteamAccount:output_type -> stalker.LinkedAccount - 25, // 59: stalker.StalkerService.GetLinkedSteamAccounts:output_type -> stalker.GetLinkedSteamAccountsResponse - 30, // 60: stalker.StalkerService.GetSteamSessions:output_type -> stalker.GetSteamSessionsResponse - 32, // 61: stalker.StalkerService.GetSteamGameSessions:output_type -> stalker.GetSteamGameSessionsResponse - 28, // 62: stalker.StalkerService.GetSteamStats:output_type -> stalker.SteamStats - 47, // [47:63] is the sub-list for method output_type - 31, // [31:47] is the sub-list for method input_type - 31, // [31:31] is the sub-list for extension type_name - 31, // [31:31] is the sub-list for extension extendee - 0, // [0:31] is the sub-list for field type_name + 39, // 29: stalker.USDebtSnapshot.record_date:type_name -> google.protobuf.Timestamp + 39, // 30: stalker.USDebtSnapshot.fetched_at:type_name -> google.protobuf.Timestamp + 39, // 31: stalker.USDebtSnapshot.last_success_at:type_name -> google.protobuf.Timestamp + 3, // 32: stalker.MatchResult.TeamsEntry.value:type_name -> stalker.Team + 3, // 33: stalker.MatchDetails.TeamsEntry.value:type_name -> stalker.Team + 10, // 34: stalker.StalkerService.SearchPlayer:input_type -> stalker.SearchPlayerRequest + 11, // 35: stalker.StalkerService.GetPlayerByID:input_type -> stalker.GetPlayerByIDRequest + 12, // 36: stalker.StalkerService.GetPlayerMatches:input_type -> stalker.GetPlayerMatchesRequest + 14, // 37: stalker.StalkerService.GetMatchDetails:input_type -> stalker.GetMatchDetailsRequest + 15, // 38: stalker.StalkerService.SaveMatches:input_type -> stalker.SaveMatchesRequest + 16, // 39: stalker.StalkerService.GetUserMatches:input_type -> stalker.GetUserMatchesRequest + 18, // 40: stalker.StalkerService.GetUserMatchStats:input_type -> stalker.GetUserMatchStatsRequest + 19, // 41: stalker.StalkerService.GetMatchesSince:input_type -> stalker.GetMatchesSinceRequest + 20, // 42: stalker.StalkerService.GetMatchesLastNDays:input_type -> stalker.GetMatchesLastNDaysRequest + 21, // 43: stalker.StalkerService.LinkFaceITAccount:input_type -> stalker.LinkFaceITAccountRequest + 22, // 44: stalker.StalkerService.GetLinkedFaceITAccount:input_type -> stalker.GetLinkedFaceITAccountRequest + 23, // 45: stalker.StalkerService.LinkSteamAccount:input_type -> stalker.LinkSteamAccountRequest + 24, // 46: stalker.StalkerService.GetLinkedSteamAccounts:input_type -> stalker.GetLinkedSteamAccountsRequest + 29, // 47: stalker.StalkerService.GetSteamSessions:input_type -> stalker.GetSteamSessionsRequest + 31, // 48: stalker.StalkerService.GetSteamGameSessions:input_type -> stalker.GetSteamGameSessionsRequest + 33, // 49: stalker.StalkerService.GetSteamStats:input_type -> stalker.GetSteamStatsRequest + 35, // 50: stalker.StalkerService.GetUSDebt:input_type -> stalker.GetUSDebtRequest + 0, // 51: stalker.StalkerService.SearchPlayer:output_type -> stalker.Player + 0, // 52: stalker.StalkerService.GetPlayerByID:output_type -> stalker.Player + 13, // 53: stalker.StalkerService.GetPlayerMatches:output_type -> stalker.GetPlayerMatchesResponse + 6, // 54: stalker.StalkerService.GetMatchDetails:output_type -> stalker.MatchDetails + 40, // 55: stalker.StalkerService.SaveMatches:output_type -> google.protobuf.Empty + 17, // 56: stalker.StalkerService.GetUserMatches:output_type -> stalker.GetUserMatchesResponse + 9, // 57: stalker.StalkerService.GetUserMatchStats:output_type -> stalker.UserMatchStats + 17, // 58: stalker.StalkerService.GetMatchesSince:output_type -> stalker.GetUserMatchesResponse + 17, // 59: stalker.StalkerService.GetMatchesLastNDays:output_type -> stalker.GetUserMatchesResponse + 8, // 60: stalker.StalkerService.LinkFaceITAccount:output_type -> stalker.LinkedAccount + 8, // 61: stalker.StalkerService.GetLinkedFaceITAccount:output_type -> stalker.LinkedAccount + 8, // 62: stalker.StalkerService.LinkSteamAccount:output_type -> stalker.LinkedAccount + 25, // 63: stalker.StalkerService.GetLinkedSteamAccounts:output_type -> stalker.GetLinkedSteamAccountsResponse + 30, // 64: stalker.StalkerService.GetSteamSessions:output_type -> stalker.GetSteamSessionsResponse + 32, // 65: stalker.StalkerService.GetSteamGameSessions:output_type -> stalker.GetSteamGameSessionsResponse + 28, // 66: stalker.StalkerService.GetSteamStats:output_type -> stalker.SteamStats + 34, // 67: stalker.StalkerService.GetUSDebt:output_type -> stalker.USDebtSnapshot + 51, // [51:68] is the sub-list for method output_type + 34, // [34:51] is the sub-list for method input_type + 34, // [34:34] is the sub-list for extension type_name + 34, // [34:34] is the sub-list for extension extendee + 0, // [0:34] is the sub-list for field type_name } func init() { file_stalker_proto_init() } @@ -2730,7 +2911,7 @@ func file_stalker_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_stalker_proto_rawDesc), len(file_stalker_proto_rawDesc)), NumEnums: 0, - NumMessages: 37, + NumMessages: 39, NumExtensions: 0, NumServices: 1, }, diff --git a/stalker.proto b/stalker.proto index daff0bc..4c887b2 100644 --- a/stalker.proto +++ b/stalker.proto @@ -34,6 +34,9 @@ service StalkerService { rpc GetSteamSessions(GetSteamSessionsRequest) returns (GetSteamSessionsResponse); rpc GetSteamGameSessions(GetSteamGameSessionsRequest) returns (GetSteamGameSessionsResponse); rpc GetSteamStats(GetSteamStatsRequest) returns (SteamStats); + + // US National Debt tracking + rpc GetUSDebt(GetUSDebtRequest) returns (USDebtSnapshot); } // Player represents a FaceIT player @@ -290,3 +293,24 @@ message GetSteamGameSessionsResponse { message GetSteamStatsRequest { int64 global_user_id = 1; } + +// USDebtSnapshot represents the latest available US National Debt data point. +// Values are the last Treasury value plus deltas by record_date, not a live quote. +message USDebtSnapshot { + // Date the Treasury value refers to (record_date) + google.protobuf.Timestamp record_date = 1; + int64 total_debt_usd = 2; // tot_pub_debt_out_amt + int64 debt_held_public_usd = 3; // debt_held_public_amt + int64 intragovernmental_usd = 4; // intragov_hold_amt + int64 change_1d_usd = 5; // delta vs ~1 day earlier by record_date + int64 change_7d_usd = 6; // delta vs ~7 days earlier by record_date + int64 change_1y_usd = 7; // delta vs ~1 year earlier by record_date + // Time the value was fetched from the Treasury API + google.protobuf.Timestamp fetched_at = 8; + // True when the last poll failed or the stored value is older than expected + bool stale = 9; + // Time of the last successful poll (zero if unknown) + google.protobuf.Timestamp last_success_at = 10; +} + +message GetUSDebtRequest {} diff --git a/stalker_grpc.pb.go b/stalker_grpc.pb.go index c32907e..f1fd088 100644 --- a/stalker_grpc.pb.go +++ b/stalker_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.6.1 -// - protoc v7.34.0 +// - protoc (unknown) // source: stalker.proto package stalker @@ -36,6 +36,7 @@ const ( StalkerService_GetSteamSessions_FullMethodName = "/stalker.StalkerService/GetSteamSessions" StalkerService_GetSteamGameSessions_FullMethodName = "/stalker.StalkerService/GetSteamGameSessions" StalkerService_GetSteamStats_FullMethodName = "/stalker.StalkerService/GetSteamStats" + StalkerService_GetUSDebt_FullMethodName = "/stalker.StalkerService/GetUSDebt" ) // StalkerServiceClient is the client API for StalkerService service. @@ -65,6 +66,8 @@ type StalkerServiceClient interface { GetSteamSessions(ctx context.Context, in *GetSteamSessionsRequest, opts ...grpc.CallOption) (*GetSteamSessionsResponse, error) GetSteamGameSessions(ctx context.Context, in *GetSteamGameSessionsRequest, opts ...grpc.CallOption) (*GetSteamGameSessionsResponse, error) GetSteamStats(ctx context.Context, in *GetSteamStatsRequest, opts ...grpc.CallOption) (*SteamStats, error) + // US National Debt tracking + GetUSDebt(ctx context.Context, in *GetUSDebtRequest, opts ...grpc.CallOption) (*USDebtSnapshot, error) } type stalkerServiceClient struct { @@ -235,6 +238,16 @@ func (c *stalkerServiceClient) GetSteamStats(ctx context.Context, in *GetSteamSt return out, nil } +func (c *stalkerServiceClient) GetUSDebt(ctx context.Context, in *GetUSDebtRequest, opts ...grpc.CallOption) (*USDebtSnapshot, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(USDebtSnapshot) + err := c.cc.Invoke(ctx, StalkerService_GetUSDebt_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // StalkerServiceServer is the server API for StalkerService service. // All implementations must embed UnimplementedStalkerServiceServer // for forward compatibility. @@ -262,6 +275,8 @@ type StalkerServiceServer interface { GetSteamSessions(context.Context, *GetSteamSessionsRequest) (*GetSteamSessionsResponse, error) GetSteamGameSessions(context.Context, *GetSteamGameSessionsRequest) (*GetSteamGameSessionsResponse, error) GetSteamStats(context.Context, *GetSteamStatsRequest) (*SteamStats, error) + // US National Debt tracking + GetUSDebt(context.Context, *GetUSDebtRequest) (*USDebtSnapshot, error) mustEmbedUnimplementedStalkerServiceServer() } @@ -320,6 +335,9 @@ func (UnimplementedStalkerServiceServer) GetSteamGameSessions(context.Context, * func (UnimplementedStalkerServiceServer) GetSteamStats(context.Context, *GetSteamStatsRequest) (*SteamStats, error) { return nil, status.Error(codes.Unimplemented, "method GetSteamStats not implemented") } +func (UnimplementedStalkerServiceServer) GetUSDebt(context.Context, *GetUSDebtRequest) (*USDebtSnapshot, error) { + return nil, status.Error(codes.Unimplemented, "method GetUSDebt not implemented") +} func (UnimplementedStalkerServiceServer) mustEmbedUnimplementedStalkerServiceServer() {} func (UnimplementedStalkerServiceServer) testEmbeddedByValue() {} @@ -629,6 +647,24 @@ func _StalkerService_GetSteamStats_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _StalkerService_GetUSDebt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUSDebtRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StalkerServiceServer).GetUSDebt(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StalkerService_GetUSDebt_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StalkerServiceServer).GetUSDebt(ctx, req.(*GetUSDebtRequest)) + } + return interceptor(ctx, in, info, handler) +} + // StalkerService_ServiceDesc is the grpc.ServiceDesc for StalkerService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -700,6 +736,10 @@ var StalkerService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetSteamStats", Handler: _StalkerService_GetSteamStats_Handler, }, + { + MethodName: "GetUSDebt", + Handler: _StalkerService_GetUSDebt_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "stalker.proto",