diff --git a/backend/spec/state/v1/statev1connect/state.connect.go b/backend/spec/state/v1/statev1connect/state.connect.go index fba2f96..23ec261 100644 --- a/backend/spec/state/v1/statev1connect/state.connect.go +++ b/backend/spec/state/v1/statev1connect/state.connect.go @@ -18,7 +18,7 @@ import ( // generated with a version of connect newer than the one compiled into your binary. You can fix the // problem by either regenerating this code with an older version of connect or updating the connect // version compiled into your binary. -const _ = connect.IsAtLeastVersion0_1_0 +const _ = connect.IsAtLeastVersion1_13_0 const ( // StateManagerServiceName is the fully-qualified name of the StateManagerService service. @@ -62,6 +62,20 @@ const ( StateManagerServiceUpdateTrainProcedure = "/state.v1.StateManagerService/UpdateTrain" ) +// These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. +var ( + stateManagerServiceServiceDescriptor = v1.File_state_v1_state_proto.Services().ByName("StateManagerService") + stateManagerServiceGetBlockStatesMethodDescriptor = stateManagerServiceServiceDescriptor.Methods().ByName("GetBlockStates") + stateManagerServiceUpdateBlockStateMethodDescriptor = stateManagerServiceServiceDescriptor.Methods().ByName("UpdateBlockState") + stateManagerServiceUpdatePointStateMethodDescriptor = stateManagerServiceServiceDescriptor.Methods().ByName("UpdatePointState") + stateManagerServiceGetPointStatesMethodDescriptor = stateManagerServiceServiceDescriptor.Methods().ByName("GetPointStates") + stateManagerServiceUpdateStopStateMethodDescriptor = stateManagerServiceServiceDescriptor.Methods().ByName("UpdateStopState") + stateManagerServiceGetStopStatesMethodDescriptor = stateManagerServiceServiceDescriptor.Methods().ByName("GetStopStates") + stateManagerServiceGetTrainsMethodDescriptor = stateManagerServiceServiceDescriptor.Methods().ByName("GetTrains") + stateManagerServiceAddTrainMethodDescriptor = stateManagerServiceServiceDescriptor.Methods().ByName("AddTrain") + stateManagerServiceUpdateTrainMethodDescriptor = stateManagerServiceServiceDescriptor.Methods().ByName("UpdateTrain") +) + // StateManagerServiceClient is a client for the state.v1.StateManagerService service. type StateManagerServiceClient interface { // Block @@ -92,47 +106,56 @@ func NewStateManagerServiceClient(httpClient connect.HTTPClient, baseURL string, getBlockStates: connect.NewClient[v1.GetBlockStatesRequest, v1.GetBlockStatesResponse]( httpClient, baseURL+StateManagerServiceGetBlockStatesProcedure, - opts..., + connect.WithSchema(stateManagerServiceGetBlockStatesMethodDescriptor), + connect.WithClientOptions(opts...), ), updateBlockState: connect.NewClient[v1.UpdateBlockStateRequest, v1.UpdateBlockStateResponse]( httpClient, baseURL+StateManagerServiceUpdateBlockStateProcedure, - opts..., + connect.WithSchema(stateManagerServiceUpdateBlockStateMethodDescriptor), + connect.WithClientOptions(opts...), ), updatePointState: connect.NewClient[v1.UpdatePointStateRequest, v1.UpdatePointStateResponse]( httpClient, baseURL+StateManagerServiceUpdatePointStateProcedure, - opts..., + connect.WithSchema(stateManagerServiceUpdatePointStateMethodDescriptor), + connect.WithClientOptions(opts...), ), getPointStates: connect.NewClient[v1.GetPointStatesRequest, v1.GetPointStatesResponse]( httpClient, baseURL+StateManagerServiceGetPointStatesProcedure, - opts..., + connect.WithSchema(stateManagerServiceGetPointStatesMethodDescriptor), + connect.WithClientOptions(opts...), ), updateStopState: connect.NewClient[v1.UpdateStopStateRequest, v1.UpdateStopStateResponse]( httpClient, baseURL+StateManagerServiceUpdateStopStateProcedure, - opts..., + connect.WithSchema(stateManagerServiceUpdateStopStateMethodDescriptor), + connect.WithClientOptions(opts...), ), getStopStates: connect.NewClient[v1.GetStopStatesRequest, v1.GetStopStatesResponse]( httpClient, baseURL+StateManagerServiceGetStopStatesProcedure, - opts..., + connect.WithSchema(stateManagerServiceGetStopStatesMethodDescriptor), + connect.WithClientOptions(opts...), ), getTrains: connect.NewClient[v1.GetTrainsRequest, v1.GetTrainsResponse]( httpClient, baseURL+StateManagerServiceGetTrainsProcedure, - opts..., + connect.WithSchema(stateManagerServiceGetTrainsMethodDescriptor), + connect.WithClientOptions(opts...), ), addTrain: connect.NewClient[v1.AddTrainRequest, v1.AddTrainResponse]( httpClient, baseURL+StateManagerServiceAddTrainProcedure, - opts..., + connect.WithSchema(stateManagerServiceAddTrainMethodDescriptor), + connect.WithClientOptions(opts...), ), updateTrain: connect.NewClient[v1.UpdateTrainRequest, v1.UpdateTrainResponse]( httpClient, baseURL+StateManagerServiceUpdateTrainProcedure, - opts..., + connect.WithSchema(stateManagerServiceUpdateTrainMethodDescriptor), + connect.WithClientOptions(opts...), ), } } @@ -221,47 +244,56 @@ func NewStateManagerServiceHandler(svc StateManagerServiceHandler, opts ...conne stateManagerServiceGetBlockStatesHandler := connect.NewUnaryHandler( StateManagerServiceGetBlockStatesProcedure, svc.GetBlockStates, - opts..., + connect.WithSchema(stateManagerServiceGetBlockStatesMethodDescriptor), + connect.WithHandlerOptions(opts...), ) stateManagerServiceUpdateBlockStateHandler := connect.NewUnaryHandler( StateManagerServiceUpdateBlockStateProcedure, svc.UpdateBlockState, - opts..., + connect.WithSchema(stateManagerServiceUpdateBlockStateMethodDescriptor), + connect.WithHandlerOptions(opts...), ) stateManagerServiceUpdatePointStateHandler := connect.NewUnaryHandler( StateManagerServiceUpdatePointStateProcedure, svc.UpdatePointState, - opts..., + connect.WithSchema(stateManagerServiceUpdatePointStateMethodDescriptor), + connect.WithHandlerOptions(opts...), ) stateManagerServiceGetPointStatesHandler := connect.NewUnaryHandler( StateManagerServiceGetPointStatesProcedure, svc.GetPointStates, - opts..., + connect.WithSchema(stateManagerServiceGetPointStatesMethodDescriptor), + connect.WithHandlerOptions(opts...), ) stateManagerServiceUpdateStopStateHandler := connect.NewUnaryHandler( StateManagerServiceUpdateStopStateProcedure, svc.UpdateStopState, - opts..., + connect.WithSchema(stateManagerServiceUpdateStopStateMethodDescriptor), + connect.WithHandlerOptions(opts...), ) stateManagerServiceGetStopStatesHandler := connect.NewUnaryHandler( StateManagerServiceGetStopStatesProcedure, svc.GetStopStates, - opts..., + connect.WithSchema(stateManagerServiceGetStopStatesMethodDescriptor), + connect.WithHandlerOptions(opts...), ) stateManagerServiceGetTrainsHandler := connect.NewUnaryHandler( StateManagerServiceGetTrainsProcedure, svc.GetTrains, - opts..., + connect.WithSchema(stateManagerServiceGetTrainsMethodDescriptor), + connect.WithHandlerOptions(opts...), ) stateManagerServiceAddTrainHandler := connect.NewUnaryHandler( StateManagerServiceAddTrainProcedure, svc.AddTrain, - opts..., + connect.WithSchema(stateManagerServiceAddTrainMethodDescriptor), + connect.WithHandlerOptions(opts...), ) stateManagerServiceUpdateTrainHandler := connect.NewUnaryHandler( StateManagerServiceUpdateTrainProcedure, svc.UpdateTrain, - opts..., + connect.WithSchema(stateManagerServiceUpdateTrainMethodDescriptor), + connect.WithHandlerOptions(opts...), ) return "/state.v1.StateManagerService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { switch r.URL.Path { diff --git a/go.mod b/go.mod index ba14d70..60f069b 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/joho/godotenv v1.5.1 github.com/rs/cors v1.10.1 go.mongodb.org/mongo-driver v1.13.0 - golang.org/x/net v0.18.0 + golang.org/x/net v0.23.0 golang.org/x/sync v0.5.0 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v3 v3.0.1 @@ -47,10 +47,10 @@ require ( github.com/xdg-go/scram v1.1.2 // indirect github.com/xdg-go/stringprep v1.0.4 // indirect github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect - golang.org/x/crypto v0.15.0 // indirect + golang.org/x/crypto v0.21.0 // indirect golang.org/x/oauth2 v0.8.0 // indirect - golang.org/x/sys v0.14.0 // indirect - golang.org/x/term v0.14.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.15.0 // indirect diff --git a/go.sum b/go.sum index 58af700..04b4131 100644 --- a/go.sum +++ b/go.sum @@ -117,6 +117,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -130,6 +132,8 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -148,10 +152,14 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=