diff --git a/internal/gen/solve/v1/solve.pb.go b/internal/gen/solve/v1/solve.pb.go new file mode 100644 index 0000000..4ce0988 --- /dev/null +++ b/internal/gen/solve/v1/solve.pb.go @@ -0,0 +1,226 @@ +//*************************************************************************************************************** + +// @author Michael Roberts +// @package @observerly/nova/proto/solve/v1 +// @license Copyright © 2021-2025 observerly + +//*************************************************************************************************************** + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc (unknown) +// source: solve/v1/solve.proto + +//*************************************************************************************************************** + +package solvev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + v1 "nova/internal/gen/wcs/v1" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +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 SolveForWCSFITSHandlerRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + BucketName string `protobuf:"bytes,2,opt,name=bucket_name,json=bucketName,proto3" json:"bucket_name,omitempty"` + Location string `protobuf:"bytes,3,opt,name=location,proto3" json:"location,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SolveForWCSFITSHandlerRequest) Reset() { + *x = SolveForWCSFITSHandlerRequest{} + mi := &file_solve_v1_solve_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SolveForWCSFITSHandlerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SolveForWCSFITSHandlerRequest) ProtoMessage() {} + +func (x *SolveForWCSFITSHandlerRequest) ProtoReflect() protoreflect.Message { + mi := &file_solve_v1_solve_proto_msgTypes[0] + 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 SolveForWCSFITSHandlerRequest.ProtoReflect.Descriptor instead. +func (*SolveForWCSFITSHandlerRequest) Descriptor() ([]byte, []int) { + return file_solve_v1_solve_proto_rawDescGZIP(), []int{0} +} + +func (x *SolveForWCSFITSHandlerRequest) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *SolveForWCSFITSHandlerRequest) GetBucketName() string { + if x != nil { + return x.BucketName + } + return "" +} + +func (x *SolveForWCSFITSHandlerRequest) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +type SolveForWCSFITSHandlerResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Wcs *v1.WCS `protobuf:"bytes,1,opt,name=wcs,proto3" json:"wcs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SolveForWCSFITSHandlerResponse) Reset() { + *x = SolveForWCSFITSHandlerResponse{} + mi := &file_solve_v1_solve_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SolveForWCSFITSHandlerResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SolveForWCSFITSHandlerResponse) ProtoMessage() {} + +func (x *SolveForWCSFITSHandlerResponse) ProtoReflect() protoreflect.Message { + mi := &file_solve_v1_solve_proto_msgTypes[1] + 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 SolveForWCSFITSHandlerResponse.ProtoReflect.Descriptor instead. +func (*SolveForWCSFITSHandlerResponse) Descriptor() ([]byte, []int) { + return file_solve_v1_solve_proto_rawDescGZIP(), []int{1} +} + +func (x *SolveForWCSFITSHandlerResponse) GetWcs() *v1.WCS { + if x != nil { + return x.Wcs + } + return nil +} + +var File_solve_v1_solve_proto protoreflect.FileDescriptor + +var file_solve_v1_solve_proto_rawDesc = string([]byte{ + 0x0a, 0x14, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x6f, 0x6c, 0x76, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x2e, 0x76, 0x31, + 0x1a, 0x10, 0x77, 0x63, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x72, 0x0a, 0x1d, 0x53, 0x6f, 0x6c, 0x76, 0x65, 0x46, 0x6f, 0x72, 0x57, 0x43, + 0x53, 0x46, 0x49, 0x54, 0x53, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3f, 0x0a, 0x1e, 0x53, 0x6f, 0x6c, 0x76, 0x65, 0x46, + 0x6f, 0x72, 0x57, 0x43, 0x53, 0x46, 0x49, 0x54, 0x53, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x03, 0x77, 0x63, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x77, 0x63, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x57, + 0x43, 0x53, 0x52, 0x03, 0x77, 0x63, 0x73, 0x32, 0x7d, 0x0a, 0x0c, 0x53, 0x6f, 0x6c, 0x76, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x16, 0x53, 0x6f, 0x6c, 0x76, 0x65, + 0x46, 0x6f, 0x72, 0x57, 0x43, 0x53, 0x46, 0x49, 0x54, 0x53, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, + 0x72, 0x12, 0x27, 0x2e, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x6c, + 0x76, 0x65, 0x46, 0x6f, 0x72, 0x57, 0x43, 0x53, 0x46, 0x49, 0x54, 0x53, 0x48, 0x61, 0x6e, 0x64, + 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x6c, 0x76, 0x65, 0x46, 0x6f, 0x72, 0x57, 0x43, + 0x53, 0x46, 0x49, 0x54, 0x53, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x7f, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6f, + 0x6c, 0x76, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x6f, 0x6c, 0x76, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x22, 0x6e, 0x6f, 0x76, 0x61, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x2f, 0x76, 0x31, + 0x3b, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, + 0x08, 0x53, 0x6f, 0x6c, 0x76, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x08, 0x53, 0x6f, 0x6c, 0x76, + 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14, 0x53, 0x6f, 0x6c, 0x76, 0x65, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x53, 0x6f, + 0x6c, 0x76, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) + +var ( + file_solve_v1_solve_proto_rawDescOnce sync.Once + file_solve_v1_solve_proto_rawDescData []byte +) + +func file_solve_v1_solve_proto_rawDescGZIP() []byte { + file_solve_v1_solve_proto_rawDescOnce.Do(func() { + file_solve_v1_solve_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_solve_v1_solve_proto_rawDesc), len(file_solve_v1_solve_proto_rawDesc))) + }) + return file_solve_v1_solve_proto_rawDescData +} + +var file_solve_v1_solve_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_solve_v1_solve_proto_goTypes = []any{ + (*SolveForWCSFITSHandlerRequest)(nil), // 0: solve.v1.SolveForWCSFITSHandlerRequest + (*SolveForWCSFITSHandlerResponse)(nil), // 1: solve.v1.SolveForWCSFITSHandlerResponse + (*v1.WCS)(nil), // 2: wcs.v1.WCS +} +var file_solve_v1_solve_proto_depIdxs = []int32{ + 2, // 0: solve.v1.SolveForWCSFITSHandlerResponse.wcs:type_name -> wcs.v1.WCS + 0, // 1: solve.v1.SolveService.SolveForWCSFITSHandler:input_type -> solve.v1.SolveForWCSFITSHandlerRequest + 1, // 2: solve.v1.SolveService.SolveForWCSFITSHandler:output_type -> solve.v1.SolveForWCSFITSHandlerResponse + 2, // [2:3] is the sub-list for method output_type + 1, // [1:2] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_solve_v1_solve_proto_init() } +func file_solve_v1_solve_proto_init() { + if File_solve_v1_solve_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_solve_v1_solve_proto_rawDesc), len(file_solve_v1_solve_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_solve_v1_solve_proto_goTypes, + DependencyIndexes: file_solve_v1_solve_proto_depIdxs, + MessageInfos: file_solve_v1_solve_proto_msgTypes, + }.Build() + File_solve_v1_solve_proto = out.File + file_solve_v1_solve_proto_goTypes = nil + file_solve_v1_solve_proto_depIdxs = nil +} diff --git a/internal/gen/solve/v1/solvev1connect/solve.connect.go b/internal/gen/solve/v1/solvev1connect/solve.connect.go new file mode 100644 index 0000000..f6bc453 --- /dev/null +++ b/internal/gen/solve/v1/solvev1connect/solve.connect.go @@ -0,0 +1,117 @@ +//*************************************************************************************************************** +// @author Michael Roberts +// @package @observerly/nova/proto/solve/v1 +// @license Copyright © 2021-2025 observerly +//*************************************************************************************************************** + +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: solve/v1/solve.proto + +//*************************************************************************************************************** + +package solvev1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + http "net/http" + v1 "nova/internal/gen/solve/v1" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// 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.IsAtLeastVersion1_13_0 + +const ( + // SolveServiceName is the fully-qualified name of the SolveService service. + SolveServiceName = "solve.v1.SolveService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // SolveServiceSolveForWCSFITSHandlerProcedure is the fully-qualified name of the SolveService's + // SolveForWCSFITSHandler RPC. + SolveServiceSolveForWCSFITSHandlerProcedure = "/solve.v1.SolveService/SolveForWCSFITSHandler" +) + +// SolveServiceClient is a client for the solve.v1.SolveService service. +type SolveServiceClient interface { + SolveForWCSFITSHandler(context.Context, *connect.Request[v1.SolveForWCSFITSHandlerRequest]) (*connect.Response[v1.SolveForWCSFITSHandlerResponse], error) +} + +// NewSolveServiceClient constructs a client for the solve.v1.SolveService service. By default, it +// uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends +// uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or +// connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewSolveServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) SolveServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + solveServiceMethods := v1.File_solve_v1_solve_proto.Services().ByName("SolveService").Methods() + return &solveServiceClient{ + solveForWCSFITSHandler: connect.NewClient[v1.SolveForWCSFITSHandlerRequest, v1.SolveForWCSFITSHandlerResponse]( + httpClient, + baseURL+SolveServiceSolveForWCSFITSHandlerProcedure, + connect.WithSchema(solveServiceMethods.ByName("SolveForWCSFITSHandler")), + connect.WithClientOptions(opts...), + ), + } +} + +// solveServiceClient implements SolveServiceClient. +type solveServiceClient struct { + solveForWCSFITSHandler *connect.Client[v1.SolveForWCSFITSHandlerRequest, v1.SolveForWCSFITSHandlerResponse] +} + +// SolveForWCSFITSHandler calls solve.v1.SolveService.SolveForWCSFITSHandler. +func (c *solveServiceClient) SolveForWCSFITSHandler(ctx context.Context, req *connect.Request[v1.SolveForWCSFITSHandlerRequest]) (*connect.Response[v1.SolveForWCSFITSHandlerResponse], error) { + return c.solveForWCSFITSHandler.CallUnary(ctx, req) +} + +// SolveServiceHandler is an implementation of the solve.v1.SolveService service. +type SolveServiceHandler interface { + SolveForWCSFITSHandler(context.Context, *connect.Request[v1.SolveForWCSFITSHandlerRequest]) (*connect.Response[v1.SolveForWCSFITSHandlerResponse], error) +} + +// NewSolveServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewSolveServiceHandler(svc SolveServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + solveServiceMethods := v1.File_solve_v1_solve_proto.Services().ByName("SolveService").Methods() + solveServiceSolveForWCSFITSHandlerHandler := connect.NewUnaryHandler( + SolveServiceSolveForWCSFITSHandlerProcedure, + svc.SolveForWCSFITSHandler, + connect.WithSchema(solveServiceMethods.ByName("SolveForWCSFITSHandler")), + connect.WithHandlerOptions(opts...), + ) + return "/solve.v1.SolveService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case SolveServiceSolveForWCSFITSHandlerProcedure: + solveServiceSolveForWCSFITSHandlerHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedSolveServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedSolveServiceHandler struct{} + +func (UnimplementedSolveServiceHandler) SolveForWCSFITSHandler(context.Context, *connect.Request[v1.SolveForWCSFITSHandlerRequest]) (*connect.Response[v1.SolveForWCSFITSHandlerResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("solve.v1.SolveService.SolveForWCSFITSHandler is not implemented")) +} diff --git a/proto/solve/v1/solve.proto b/proto/solve/v1/solve.proto new file mode 100644 index 0000000..07e74bb --- /dev/null +++ b/proto/solve/v1/solve.proto @@ -0,0 +1,40 @@ +/*****************************************************************************************************************/ + +// @author Michael Roberts +// @package @observerly/nova/proto/solve/v1 +// @license Copyright © 2021-2025 observerly + +/*****************************************************************************************************************/ + +syntax = "proto3"; + +/*****************************************************************************************************************/ + +package solve.v1; + +/*****************************************************************************************************************/ + +// Import the wcs.proto definitions +import "wcs/v1/wcs.proto"; + +/*****************************************************************************************************************/ + +message SolveForWCSFITSHandlerRequest { + string owner = 1; + string bucket_name = 2; + string location = 3; +} + +/*****************************************************************************************************************/ + +message SolveForWCSFITSHandlerResponse { + wcs.v1.WCS wcs = 1; +} + +/*****************************************************************************************************************/ + +service SolveService { + rpc SolveForWCSFITSHandler(SolveForWCSFITSHandlerRequest) returns (SolveForWCSFITSHandlerResponse) {} +} + +/*****************************************************************************************************************/ \ No newline at end of file