From 65dfc1e2f343e62d20cdbbc77d8e137e9c4c5174 Mon Sep 17 00:00:00 2001 From: Antoine Grondin Date: Fri, 26 Sep 2025 14:54:17 +0900 Subject: [PATCH] stuff --- .../v1/projectv1connect/service.connect.go | 33 ++ go/svc/project/v1/service.pb.go | 229 ++++++------ go/types/v1/alert.pb.go | 311 +++++++++++---- go/types/v1/dashboard.pb.go | 261 ++++++++++--- go/types/v1/project.pb.go | 353 +++++++++++++----- .../v1/service-ProjectService_connectquery.ts | 8 + js/svc/project/v1/service_pb.ts | 96 +++-- js/types/v1/alert_pb.ts | 89 ++++- js/types/v1/dashboard_pb.ts | 84 ++++- js/types/v1/project_pb.ts | 130 +++++-- proto/svc/project/v1/service.proto | 24 +- proto/types/v1/alert.proto | 14 + proto/types/v1/dashboard.proto | 29 +- proto/types/v1/project.proto | 27 +- 14 files changed, 1227 insertions(+), 461 deletions(-) diff --git a/go/svc/project/v1/projectv1connect/service.connect.go b/go/svc/project/v1/projectv1connect/service.connect.go index 24b94bf..bc2456b 100644 --- a/go/svc/project/v1/projectv1connect/service.connect.go +++ b/go/svc/project/v1/projectv1connect/service.connect.go @@ -48,6 +48,9 @@ const ( // ProjectServiceListProjectProcedure is the fully-qualified name of the ProjectService's // ListProject RPC. ProjectServiceListProjectProcedure = "/svc.project.v1.ProjectService/ListProject" + // ProjectServiceSyncProjectProcedure is the fully-qualified name of the ProjectService's + // SyncProject RPC. + ProjectServiceSyncProjectProcedure = "/svc.project.v1.ProjectService/SyncProject" ) // ProjectServiceClient is a client for the svc.project.v1.ProjectService service. @@ -57,6 +60,9 @@ type ProjectServiceClient interface { UpdateProject(context.Context, *connect.Request[v1.UpdateProjectRequest]) (*connect.Response[v1.UpdateProjectResponse], error) DeleteProject(context.Context, *connect.Request[v1.DeleteProjectRequest]) (*connect.Response[v1.DeleteProjectResponse], error) ListProject(context.Context, *connect.Request[v1.ListProjectRequest]) (*connect.Response[v1.ListProjectResponse], error) + // SyncProject is like GetProject but guarantees that cached data + // gets updated. + SyncProject(context.Context, *connect.Request[v1.SyncProjectRequest]) (*connect.Response[v1.SyncProjectResponse], error) } // NewProjectServiceClient constructs a client for the svc.project.v1.ProjectService service. By @@ -100,6 +106,12 @@ func NewProjectServiceClient(httpClient connect.HTTPClient, baseURL string, opts connect.WithSchema(projectServiceMethods.ByName("ListProject")), connect.WithClientOptions(opts...), ), + syncProject: connect.NewClient[v1.SyncProjectRequest, v1.SyncProjectResponse]( + httpClient, + baseURL+ProjectServiceSyncProjectProcedure, + connect.WithSchema(projectServiceMethods.ByName("SyncProject")), + connect.WithClientOptions(opts...), + ), } } @@ -110,6 +122,7 @@ type projectServiceClient struct { updateProject *connect.Client[v1.UpdateProjectRequest, v1.UpdateProjectResponse] deleteProject *connect.Client[v1.DeleteProjectRequest, v1.DeleteProjectResponse] listProject *connect.Client[v1.ListProjectRequest, v1.ListProjectResponse] + syncProject *connect.Client[v1.SyncProjectRequest, v1.SyncProjectResponse] } // CreateProject calls svc.project.v1.ProjectService.CreateProject. @@ -137,6 +150,11 @@ func (c *projectServiceClient) ListProject(ctx context.Context, req *connect.Req return c.listProject.CallUnary(ctx, req) } +// SyncProject calls svc.project.v1.ProjectService.SyncProject. +func (c *projectServiceClient) SyncProject(ctx context.Context, req *connect.Request[v1.SyncProjectRequest]) (*connect.Response[v1.SyncProjectResponse], error) { + return c.syncProject.CallUnary(ctx, req) +} + // ProjectServiceHandler is an implementation of the svc.project.v1.ProjectService service. type ProjectServiceHandler interface { CreateProject(context.Context, *connect.Request[v1.CreateProjectRequest]) (*connect.Response[v1.CreateProjectResponse], error) @@ -144,6 +162,9 @@ type ProjectServiceHandler interface { UpdateProject(context.Context, *connect.Request[v1.UpdateProjectRequest]) (*connect.Response[v1.UpdateProjectResponse], error) DeleteProject(context.Context, *connect.Request[v1.DeleteProjectRequest]) (*connect.Response[v1.DeleteProjectResponse], error) ListProject(context.Context, *connect.Request[v1.ListProjectRequest]) (*connect.Response[v1.ListProjectResponse], error) + // SyncProject is like GetProject but guarantees that cached data + // gets updated. + SyncProject(context.Context, *connect.Request[v1.SyncProjectRequest]) (*connect.Response[v1.SyncProjectResponse], error) } // NewProjectServiceHandler builds an HTTP handler from the service implementation. It returns the @@ -183,6 +204,12 @@ func NewProjectServiceHandler(svc ProjectServiceHandler, opts ...connect.Handler connect.WithSchema(projectServiceMethods.ByName("ListProject")), connect.WithHandlerOptions(opts...), ) + projectServiceSyncProjectHandler := connect.NewUnaryHandler( + ProjectServiceSyncProjectProcedure, + svc.SyncProject, + connect.WithSchema(projectServiceMethods.ByName("SyncProject")), + connect.WithHandlerOptions(opts...), + ) return "/svc.project.v1.ProjectService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { switch r.URL.Path { case ProjectServiceCreateProjectProcedure: @@ -195,6 +222,8 @@ func NewProjectServiceHandler(svc ProjectServiceHandler, opts ...connect.Handler projectServiceDeleteProjectHandler.ServeHTTP(w, r) case ProjectServiceListProjectProcedure: projectServiceListProjectHandler.ServeHTTP(w, r) + case ProjectServiceSyncProjectProcedure: + projectServiceSyncProjectHandler.ServeHTTP(w, r) default: http.NotFound(w, r) } @@ -223,3 +252,7 @@ func (UnimplementedProjectServiceHandler) DeleteProject(context.Context, *connec func (UnimplementedProjectServiceHandler) ListProject(context.Context, *connect.Request[v1.ListProjectRequest]) (*connect.Response[v1.ListProjectResponse], error) { return nil, connect.NewError(connect.CodeUnimplemented, errors.New("svc.project.v1.ProjectService.ListProject is not implemented")) } + +func (UnimplementedProjectServiceHandler) SyncProject(context.Context, *connect.Request[v1.SyncProjectRequest]) (*connect.Response[v1.SyncProjectResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("svc.project.v1.ProjectService.SyncProject is not implemented")) +} diff --git a/go/svc/project/v1/service.pb.go b/go/svc/project/v1/service.pb.go index 2d9a699..4b6ca65 100644 --- a/go/svc/project/v1/service.pb.go +++ b/go/svc/project/v1/service.pb.go @@ -25,8 +25,7 @@ const ( type CreateProjectRequest struct { state protoimpl.MessageState `protogen:"open.v1"` EnvironmentId int64 `protobuf:"varint,101,opt,name=environment_id,json=environmentId,proto3" json:"environment_id,omitempty"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Pointer *v1.ProjectPointer `protobuf:"bytes,2,opt,name=pointer,proto3" json:"pointer,omitempty"` + Spec *v1.ProjectSpec `protobuf:"bytes,1,opt,name=spec,proto3" json:"spec,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -68,16 +67,9 @@ func (x *CreateProjectRequest) GetEnvironmentId() int64 { return 0 } -func (x *CreateProjectRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CreateProjectRequest) GetPointer() *v1.ProjectPointer { +func (x *CreateProjectRequest) GetSpec() *v1.ProjectSpec { if x != nil { - return x.Pointer + return x.Spec } return nil } @@ -239,10 +231,10 @@ func (x *GetProjectResponse) GetAlertGroups() []*v1.AlertGroup { } type UpdateProjectRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - EnvironmentId int64 `protobuf:"varint,101,opt,name=environment_id,json=environmentId,proto3" json:"environment_id,omitempty"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Mutations []*UpdateProjectRequest_Mutation `protobuf:"bytes,2,rep,name=mutations,proto3" json:"mutations,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + EnvironmentId int64 `protobuf:"varint,101,opt,name=environment_id,json=environmentId,proto3" json:"environment_id,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Spec *v1.ProjectSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -291,9 +283,9 @@ func (x *UpdateProjectRequest) GetName() string { return "" } -func (x *UpdateProjectRequest) GetMutations() []*UpdateProjectRequest_Mutation { +func (x *UpdateProjectRequest) GetSpec() *v1.ProjectSpec { if x != nil { - return x.Mutations + return x.Spec } return nil } @@ -542,31 +534,28 @@ func (x *ListProjectResponse) GetItems() []*ListProjectResponse_ListItem { return nil } -type UpdateProjectRequest_Mutation struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Do: - // - // *UpdateProjectRequest_Mutation_SetName - // *UpdateProjectRequest_Mutation_SetPointer - Do isUpdateProjectRequest_Mutation_Do `protobuf_oneof:"do"` +type SyncProjectRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + EnvironmentId int64 `protobuf:"varint,101,opt,name=environment_id,json=environmentId,proto3" json:"environment_id,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *UpdateProjectRequest_Mutation) Reset() { - *x = UpdateProjectRequest_Mutation{} +func (x *SyncProjectRequest) Reset() { + *x = SyncProjectRequest{} mi := &file_svc_project_v1_service_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *UpdateProjectRequest_Mutation) String() string { +func (x *SyncProjectRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateProjectRequest_Mutation) ProtoMessage() {} +func (*SyncProjectRequest) ProtoMessage() {} -func (x *UpdateProjectRequest_Mutation) ProtoReflect() protoreflect.Message { +func (x *SyncProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_svc_project_v1_service_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -578,51 +567,68 @@ func (x *UpdateProjectRequest_Mutation) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdateProjectRequest_Mutation.ProtoReflect.Descriptor instead. -func (*UpdateProjectRequest_Mutation) Descriptor() ([]byte, []int) { - return file_svc_project_v1_service_proto_rawDescGZIP(), []int{4, 0} +// Deprecated: Use SyncProjectRequest.ProtoReflect.Descriptor instead. +func (*SyncProjectRequest) Descriptor() ([]byte, []int) { + return file_svc_project_v1_service_proto_rawDescGZIP(), []int{10} } -func (x *UpdateProjectRequest_Mutation) GetDo() isUpdateProjectRequest_Mutation_Do { +func (x *SyncProjectRequest) GetEnvironmentId() int64 { if x != nil { - return x.Do + return x.EnvironmentId } - return nil + return 0 } -func (x *UpdateProjectRequest_Mutation) GetSetName() string { +func (x *SyncProjectRequest) GetName() string { if x != nil { - if x, ok := x.Do.(*UpdateProjectRequest_Mutation_SetName); ok { - return x.SetName - } + return x.Name } return "" } -func (x *UpdateProjectRequest_Mutation) GetSetPointer() *v1.ProjectPointer { - if x != nil { - if x, ok := x.Do.(*UpdateProjectRequest_Mutation_SetPointer); ok { - return x.SetPointer - } - } - return nil +type SyncProjectResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Project *v1.Project `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -type isUpdateProjectRequest_Mutation_Do interface { - isUpdateProjectRequest_Mutation_Do() +func (x *SyncProjectResponse) Reset() { + *x = SyncProjectResponse{} + mi := &file_svc_project_v1_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -type UpdateProjectRequest_Mutation_SetName struct { - SetName string `protobuf:"bytes,1,opt,name=set_name,json=setName,proto3,oneof"` +func (x *SyncProjectResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -type UpdateProjectRequest_Mutation_SetPointer struct { - SetPointer *v1.ProjectPointer `protobuf:"bytes,2,opt,name=set_pointer,json=setPointer,proto3,oneof"` +func (*SyncProjectResponse) ProtoMessage() {} + +func (x *SyncProjectResponse) ProtoReflect() protoreflect.Message { + mi := &file_svc_project_v1_service_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (*UpdateProjectRequest_Mutation_SetName) isUpdateProjectRequest_Mutation_Do() {} +// Deprecated: Use SyncProjectResponse.ProtoReflect.Descriptor instead. +func (*SyncProjectResponse) Descriptor() ([]byte, []int) { + return file_svc_project_v1_service_proto_rawDescGZIP(), []int{11} +} -func (*UpdateProjectRequest_Mutation_SetPointer) isUpdateProjectRequest_Mutation_Do() {} +func (x *SyncProjectResponse) GetProject() *v1.Project { + if x != nil { + return x.Project + } + return nil +} type ListProjectResponse_ListItem struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -633,7 +639,7 @@ type ListProjectResponse_ListItem struct { func (x *ListProjectResponse_ListItem) Reset() { *x = ListProjectResponse_ListItem{} - mi := &file_svc_project_v1_service_proto_msgTypes[11] + mi := &file_svc_project_v1_service_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -645,7 +651,7 @@ func (x *ListProjectResponse_ListItem) String() string { func (*ListProjectResponse_ListItem) ProtoMessage() {} func (x *ListProjectResponse_ListItem) ProtoReflect() protoreflect.Message { - mi := &file_svc_project_v1_service_proto_msgTypes[11] + mi := &file_svc_project_v1_service_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -672,11 +678,10 @@ var File_svc_project_v1_service_proto protoreflect.FileDescriptor const file_svc_project_v1_service_proto_rawDesc = "" + "\n" + - "\x1csvc/project/v1/service.proto\x12\x0esvc.project.v1\x1a\x14types/v1/alert.proto\x1a\x15types/v1/cursor.proto\x1a\x18types/v1/dashboard.proto\x1a\x16types/v1/project.proto\"\x85\x01\n" + + "\x1csvc/project/v1/service.proto\x12\x0esvc.project.v1\x1a\x14types/v1/alert.proto\x1a\x15types/v1/cursor.proto\x1a\x18types/v1/dashboard.proto\x1a\x16types/v1/project.proto\"h\n" + "\x14CreateProjectRequest\x12%\n" + - "\x0eenvironment_id\x18e \x01(\x03R\renvironmentId\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x122\n" + - "\apointer\x18\x02 \x01(\v2\x18.types.v1.ProjectPointerR\apointer\"D\n" + + "\x0eenvironment_id\x18e \x01(\x03R\renvironmentId\x12)\n" + + "\x04spec\x18\x01 \x01(\v2\x15.types.v1.ProjectSpecR\x04spec\"D\n" + "\x15CreateProjectResponse\x12+\n" + "\aproject\x18\x01 \x01(\v2\x11.types.v1.ProjectR\aproject\"N\n" + "\x11GetProjectRequest\x12%\n" + @@ -687,16 +692,11 @@ const file_svc_project_v1_service_proto_rawDesc = "" + "\n" + "dashboards\x18\x02 \x03(\v2\x13.types.v1.DashboardR\n" + "dashboards\x127\n" + - "\falert_groups\x18\x03 \x03(\v2\x14.types.v1.AlertGroupR\valertGroups\"\x8a\x02\n" + + "\falert_groups\x18\x03 \x03(\v2\x14.types.v1.AlertGroupR\valertGroups\"|\n" + "\x14UpdateProjectRequest\x12%\n" + "\x0eenvironment_id\x18e \x01(\x03R\renvironmentId\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12K\n" + - "\tmutations\x18\x02 \x03(\v2-.svc.project.v1.UpdateProjectRequest.MutationR\tmutations\x1aj\n" + - "\bMutation\x12\x1b\n" + - "\bset_name\x18\x01 \x01(\tH\x00R\asetName\x12;\n" + - "\vset_pointer\x18\x02 \x01(\v2\x18.types.v1.ProjectPointerH\x00R\n" + - "setPointerB\x04\n" + - "\x02do\"D\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12)\n" + + "\x04spec\x18\x02 \x01(\v2\x15.types.v1.ProjectSpecR\x04spec\"D\n" + "\x15UpdateProjectResponse\x12+\n" + "\aproject\x18\x01 \x01(\v2\x11.types.v1.ProjectR\aproject\"Q\n" + "\x14DeleteProjectRequest\x12%\n" + @@ -711,14 +711,20 @@ const file_svc_project_v1_service_proto_rawDesc = "" + "\x04next\x18\x01 \x01(\v2\x10.types.v1.CursorR\x04next\x12B\n" + "\x05items\x18\x02 \x03(\v2,.svc.project.v1.ListProjectResponse.ListItemR\x05items\x1a7\n" + "\bListItem\x12+\n" + - "\aproject\x18\x01 \x01(\v2\x11.types.v1.ProjectR\aproject2\xd7\x03\n" + + "\aproject\x18\x01 \x01(\v2\x11.types.v1.ProjectR\aproject\"O\n" + + "\x12SyncProjectRequest\x12%\n" + + "\x0eenvironment_id\x18e \x01(\x03R\renvironmentId\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\"B\n" + + "\x13SyncProjectResponse\x12+\n" + + "\aproject\x18\x01 \x01(\v2\x11.types.v1.ProjectR\aproject2\xaf\x04\n" + "\x0eProjectService\x12\\\n" + "\rCreateProject\x12$.svc.project.v1.CreateProjectRequest\x1a%.svc.project.v1.CreateProjectResponse\x12S\n" + "\n" + "GetProject\x12!.svc.project.v1.GetProjectRequest\x1a\".svc.project.v1.GetProjectResponse\x12\\\n" + "\rUpdateProject\x12$.svc.project.v1.UpdateProjectRequest\x1a%.svc.project.v1.UpdateProjectResponse\x12\\\n" + "\rDeleteProject\x12$.svc.project.v1.DeleteProjectRequest\x1a%.svc.project.v1.DeleteProjectResponse\x12V\n" + - "\vListProject\x12\".svc.project.v1.ListProjectRequest\x1a#.svc.project.v1.ListProjectResponseB\xb3\x01\n" + + "\vListProject\x12\".svc.project.v1.ListProjectRequest\x1a#.svc.project.v1.ListProjectResponse\x12V\n" + + "\vSyncProject\x12\".svc.project.v1.SyncProjectRequest\x1a#.svc.project.v1.SyncProjectResponseB\xb3\x01\n" + "\x12com.svc.project.v1B\fServiceProtoP\x01Z5github.com/humanlogio/api/go/svc/project/v1;projectv1\xa2\x02\x03SPX\xaa\x02\x0eSvc.Project.V1\xca\x02\x0eSvc\\Project\\V1\xe2\x02\x1aSvc\\Project\\V1\\GPBMetadata\xea\x02\x10Svc::Project::V1b\x06proto3" var ( @@ -733,51 +739,54 @@ func file_svc_project_v1_service_proto_rawDescGZIP() []byte { return file_svc_project_v1_service_proto_rawDescData } -var file_svc_project_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_svc_project_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_svc_project_v1_service_proto_goTypes = []any{ - (*CreateProjectRequest)(nil), // 0: svc.project.v1.CreateProjectRequest - (*CreateProjectResponse)(nil), // 1: svc.project.v1.CreateProjectResponse - (*GetProjectRequest)(nil), // 2: svc.project.v1.GetProjectRequest - (*GetProjectResponse)(nil), // 3: svc.project.v1.GetProjectResponse - (*UpdateProjectRequest)(nil), // 4: svc.project.v1.UpdateProjectRequest - (*UpdateProjectResponse)(nil), // 5: svc.project.v1.UpdateProjectResponse - (*DeleteProjectRequest)(nil), // 6: svc.project.v1.DeleteProjectRequest - (*DeleteProjectResponse)(nil), // 7: svc.project.v1.DeleteProjectResponse - (*ListProjectRequest)(nil), // 8: svc.project.v1.ListProjectRequest - (*ListProjectResponse)(nil), // 9: svc.project.v1.ListProjectResponse - (*UpdateProjectRequest_Mutation)(nil), // 10: svc.project.v1.UpdateProjectRequest.Mutation - (*ListProjectResponse_ListItem)(nil), // 11: svc.project.v1.ListProjectResponse.ListItem - (*v1.ProjectPointer)(nil), // 12: types.v1.ProjectPointer - (*v1.Project)(nil), // 13: types.v1.Project - (*v1.Dashboard)(nil), // 14: types.v1.Dashboard - (*v1.AlertGroup)(nil), // 15: types.v1.AlertGroup - (*v1.Cursor)(nil), // 16: types.v1.Cursor + (*CreateProjectRequest)(nil), // 0: svc.project.v1.CreateProjectRequest + (*CreateProjectResponse)(nil), // 1: svc.project.v1.CreateProjectResponse + (*GetProjectRequest)(nil), // 2: svc.project.v1.GetProjectRequest + (*GetProjectResponse)(nil), // 3: svc.project.v1.GetProjectResponse + (*UpdateProjectRequest)(nil), // 4: svc.project.v1.UpdateProjectRequest + (*UpdateProjectResponse)(nil), // 5: svc.project.v1.UpdateProjectResponse + (*DeleteProjectRequest)(nil), // 6: svc.project.v1.DeleteProjectRequest + (*DeleteProjectResponse)(nil), // 7: svc.project.v1.DeleteProjectResponse + (*ListProjectRequest)(nil), // 8: svc.project.v1.ListProjectRequest + (*ListProjectResponse)(nil), // 9: svc.project.v1.ListProjectResponse + (*SyncProjectRequest)(nil), // 10: svc.project.v1.SyncProjectRequest + (*SyncProjectResponse)(nil), // 11: svc.project.v1.SyncProjectResponse + (*ListProjectResponse_ListItem)(nil), // 12: svc.project.v1.ListProjectResponse.ListItem + (*v1.ProjectSpec)(nil), // 13: types.v1.ProjectSpec + (*v1.Project)(nil), // 14: types.v1.Project + (*v1.Dashboard)(nil), // 15: types.v1.Dashboard + (*v1.AlertGroup)(nil), // 16: types.v1.AlertGroup + (*v1.Cursor)(nil), // 17: types.v1.Cursor } var file_svc_project_v1_service_proto_depIdxs = []int32{ - 12, // 0: svc.project.v1.CreateProjectRequest.pointer:type_name -> types.v1.ProjectPointer - 13, // 1: svc.project.v1.CreateProjectResponse.project:type_name -> types.v1.Project - 13, // 2: svc.project.v1.GetProjectResponse.project:type_name -> types.v1.Project - 14, // 3: svc.project.v1.GetProjectResponse.dashboards:type_name -> types.v1.Dashboard - 15, // 4: svc.project.v1.GetProjectResponse.alert_groups:type_name -> types.v1.AlertGroup - 10, // 5: svc.project.v1.UpdateProjectRequest.mutations:type_name -> svc.project.v1.UpdateProjectRequest.Mutation - 13, // 6: svc.project.v1.UpdateProjectResponse.project:type_name -> types.v1.Project - 16, // 7: svc.project.v1.ListProjectRequest.cursor:type_name -> types.v1.Cursor - 16, // 8: svc.project.v1.ListProjectResponse.next:type_name -> types.v1.Cursor - 11, // 9: svc.project.v1.ListProjectResponse.items:type_name -> svc.project.v1.ListProjectResponse.ListItem - 12, // 10: svc.project.v1.UpdateProjectRequest.Mutation.set_pointer:type_name -> types.v1.ProjectPointer - 13, // 11: svc.project.v1.ListProjectResponse.ListItem.project:type_name -> types.v1.Project + 13, // 0: svc.project.v1.CreateProjectRequest.spec:type_name -> types.v1.ProjectSpec + 14, // 1: svc.project.v1.CreateProjectResponse.project:type_name -> types.v1.Project + 14, // 2: svc.project.v1.GetProjectResponse.project:type_name -> types.v1.Project + 15, // 3: svc.project.v1.GetProjectResponse.dashboards:type_name -> types.v1.Dashboard + 16, // 4: svc.project.v1.GetProjectResponse.alert_groups:type_name -> types.v1.AlertGroup + 13, // 5: svc.project.v1.UpdateProjectRequest.spec:type_name -> types.v1.ProjectSpec + 14, // 6: svc.project.v1.UpdateProjectResponse.project:type_name -> types.v1.Project + 17, // 7: svc.project.v1.ListProjectRequest.cursor:type_name -> types.v1.Cursor + 17, // 8: svc.project.v1.ListProjectResponse.next:type_name -> types.v1.Cursor + 12, // 9: svc.project.v1.ListProjectResponse.items:type_name -> svc.project.v1.ListProjectResponse.ListItem + 14, // 10: svc.project.v1.SyncProjectResponse.project:type_name -> types.v1.Project + 14, // 11: svc.project.v1.ListProjectResponse.ListItem.project:type_name -> types.v1.Project 0, // 12: svc.project.v1.ProjectService.CreateProject:input_type -> svc.project.v1.CreateProjectRequest 2, // 13: svc.project.v1.ProjectService.GetProject:input_type -> svc.project.v1.GetProjectRequest 4, // 14: svc.project.v1.ProjectService.UpdateProject:input_type -> svc.project.v1.UpdateProjectRequest 6, // 15: svc.project.v1.ProjectService.DeleteProject:input_type -> svc.project.v1.DeleteProjectRequest 8, // 16: svc.project.v1.ProjectService.ListProject:input_type -> svc.project.v1.ListProjectRequest - 1, // 17: svc.project.v1.ProjectService.CreateProject:output_type -> svc.project.v1.CreateProjectResponse - 3, // 18: svc.project.v1.ProjectService.GetProject:output_type -> svc.project.v1.GetProjectResponse - 5, // 19: svc.project.v1.ProjectService.UpdateProject:output_type -> svc.project.v1.UpdateProjectResponse - 7, // 20: svc.project.v1.ProjectService.DeleteProject:output_type -> svc.project.v1.DeleteProjectResponse - 9, // 21: svc.project.v1.ProjectService.ListProject:output_type -> svc.project.v1.ListProjectResponse - 17, // [17:22] is the sub-list for method output_type - 12, // [12:17] is the sub-list for method input_type + 10, // 17: svc.project.v1.ProjectService.SyncProject:input_type -> svc.project.v1.SyncProjectRequest + 1, // 18: svc.project.v1.ProjectService.CreateProject:output_type -> svc.project.v1.CreateProjectResponse + 3, // 19: svc.project.v1.ProjectService.GetProject:output_type -> svc.project.v1.GetProjectResponse + 5, // 20: svc.project.v1.ProjectService.UpdateProject:output_type -> svc.project.v1.UpdateProjectResponse + 7, // 21: svc.project.v1.ProjectService.DeleteProject:output_type -> svc.project.v1.DeleteProjectResponse + 9, // 22: svc.project.v1.ProjectService.ListProject:output_type -> svc.project.v1.ListProjectResponse + 11, // 23: svc.project.v1.ProjectService.SyncProject:output_type -> svc.project.v1.SyncProjectResponse + 18, // [18:24] is the sub-list for method output_type + 12, // [12:18] is the sub-list for method input_type 12, // [12:12] is the sub-list for extension type_name 12, // [12:12] is the sub-list for extension extendee 0, // [0:12] is the sub-list for field type_name @@ -788,17 +797,13 @@ func file_svc_project_v1_service_proto_init() { if File_svc_project_v1_service_proto != nil { return } - file_svc_project_v1_service_proto_msgTypes[10].OneofWrappers = []any{ - (*UpdateProjectRequest_Mutation_SetName)(nil), - (*UpdateProjectRequest_Mutation_SetPointer)(nil), - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_svc_project_v1_service_proto_rawDesc), len(file_svc_project_v1_service_proto_rawDesc)), NumEnums: 0, - NumMessages: 12, + NumMessages: 13, NumExtensions: 0, NumServices: 1, }, diff --git a/go/types/v1/alert.pb.go b/go/types/v1/alert.pb.go index 2a9799f..6bad7ec 100644 --- a/go/types/v1/alert.pb.go +++ b/go/types/v1/alert.pb.go @@ -25,12 +25,9 @@ const ( type AlertGroup struct { state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Interval *durationpb.Duration `protobuf:"bytes,2,opt,name=interval,proto3" json:"interval,omitempty"` - QueryOffset *durationpb.Duration `protobuf:"bytes,3,opt,name=query_offset,json=queryOffset,proto3" json:"query_offset,omitempty"` - Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - Rules []*AlertRule `protobuf:"bytes,5,rep,name=rules,proto3" json:"rules,omitempty"` - Labels *Obj `protobuf:"bytes,6,opt,name=labels,proto3" json:"labels,omitempty"` + Meta *AlertGroupMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + Spec *AlertGroupSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *AlertGroupStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -65,48 +62,207 @@ func (*AlertGroup) Descriptor() ([]byte, []int) { return file_types_v1_alert_proto_rawDescGZIP(), []int{0} } -func (x *AlertGroup) GetName() string { +func (x *AlertGroup) GetMeta() *AlertGroupMeta { + if x != nil { + return x.Meta + } + return nil +} + +func (x *AlertGroup) GetSpec() *AlertGroupSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *AlertGroup) GetStatus() *AlertGroupStatus { + if x != nil { + return x.Status + } + return nil +} + +type AlertGroupMeta struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AlertGroupMeta) Reset() { + *x = AlertGroupMeta{} + mi := &file_types_v1_alert_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AlertGroupMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AlertGroupMeta) ProtoMessage() {} + +func (x *AlertGroupMeta) ProtoReflect() protoreflect.Message { + mi := &file_types_v1_alert_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 AlertGroupMeta.ProtoReflect.Descriptor instead. +func (*AlertGroupMeta) Descriptor() ([]byte, []int) { + return file_types_v1_alert_proto_rawDescGZIP(), []int{1} +} + +type AlertGroupSpec struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Interval *durationpb.Duration `protobuf:"bytes,2,opt,name=interval,proto3" json:"interval,omitempty"` + QueryOffset *durationpb.Duration `protobuf:"bytes,3,opt,name=query_offset,json=queryOffset,proto3" json:"query_offset,omitempty"` + Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` + Rules []*AlertRule `protobuf:"bytes,5,rep,name=rules,proto3" json:"rules,omitempty"` + Labels *Obj `protobuf:"bytes,6,opt,name=labels,proto3" json:"labels,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AlertGroupSpec) Reset() { + *x = AlertGroupSpec{} + mi := &file_types_v1_alert_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AlertGroupSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AlertGroupSpec) ProtoMessage() {} + +func (x *AlertGroupSpec) ProtoReflect() protoreflect.Message { + mi := &file_types_v1_alert_proto_msgTypes[2] + 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 AlertGroupSpec.ProtoReflect.Descriptor instead. +func (*AlertGroupSpec) Descriptor() ([]byte, []int) { + return file_types_v1_alert_proto_rawDescGZIP(), []int{2} +} + +func (x *AlertGroupSpec) GetName() string { if x != nil { return x.Name } return "" } -func (x *AlertGroup) GetInterval() *durationpb.Duration { +func (x *AlertGroupSpec) GetInterval() *durationpb.Duration { if x != nil { return x.Interval } return nil } -func (x *AlertGroup) GetQueryOffset() *durationpb.Duration { +func (x *AlertGroupSpec) GetQueryOffset() *durationpb.Duration { if x != nil { return x.QueryOffset } return nil } -func (x *AlertGroup) GetLimit() int32 { +func (x *AlertGroupSpec) GetLimit() int32 { if x != nil { return x.Limit } return 0 } -func (x *AlertGroup) GetRules() []*AlertRule { +func (x *AlertGroupSpec) GetRules() []*AlertRule { if x != nil { return x.Rules } return nil } -func (x *AlertGroup) GetLabels() *Obj { +func (x *AlertGroupSpec) GetLabels() *Obj { if x != nil { return x.Labels } return nil } +type AlertGroupStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + Errors []string `protobuf:"bytes,3,rep,name=errors,proto3" json:"errors,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AlertGroupStatus) Reset() { + *x = AlertGroupStatus{} + mi := &file_types_v1_alert_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AlertGroupStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AlertGroupStatus) ProtoMessage() {} + +func (x *AlertGroupStatus) ProtoReflect() protoreflect.Message { + mi := &file_types_v1_alert_proto_msgTypes[3] + 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 AlertGroupStatus.ProtoReflect.Descriptor instead. +func (*AlertGroupStatus) Descriptor() ([]byte, []int) { + return file_types_v1_alert_proto_rawDescGZIP(), []int{3} +} + +func (x *AlertGroupStatus) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *AlertGroupStatus) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +func (x *AlertGroupStatus) GetErrors() []string { + if x != nil { + return x.Errors + } + return nil +} + type AlertRule struct { state protoimpl.MessageState `protogen:"open.v1"` Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` @@ -121,7 +277,7 @@ type AlertRule struct { func (x *AlertRule) Reset() { *x = AlertRule{} - mi := &file_types_v1_alert_proto_msgTypes[1] + mi := &file_types_v1_alert_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -133,7 +289,7 @@ func (x *AlertRule) String() string { func (*AlertRule) ProtoMessage() {} func (x *AlertRule) ProtoReflect() protoreflect.Message { - mi := &file_types_v1_alert_proto_msgTypes[1] + mi := &file_types_v1_alert_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -146,7 +302,7 @@ func (x *AlertRule) ProtoReflect() protoreflect.Message { // Deprecated: Use AlertRule.ProtoReflect.Descriptor instead. func (*AlertRule) Descriptor() ([]byte, []int) { - return file_types_v1_alert_proto_rawDescGZIP(), []int{1} + return file_types_v1_alert_proto_rawDescGZIP(), []int{4} } func (x *AlertRule) GetName() string { @@ -199,7 +355,7 @@ type AlertUnknown struct { func (x *AlertUnknown) Reset() { *x = AlertUnknown{} - mi := &file_types_v1_alert_proto_msgTypes[2] + mi := &file_types_v1_alert_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -211,7 +367,7 @@ func (x *AlertUnknown) String() string { func (*AlertUnknown) ProtoMessage() {} func (x *AlertUnknown) ProtoReflect() protoreflect.Message { - mi := &file_types_v1_alert_proto_msgTypes[2] + mi := &file_types_v1_alert_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -224,7 +380,7 @@ func (x *AlertUnknown) ProtoReflect() protoreflect.Message { // Deprecated: Use AlertUnknown.ProtoReflect.Descriptor instead. func (*AlertUnknown) Descriptor() ([]byte, []int) { - return file_types_v1_alert_proto_rawDescGZIP(), []int{2} + return file_types_v1_alert_proto_rawDescGZIP(), []int{5} } type AlertOk struct { @@ -235,7 +391,7 @@ type AlertOk struct { func (x *AlertOk) Reset() { *x = AlertOk{} - mi := &file_types_v1_alert_proto_msgTypes[3] + mi := &file_types_v1_alert_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -247,7 +403,7 @@ func (x *AlertOk) String() string { func (*AlertOk) ProtoMessage() {} func (x *AlertOk) ProtoReflect() protoreflect.Message { - mi := &file_types_v1_alert_proto_msgTypes[3] + mi := &file_types_v1_alert_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -260,7 +416,7 @@ func (x *AlertOk) ProtoReflect() protoreflect.Message { // Deprecated: Use AlertOk.ProtoReflect.Descriptor instead. func (*AlertOk) Descriptor() ([]byte, []int) { - return file_types_v1_alert_proto_rawDescGZIP(), []int{3} + return file_types_v1_alert_proto_rawDescGZIP(), []int{6} } type AlertPending struct { @@ -271,7 +427,7 @@ type AlertPending struct { func (x *AlertPending) Reset() { *x = AlertPending{} - mi := &file_types_v1_alert_proto_msgTypes[4] + mi := &file_types_v1_alert_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -283,7 +439,7 @@ func (x *AlertPending) String() string { func (*AlertPending) ProtoMessage() {} func (x *AlertPending) ProtoReflect() protoreflect.Message { - mi := &file_types_v1_alert_proto_msgTypes[4] + mi := &file_types_v1_alert_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -296,7 +452,7 @@ func (x *AlertPending) ProtoReflect() protoreflect.Message { // Deprecated: Use AlertPending.ProtoReflect.Descriptor instead. func (*AlertPending) Descriptor() ([]byte, []int) { - return file_types_v1_alert_proto_rawDescGZIP(), []int{4} + return file_types_v1_alert_proto_rawDescGZIP(), []int{7} } type AlertFiring struct { @@ -308,7 +464,7 @@ type AlertFiring struct { func (x *AlertFiring) Reset() { *x = AlertFiring{} - mi := &file_types_v1_alert_proto_msgTypes[5] + mi := &file_types_v1_alert_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -320,7 +476,7 @@ func (x *AlertFiring) String() string { func (*AlertFiring) ProtoMessage() {} func (x *AlertFiring) ProtoReflect() protoreflect.Message { - mi := &file_types_v1_alert_proto_msgTypes[5] + mi := &file_types_v1_alert_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -333,7 +489,7 @@ func (x *AlertFiring) ProtoReflect() protoreflect.Message { // Deprecated: Use AlertFiring.ProtoReflect.Descriptor instead. func (*AlertFiring) Descriptor() ([]byte, []int) { - return file_types_v1_alert_proto_rawDescGZIP(), []int{5} + return file_types_v1_alert_proto_rawDescGZIP(), []int{8} } func (x *AlertFiring) GetLabels() *Obj { @@ -361,7 +517,7 @@ type AlertState struct { func (x *AlertState) Reset() { *x = AlertState{} - mi := &file_types_v1_alert_proto_msgTypes[6] + mi := &file_types_v1_alert_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -373,7 +529,7 @@ func (x *AlertState) String() string { func (*AlertState) ProtoMessage() {} func (x *AlertState) ProtoReflect() protoreflect.Message { - mi := &file_types_v1_alert_proto_msgTypes[6] + mi := &file_types_v1_alert_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -386,7 +542,7 @@ func (x *AlertState) ProtoReflect() protoreflect.Message { // Deprecated: Use AlertState.ProtoReflect.Descriptor instead. func (*AlertState) Descriptor() ([]byte, []int) { - return file_types_v1_alert_proto_rawDescGZIP(), []int{6} + return file_types_v1_alert_proto_rawDescGZIP(), []int{9} } func (x *AlertState) GetRule() *AlertRule { @@ -485,15 +641,26 @@ var File_types_v1_alert_proto protoreflect.FileDescriptor const file_types_v1_alert_proto_rawDesc = "" + "\n" + - "\x14types/v1/alert.proto\x12\btypes.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x14types/v1/query.proto\x1a\x14types/v1/types.proto\"\xfd\x01\n" + + "\x14types/v1/alert.proto\x12\btypes.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x14types/v1/query.proto\x1a\x14types/v1/types.proto\"\x9c\x01\n" + "\n" + - "AlertGroup\x12\x12\n" + + "AlertGroup\x12,\n" + + "\x04meta\x18\x01 \x01(\v2\x18.types.v1.AlertGroupMetaR\x04meta\x12,\n" + + "\x04spec\x18\x02 \x01(\v2\x18.types.v1.AlertGroupSpecR\x04spec\x122\n" + + "\x06status\x18\x03 \x01(\v2\x1a.types.v1.AlertGroupStatusR\x06status\"\x10\n" + + "\x0eAlertGroupMeta\"\x81\x02\n" + + "\x0eAlertGroupSpec\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x125\n" + "\binterval\x18\x02 \x01(\v2\x19.google.protobuf.DurationR\binterval\x12<\n" + "\fquery_offset\x18\x03 \x01(\v2\x19.google.protobuf.DurationR\vqueryOffset\x12\x14\n" + "\x05limit\x18\x04 \x01(\x05R\x05limit\x12)\n" + "\x05rules\x18\x05 \x03(\v2\x13.types.v1.AlertRuleR\x05rules\x12%\n" + - "\x06labels\x18\x06 \x01(\v2\r.types.v1.ObjR\x06labels\"\x8c\x02\n" + + "\x06labels\x18\x06 \x01(\v2\r.types.v1.ObjR\x06labels\"\xa0\x01\n" + + "\x10AlertGroupStatus\x129\n" + + "\n" + + "created_at\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x16\n" + + "\x06errors\x18\x03 \x03(\tR\x06errors\"\x8c\x02\n" + "\tAlertRule\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x12#\n" + "\x04expr\x18\x02 \x01(\v2\x0f.types.v1.QueryR\x04expr\x12%\n" + @@ -531,43 +698,51 @@ func file_types_v1_alert_proto_rawDescGZIP() []byte { return file_types_v1_alert_proto_rawDescData } -var file_types_v1_alert_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_types_v1_alert_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_types_v1_alert_proto_goTypes = []any{ (*AlertGroup)(nil), // 0: types.v1.AlertGroup - (*AlertRule)(nil), // 1: types.v1.AlertRule - (*AlertUnknown)(nil), // 2: types.v1.AlertUnknown - (*AlertOk)(nil), // 3: types.v1.AlertOk - (*AlertPending)(nil), // 4: types.v1.AlertPending - (*AlertFiring)(nil), // 5: types.v1.AlertFiring - (*AlertState)(nil), // 6: types.v1.AlertState - (*durationpb.Duration)(nil), // 7: google.protobuf.Duration - (*Obj)(nil), // 8: types.v1.Obj - (*Query)(nil), // 9: types.v1.Query - (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp + (*AlertGroupMeta)(nil), // 1: types.v1.AlertGroupMeta + (*AlertGroupSpec)(nil), // 2: types.v1.AlertGroupSpec + (*AlertGroupStatus)(nil), // 3: types.v1.AlertGroupStatus + (*AlertRule)(nil), // 4: types.v1.AlertRule + (*AlertUnknown)(nil), // 5: types.v1.AlertUnknown + (*AlertOk)(nil), // 6: types.v1.AlertOk + (*AlertPending)(nil), // 7: types.v1.AlertPending + (*AlertFiring)(nil), // 8: types.v1.AlertFiring + (*AlertState)(nil), // 9: types.v1.AlertState + (*durationpb.Duration)(nil), // 10: google.protobuf.Duration + (*Obj)(nil), // 11: types.v1.Obj + (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp + (*Query)(nil), // 13: types.v1.Query } var file_types_v1_alert_proto_depIdxs = []int32{ - 7, // 0: types.v1.AlertGroup.interval:type_name -> google.protobuf.Duration - 7, // 1: types.v1.AlertGroup.query_offset:type_name -> google.protobuf.Duration - 1, // 2: types.v1.AlertGroup.rules:type_name -> types.v1.AlertRule - 8, // 3: types.v1.AlertGroup.labels:type_name -> types.v1.Obj - 9, // 4: types.v1.AlertRule.expr:type_name -> types.v1.Query - 8, // 5: types.v1.AlertRule.labels:type_name -> types.v1.Obj - 8, // 6: types.v1.AlertRule.annotations:type_name -> types.v1.Obj - 7, // 7: types.v1.AlertRule.for:type_name -> google.protobuf.Duration - 7, // 8: types.v1.AlertRule.keep_firing_for:type_name -> google.protobuf.Duration - 8, // 9: types.v1.AlertFiring.labels:type_name -> types.v1.Obj - 1, // 10: types.v1.AlertState.rule:type_name -> types.v1.AlertRule - 2, // 11: types.v1.AlertState.unknown:type_name -> types.v1.AlertUnknown - 3, // 12: types.v1.AlertState.ok:type_name -> types.v1.AlertOk - 4, // 13: types.v1.AlertState.pending:type_name -> types.v1.AlertPending - 5, // 14: types.v1.AlertState.firing:type_name -> types.v1.AlertFiring - 10, // 15: types.v1.AlertState.transitioned_at:type_name -> google.protobuf.Timestamp - 10, // 16: types.v1.AlertState.last_firing_at:type_name -> google.protobuf.Timestamp - 17, // [17:17] is the sub-list for method output_type - 17, // [17:17] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name + 1, // 0: types.v1.AlertGroup.meta:type_name -> types.v1.AlertGroupMeta + 2, // 1: types.v1.AlertGroup.spec:type_name -> types.v1.AlertGroupSpec + 3, // 2: types.v1.AlertGroup.status:type_name -> types.v1.AlertGroupStatus + 10, // 3: types.v1.AlertGroupSpec.interval:type_name -> google.protobuf.Duration + 10, // 4: types.v1.AlertGroupSpec.query_offset:type_name -> google.protobuf.Duration + 4, // 5: types.v1.AlertGroupSpec.rules:type_name -> types.v1.AlertRule + 11, // 6: types.v1.AlertGroupSpec.labels:type_name -> types.v1.Obj + 12, // 7: types.v1.AlertGroupStatus.created_at:type_name -> google.protobuf.Timestamp + 12, // 8: types.v1.AlertGroupStatus.updated_at:type_name -> google.protobuf.Timestamp + 13, // 9: types.v1.AlertRule.expr:type_name -> types.v1.Query + 11, // 10: types.v1.AlertRule.labels:type_name -> types.v1.Obj + 11, // 11: types.v1.AlertRule.annotations:type_name -> types.v1.Obj + 10, // 12: types.v1.AlertRule.for:type_name -> google.protobuf.Duration + 10, // 13: types.v1.AlertRule.keep_firing_for:type_name -> google.protobuf.Duration + 11, // 14: types.v1.AlertFiring.labels:type_name -> types.v1.Obj + 4, // 15: types.v1.AlertState.rule:type_name -> types.v1.AlertRule + 5, // 16: types.v1.AlertState.unknown:type_name -> types.v1.AlertUnknown + 6, // 17: types.v1.AlertState.ok:type_name -> types.v1.AlertOk + 7, // 18: types.v1.AlertState.pending:type_name -> types.v1.AlertPending + 8, // 19: types.v1.AlertState.firing:type_name -> types.v1.AlertFiring + 12, // 20: types.v1.AlertState.transitioned_at:type_name -> google.protobuf.Timestamp + 12, // 21: types.v1.AlertState.last_firing_at:type_name -> google.protobuf.Timestamp + 22, // [22:22] is the sub-list for method output_type + 22, // [22:22] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name } func init() { file_types_v1_alert_proto_init() } @@ -577,7 +752,7 @@ func file_types_v1_alert_proto_init() { } file_types_v1_query_proto_init() file_types_v1_types_proto_init() - file_types_v1_alert_proto_msgTypes[6].OneofWrappers = []any{ + file_types_v1_alert_proto_msgTypes[9].OneofWrappers = []any{ (*AlertState_Unknown)(nil), (*AlertState_Ok)(nil), (*AlertState_Pending)(nil), @@ -589,7 +764,7 @@ func file_types_v1_alert_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_types_v1_alert_proto_rawDesc), len(file_types_v1_alert_proto_rawDesc)), NumEnums: 0, - NumMessages: 7, + NumMessages: 10, NumExtensions: 0, NumServices: 0, }, diff --git a/go/types/v1/dashboard.pb.go b/go/types/v1/dashboard.pb.go index f2bf094..28ee2a7 100644 --- a/go/types/v1/dashboard.pb.go +++ b/go/types/v1/dashboard.pb.go @@ -23,18 +23,10 @@ const ( ) type Dashboard struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,100,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,200,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,201,opt,name=description,proto3" json:"description,omitempty"` - IsReadonly bool `protobuf:"varint,202,opt,name=is_readonly,json=isReadonly,proto3" json:"is_readonly,omitempty"` - // Types that are valid to be assigned to Source: - // - // *Dashboard_File - Source isDashboard_Source `protobuf_oneof:"source"` - PersesJson []byte `protobuf:"bytes,300,opt,name=perses_json,json=persesJson,proto3" json:"perses_json,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,400,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,401,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Meta *DashboardMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + Spec *DashboardSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *DashboardSpec `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -69,100 +61,255 @@ func (*Dashboard) Descriptor() ([]byte, []int) { return file_types_v1_dashboard_proto_rawDescGZIP(), []int{0} } -func (x *Dashboard) GetId() string { +func (x *Dashboard) GetMeta() *DashboardMeta { + if x != nil { + return x.Meta + } + return nil +} + +func (x *Dashboard) GetSpec() *DashboardSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Dashboard) GetStatus() *DashboardSpec { + if x != nil { + return x.Status + } + return nil +} + +type DashboardMeta struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DashboardMeta) Reset() { + *x = DashboardMeta{} + mi := &file_types_v1_dashboard_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DashboardMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DashboardMeta) ProtoMessage() {} + +func (x *DashboardMeta) ProtoReflect() protoreflect.Message { + mi := &file_types_v1_dashboard_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 DashboardMeta.ProtoReflect.Descriptor instead. +func (*DashboardMeta) Descriptor() ([]byte, []int) { + return file_types_v1_dashboard_proto_rawDescGZIP(), []int{1} +} + +func (x *DashboardMeta) GetId() string { if x != nil { return x.Id } return "" } -func (x *Dashboard) GetName() string { +type DashboardSpec struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + IsReadonly bool `protobuf:"varint,3,opt,name=is_readonly,json=isReadonly,proto3" json:"is_readonly,omitempty"` + // Types that are valid to be assigned to Source: + // + // *DashboardSpec_File + Source isDashboardSpec_Source `protobuf_oneof:"source"` + PersesJson []byte `protobuf:"bytes,5,opt,name=perses_json,json=persesJson,proto3" json:"perses_json,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DashboardSpec) Reset() { + *x = DashboardSpec{} + mi := &file_types_v1_dashboard_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DashboardSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DashboardSpec) ProtoMessage() {} + +func (x *DashboardSpec) ProtoReflect() protoreflect.Message { + mi := &file_types_v1_dashboard_proto_msgTypes[2] + 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 DashboardSpec.ProtoReflect.Descriptor instead. +func (*DashboardSpec) Descriptor() ([]byte, []int) { + return file_types_v1_dashboard_proto_rawDescGZIP(), []int{2} +} + +func (x *DashboardSpec) GetName() string { if x != nil { return x.Name } return "" } -func (x *Dashboard) GetDescription() string { +func (x *DashboardSpec) GetDescription() string { if x != nil { return x.Description } return "" } -func (x *Dashboard) GetIsReadonly() bool { +func (x *DashboardSpec) GetIsReadonly() bool { if x != nil { return x.IsReadonly } return false } -func (x *Dashboard) GetSource() isDashboard_Source { +func (x *DashboardSpec) GetSource() isDashboardSpec_Source { if x != nil { return x.Source } return nil } -func (x *Dashboard) GetFile() string { +func (x *DashboardSpec) GetFile() string { if x != nil { - if x, ok := x.Source.(*Dashboard_File); ok { + if x, ok := x.Source.(*DashboardSpec_File); ok { return x.File } } return "" } -func (x *Dashboard) GetPersesJson() []byte { +func (x *DashboardSpec) GetPersesJson() []byte { if x != nil { return x.PersesJson } return nil } -func (x *Dashboard) GetCreatedAt() *timestamppb.Timestamp { +type isDashboardSpec_Source interface { + isDashboardSpec_Source() +} + +type DashboardSpec_File struct { + File string `protobuf:"bytes,401,opt,name=file,proto3,oneof"` +} + +func (*DashboardSpec_File) isDashboardSpec_Source() {} + +type DashboardStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + Errors []string `protobuf:"bytes,3,rep,name=errors,proto3" json:"errors,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DashboardStatus) Reset() { + *x = DashboardStatus{} + mi := &file_types_v1_dashboard_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DashboardStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DashboardStatus) ProtoMessage() {} + +func (x *DashboardStatus) ProtoReflect() protoreflect.Message { + mi := &file_types_v1_dashboard_proto_msgTypes[3] + 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 DashboardStatus.ProtoReflect.Descriptor instead. +func (*DashboardStatus) Descriptor() ([]byte, []int) { + return file_types_v1_dashboard_proto_rawDescGZIP(), []int{3} +} + +func (x *DashboardStatus) GetCreatedAt() *timestamppb.Timestamp { if x != nil { return x.CreatedAt } return nil } -func (x *Dashboard) GetUpdatedAt() *timestamppb.Timestamp { +func (x *DashboardStatus) GetUpdatedAt() *timestamppb.Timestamp { if x != nil { return x.UpdatedAt } return nil } -type isDashboard_Source interface { - isDashboard_Source() -} - -type Dashboard_File struct { - File string `protobuf:"bytes,203,opt,name=file,proto3,oneof"` +func (x *DashboardStatus) GetErrors() []string { + if x != nil { + return x.Errors + } + return nil } -func (*Dashboard_File) isDashboard_Source() {} - var File_types_v1_dashboard_proto protoreflect.FileDescriptor const file_types_v1_dashboard_proto_rawDesc = "" + "\n" + - "\x18types/v1/dashboard.proto\x12\btypes.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb0\x02\n" + - "\tDashboard\x12\x0e\n" + - "\x02id\x18d \x01(\tR\x02id\x12\x13\n" + - "\x04name\x18\xc8\x01 \x01(\tR\x04name\x12!\n" + - "\vdescription\x18\xc9\x01 \x01(\tR\vdescription\x12 \n" + - "\vis_readonly\x18\xca\x01 \x01(\bR\n" + + "\x18types/v1/dashboard.proto\x12\btypes.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x96\x01\n" + + "\tDashboard\x12+\n" + + "\x04meta\x18\x01 \x01(\v2\x17.types.v1.DashboardMetaR\x04meta\x12+\n" + + "\x04spec\x18\x02 \x01(\v2\x17.types.v1.DashboardSpecR\x04spec\x12/\n" + + "\x06status\x18\x03 \x01(\v2\x17.types.v1.DashboardSpecR\x06status\"\x1f\n" + + "\rDashboardMeta\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"\xa8\x01\n" + + "\rDashboardSpec\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12 \n" + + "\vdescription\x18\x02 \x01(\tR\vdescription\x12\x1f\n" + + "\vis_readonly\x18\x03 \x01(\bR\n" + "isReadonly\x12\x15\n" + - "\x04file\x18\xcb\x01 \x01(\tH\x00R\x04file\x12 \n" + - "\vperses_json\x18\xac\x02 \x01(\fR\n" + - "persesJson\x12:\n" + + "\x04file\x18\x91\x03 \x01(\tH\x00R\x04file\x12\x1f\n" + + "\vperses_json\x18\x05 \x01(\fR\n" + + "persesJsonB\b\n" + + "\x06source\"\x9f\x01\n" + + "\x0fDashboardStatus\x129\n" + "\n" + - "created_at\x18\x90\x03 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12:\n" + + "created_at\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + "\n" + - "updated_at\x18\x91\x03 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAtB\b\n" + - "\x06sourceB\x8e\x01\n" + + "updated_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x16\n" + + "\x06errors\x18\x03 \x03(\tR\x06errorsB\x8e\x01\n" + "\fcom.types.v1B\x0eDashboardProtoP\x01Z-github.com/humanlogio/api/go/types/v1;typesv1\xa2\x02\x03TXX\xaa\x02\bTypes.V1\xca\x02\bTypes\\V1\xe2\x02\x14Types\\V1\\GPBMetadata\xea\x02\tTypes::V1b\x06proto3" var ( @@ -177,19 +324,25 @@ func file_types_v1_dashboard_proto_rawDescGZIP() []byte { return file_types_v1_dashboard_proto_rawDescData } -var file_types_v1_dashboard_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_types_v1_dashboard_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_types_v1_dashboard_proto_goTypes = []any{ (*Dashboard)(nil), // 0: types.v1.Dashboard - (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp + (*DashboardMeta)(nil), // 1: types.v1.DashboardMeta + (*DashboardSpec)(nil), // 2: types.v1.DashboardSpec + (*DashboardStatus)(nil), // 3: types.v1.DashboardStatus + (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp } var file_types_v1_dashboard_proto_depIdxs = []int32{ - 1, // 0: types.v1.Dashboard.created_at:type_name -> google.protobuf.Timestamp - 1, // 1: types.v1.Dashboard.updated_at:type_name -> google.protobuf.Timestamp - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 1, // 0: types.v1.Dashboard.meta:type_name -> types.v1.DashboardMeta + 2, // 1: types.v1.Dashboard.spec:type_name -> types.v1.DashboardSpec + 2, // 2: types.v1.Dashboard.status:type_name -> types.v1.DashboardSpec + 4, // 3: types.v1.DashboardStatus.created_at:type_name -> google.protobuf.Timestamp + 4, // 4: types.v1.DashboardStatus.updated_at:type_name -> google.protobuf.Timestamp + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] 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_types_v1_dashboard_proto_init() } @@ -197,8 +350,8 @@ func file_types_v1_dashboard_proto_init() { if File_types_v1_dashboard_proto != nil { return } - file_types_v1_dashboard_proto_msgTypes[0].OneofWrappers = []any{ - (*Dashboard_File)(nil), + file_types_v1_dashboard_proto_msgTypes[2].OneofWrappers = []any{ + (*DashboardSpec_File)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -206,7 +359,7 @@ func file_types_v1_dashboard_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_types_v1_dashboard_proto_rawDesc), len(file_types_v1_dashboard_proto_rawDesc)), NumEnums: 0, - NumMessages: 1, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/go/types/v1/project.pb.go b/go/types/v1/project.pb.go index 48d44ca..d6f0270 100644 --- a/go/types/v1/project.pb.go +++ b/go/types/v1/project.pb.go @@ -23,32 +23,29 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type ProjectPointer struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Scheme: - // - // *ProjectPointer_Remote - // *ProjectPointer_Localhost - // *ProjectPointer_Db - Scheme isProjectPointer_Scheme `protobuf_oneof:"scheme"` +type Project struct { + state protoimpl.MessageState `protogen:"open.v1"` + Meta *ProjectMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + Spec *ProjectSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + Status *ProjectStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *ProjectPointer) Reset() { - *x = ProjectPointer{} +func (x *Project) Reset() { + *x = Project{} mi := &file_types_v1_project_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ProjectPointer) String() string { +func (x *Project) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ProjectPointer) ProtoMessage() {} +func (*Project) ProtoMessage() {} -func (x *ProjectPointer) ProtoReflect() protoreflect.Message { +func (x *Project) ProtoReflect() protoreflect.Message { mi := &file_types_v1_project_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60,92 +57,99 @@ func (x *ProjectPointer) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ProjectPointer.ProtoReflect.Descriptor instead. -func (*ProjectPointer) Descriptor() ([]byte, []int) { +// Deprecated: Use Project.ProtoReflect.Descriptor instead. +func (*Project) Descriptor() ([]byte, []int) { return file_types_v1_project_proto_rawDescGZIP(), []int{0} } -func (x *ProjectPointer) GetScheme() isProjectPointer_Scheme { +func (x *Project) GetMeta() *ProjectMeta { if x != nil { - return x.Scheme + return x.Meta } return nil } -func (x *ProjectPointer) GetRemote() *ProjectPointer_RemoteGit { +func (x *Project) GetSpec() *ProjectSpec { if x != nil { - if x, ok := x.Scheme.(*ProjectPointer_Remote); ok { - return x.Remote - } + return x.Spec } return nil } -func (x *ProjectPointer) GetLocalhost() *ProjectPointer_LocalGit { +func (x *Project) GetStatus() *ProjectStatus { if x != nil { - if x, ok := x.Scheme.(*ProjectPointer_Localhost); ok { - return x.Localhost - } + return x.Status } return nil } -func (x *ProjectPointer) GetDb() *ProjectPointer_Virtual { - if x != nil { - if x, ok := x.Scheme.(*ProjectPointer_Db); ok { - return x.Db - } - } - return nil +type ProjectMeta struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -type isProjectPointer_Scheme interface { - isProjectPointer_Scheme() +func (x *ProjectMeta) Reset() { + *x = ProjectMeta{} + mi := &file_types_v1_project_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -type ProjectPointer_Remote struct { - Remote *ProjectPointer_RemoteGit `protobuf:"bytes,1,opt,name=remote,proto3,oneof"` +func (x *ProjectMeta) String() string { + return protoimpl.X.MessageStringOf(x) } -type ProjectPointer_Localhost struct { - Localhost *ProjectPointer_LocalGit `protobuf:"bytes,2,opt,name=localhost,proto3,oneof"` -} +func (*ProjectMeta) ProtoMessage() {} -type ProjectPointer_Db struct { - Db *ProjectPointer_Virtual `protobuf:"bytes,3,opt,name=db,proto3,oneof"` +func (x *ProjectMeta) ProtoReflect() protoreflect.Message { + mi := &file_types_v1_project_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) } -func (*ProjectPointer_Remote) isProjectPointer_Scheme() {} - -func (*ProjectPointer_Localhost) isProjectPointer_Scheme() {} +// Deprecated: Use ProjectMeta.ProtoReflect.Descriptor instead. +func (*ProjectMeta) Descriptor() ([]byte, []int) { + return file_types_v1_project_proto_rawDescGZIP(), []int{1} +} -func (*ProjectPointer_Db) isProjectPointer_Scheme() {} +func (x *ProjectMeta) GetId() string { + if x != nil { + return x.Id + } + return "" +} -type Project struct { +type ProjectSpec struct { state protoimpl.MessageState `protogen:"open.v1"` Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Pointer *ProjectPointer `protobuf:"bytes,2,opt,name=pointer,proto3" json:"pointer,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,300,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,301,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *Project) Reset() { - *x = Project{} - mi := &file_types_v1_project_proto_msgTypes[1] +func (x *ProjectSpec) Reset() { + *x = ProjectSpec{} + mi := &file_types_v1_project_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *Project) String() string { +func (x *ProjectSpec) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Project) ProtoMessage() {} +func (*ProjectSpec) ProtoMessage() {} -func (x *Project) ProtoReflect() protoreflect.Message { - mi := &file_types_v1_project_proto_msgTypes[1] +func (x *ProjectSpec) ProtoReflect() protoreflect.Message { + mi := &file_types_v1_project_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -156,39 +160,175 @@ func (x *Project) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Project.ProtoReflect.Descriptor instead. -func (*Project) Descriptor() ([]byte, []int) { - return file_types_v1_project_proto_rawDescGZIP(), []int{1} +// Deprecated: Use ProjectSpec.ProtoReflect.Descriptor instead. +func (*ProjectSpec) Descriptor() ([]byte, []int) { + return file_types_v1_project_proto_rawDescGZIP(), []int{2} } -func (x *Project) GetName() string { +func (x *ProjectSpec) GetName() string { if x != nil { return x.Name } return "" } -func (x *Project) GetPointer() *ProjectPointer { +func (x *ProjectSpec) GetPointer() *ProjectPointer { if x != nil { return x.Pointer } return nil } -func (x *Project) GetCreatedAt() *timestamppb.Timestamp { +type ProjectStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ProjectStatus) Reset() { + *x = ProjectStatus{} + mi := &file_types_v1_project_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ProjectStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProjectStatus) ProtoMessage() {} + +func (x *ProjectStatus) ProtoReflect() protoreflect.Message { + mi := &file_types_v1_project_proto_msgTypes[3] + 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 ProjectStatus.ProtoReflect.Descriptor instead. +func (*ProjectStatus) Descriptor() ([]byte, []int) { + return file_types_v1_project_proto_rawDescGZIP(), []int{3} +} + +func (x *ProjectStatus) GetCreatedAt() *timestamppb.Timestamp { if x != nil { return x.CreatedAt } return nil } -func (x *Project) GetUpdatedAt() *timestamppb.Timestamp { +func (x *ProjectStatus) GetUpdatedAt() *timestamppb.Timestamp { if x != nil { return x.UpdatedAt } return nil } +type ProjectPointer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Scheme: + // + // *ProjectPointer_Remote + // *ProjectPointer_Localhost + // *ProjectPointer_Db + Scheme isProjectPointer_Scheme `protobuf_oneof:"scheme"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ProjectPointer) Reset() { + *x = ProjectPointer{} + mi := &file_types_v1_project_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ProjectPointer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProjectPointer) ProtoMessage() {} + +func (x *ProjectPointer) ProtoReflect() protoreflect.Message { + mi := &file_types_v1_project_proto_msgTypes[4] + 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 ProjectPointer.ProtoReflect.Descriptor instead. +func (*ProjectPointer) Descriptor() ([]byte, []int) { + return file_types_v1_project_proto_rawDescGZIP(), []int{4} +} + +func (x *ProjectPointer) GetScheme() isProjectPointer_Scheme { + if x != nil { + return x.Scheme + } + return nil +} + +func (x *ProjectPointer) GetRemote() *ProjectPointer_RemoteGit { + if x != nil { + if x, ok := x.Scheme.(*ProjectPointer_Remote); ok { + return x.Remote + } + } + return nil +} + +func (x *ProjectPointer) GetLocalhost() *ProjectPointer_LocalGit { + if x != nil { + if x, ok := x.Scheme.(*ProjectPointer_Localhost); ok { + return x.Localhost + } + } + return nil +} + +func (x *ProjectPointer) GetDb() *ProjectPointer_Virtual { + if x != nil { + if x, ok := x.Scheme.(*ProjectPointer_Db); ok { + return x.Db + } + } + return nil +} + +type isProjectPointer_Scheme interface { + isProjectPointer_Scheme() +} + +type ProjectPointer_Remote struct { + Remote *ProjectPointer_RemoteGit `protobuf:"bytes,1,opt,name=remote,proto3,oneof"` +} + +type ProjectPointer_Localhost struct { + Localhost *ProjectPointer_LocalGit `protobuf:"bytes,2,opt,name=localhost,proto3,oneof"` +} + +type ProjectPointer_Db struct { + Db *ProjectPointer_Virtual `protobuf:"bytes,3,opt,name=db,proto3,oneof"` +} + +func (*ProjectPointer_Remote) isProjectPointer_Scheme() {} + +func (*ProjectPointer_Localhost) isProjectPointer_Scheme() {} + +func (*ProjectPointer_Db) isProjectPointer_Scheme() {} + type ProjectPointer_RemoteGit struct { state protoimpl.MessageState `protogen:"open.v1"` RemoteUrl string `protobuf:"bytes,1,opt,name=remote_url,json=remoteUrl,proto3" json:"remote_url,omitempty"` @@ -201,7 +341,7 @@ type ProjectPointer_RemoteGit struct { func (x *ProjectPointer_RemoteGit) Reset() { *x = ProjectPointer_RemoteGit{} - mi := &file_types_v1_project_proto_msgTypes[2] + mi := &file_types_v1_project_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -213,7 +353,7 @@ func (x *ProjectPointer_RemoteGit) String() string { func (*ProjectPointer_RemoteGit) ProtoMessage() {} func (x *ProjectPointer_RemoteGit) ProtoReflect() protoreflect.Message { - mi := &file_types_v1_project_proto_msgTypes[2] + mi := &file_types_v1_project_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -226,7 +366,7 @@ func (x *ProjectPointer_RemoteGit) ProtoReflect() protoreflect.Message { // Deprecated: Use ProjectPointer_RemoteGit.ProtoReflect.Descriptor instead. func (*ProjectPointer_RemoteGit) Descriptor() ([]byte, []int) { - return file_types_v1_project_proto_rawDescGZIP(), []int{0, 0} + return file_types_v1_project_proto_rawDescGZIP(), []int{4, 0} } func (x *ProjectPointer_RemoteGit) GetRemoteUrl() string { @@ -269,7 +409,7 @@ type ProjectPointer_LocalGit struct { func (x *ProjectPointer_LocalGit) Reset() { *x = ProjectPointer_LocalGit{} - mi := &file_types_v1_project_proto_msgTypes[3] + mi := &file_types_v1_project_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -281,7 +421,7 @@ func (x *ProjectPointer_LocalGit) String() string { func (*ProjectPointer_LocalGit) ProtoMessage() {} func (x *ProjectPointer_LocalGit) ProtoReflect() protoreflect.Message { - mi := &file_types_v1_project_proto_msgTypes[3] + mi := &file_types_v1_project_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -294,7 +434,7 @@ func (x *ProjectPointer_LocalGit) ProtoReflect() protoreflect.Message { // Deprecated: Use ProjectPointer_LocalGit.ProtoReflect.Descriptor instead. func (*ProjectPointer_LocalGit) Descriptor() ([]byte, []int) { - return file_types_v1_project_proto_rawDescGZIP(), []int{0, 1} + return file_types_v1_project_proto_rawDescGZIP(), []int{4, 1} } func (x *ProjectPointer_LocalGit) GetPath() string { @@ -334,7 +474,7 @@ type ProjectPointer_Virtual struct { func (x *ProjectPointer_Virtual) Reset() { *x = ProjectPointer_Virtual{} - mi := &file_types_v1_project_proto_msgTypes[4] + mi := &file_types_v1_project_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -346,7 +486,7 @@ func (x *ProjectPointer_Virtual) String() string { func (*ProjectPointer_Virtual) ProtoMessage() {} func (x *ProjectPointer_Virtual) ProtoReflect() protoreflect.Message { - mi := &file_types_v1_project_proto_msgTypes[4] + mi := &file_types_v1_project_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -359,7 +499,7 @@ func (x *ProjectPointer_Virtual) ProtoReflect() protoreflect.Message { // Deprecated: Use ProjectPointer_Virtual.ProtoReflect.Descriptor instead. func (*ProjectPointer_Virtual) Descriptor() ([]byte, []int) { - return file_types_v1_project_proto_rawDescGZIP(), []int{0, 2} + return file_types_v1_project_proto_rawDescGZIP(), []int{4, 2} } func (x *ProjectPointer_Virtual) GetUri() string { @@ -373,7 +513,21 @@ var File_types_v1_project_proto protoreflect.FileDescriptor const file_types_v1_project_proto_rawDesc = "" + "\n" + - "\x16types/v1/project.proto\x12\btypes.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xeb\x03\n" + + "\x16types/v1/project.proto\x12\btypes.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x90\x01\n" + + "\aProject\x12)\n" + + "\x04meta\x18\x01 \x01(\v2\x15.types.v1.ProjectMetaR\x04meta\x12)\n" + + "\x04spec\x18\x02 \x01(\v2\x15.types.v1.ProjectSpecR\x04spec\x12/\n" + + "\x06status\x18\x03 \x01(\v2\x17.types.v1.ProjectStatusR\x06status\"\x1d\n" + + "\vProjectMeta\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"U\n" + + "\vProjectSpec\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x122\n" + + "\apointer\x18\x02 \x01(\v2\x18.types.v1.ProjectPointerR\apointer\"\x85\x01\n" + + "\rProjectStatus\x129\n" + + "\n" + + "created_at\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"\xeb\x03\n" + "\x0eProjectPointer\x12<\n" + "\x06remote\x18\x01 \x01(\v2\".types.v1.ProjectPointer.RemoteGitH\x00R\x06remote\x12A\n" + "\tlocalhost\x18\x02 \x01(\v2!.types.v1.ProjectPointer.LocalGitH\x00R\tlocalhost\x122\n" + @@ -391,14 +545,7 @@ const file_types_v1_project_proto_rawDesc = "" + "\tread_only\x18\x04 \x01(\bR\breadOnly\x1a\x1b\n" + "\aVirtual\x12\x10\n" + "\x03uri\x18\x01 \x01(\tR\x03uriB\b\n" + - "\x06scheme\"\xc9\x01\n" + - "\aProject\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x122\n" + - "\apointer\x18\x02 \x01(\v2\x18.types.v1.ProjectPointerR\apointer\x12:\n" + - "\n" + - "created_at\x18\xac\x02 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12:\n" + - "\n" + - "updated_at\x18\xad\x02 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAtB\x8c\x01\n" + + "\x06schemeB\x8c\x01\n" + "\fcom.types.v1B\fProjectProtoP\x01Z-github.com/humanlogio/api/go/types/v1;typesv1\xa2\x02\x03TXX\xaa\x02\bTypes.V1\xca\x02\bTypes\\V1\xe2\x02\x14Types\\V1\\GPBMetadata\xea\x02\tTypes::V1b\x06proto3" var ( @@ -413,27 +560,33 @@ func file_types_v1_project_proto_rawDescGZIP() []byte { return file_types_v1_project_proto_rawDescData } -var file_types_v1_project_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_types_v1_project_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_types_v1_project_proto_goTypes = []any{ - (*ProjectPointer)(nil), // 0: types.v1.ProjectPointer - (*Project)(nil), // 1: types.v1.Project - (*ProjectPointer_RemoteGit)(nil), // 2: types.v1.ProjectPointer.RemoteGit - (*ProjectPointer_LocalGit)(nil), // 3: types.v1.ProjectPointer.LocalGit - (*ProjectPointer_Virtual)(nil), // 4: types.v1.ProjectPointer.Virtual - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp + (*Project)(nil), // 0: types.v1.Project + (*ProjectMeta)(nil), // 1: types.v1.ProjectMeta + (*ProjectSpec)(nil), // 2: types.v1.ProjectSpec + (*ProjectStatus)(nil), // 3: types.v1.ProjectStatus + (*ProjectPointer)(nil), // 4: types.v1.ProjectPointer + (*ProjectPointer_RemoteGit)(nil), // 5: types.v1.ProjectPointer.RemoteGit + (*ProjectPointer_LocalGit)(nil), // 6: types.v1.ProjectPointer.LocalGit + (*ProjectPointer_Virtual)(nil), // 7: types.v1.ProjectPointer.Virtual + (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp } var file_types_v1_project_proto_depIdxs = []int32{ - 2, // 0: types.v1.ProjectPointer.remote:type_name -> types.v1.ProjectPointer.RemoteGit - 3, // 1: types.v1.ProjectPointer.localhost:type_name -> types.v1.ProjectPointer.LocalGit - 4, // 2: types.v1.ProjectPointer.db:type_name -> types.v1.ProjectPointer.Virtual - 0, // 3: types.v1.Project.pointer:type_name -> types.v1.ProjectPointer - 5, // 4: types.v1.Project.created_at:type_name -> google.protobuf.Timestamp - 5, // 5: types.v1.Project.updated_at:type_name -> google.protobuf.Timestamp - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 1, // 0: types.v1.Project.meta:type_name -> types.v1.ProjectMeta + 2, // 1: types.v1.Project.spec:type_name -> types.v1.ProjectSpec + 3, // 2: types.v1.Project.status:type_name -> types.v1.ProjectStatus + 4, // 3: types.v1.ProjectSpec.pointer:type_name -> types.v1.ProjectPointer + 8, // 4: types.v1.ProjectStatus.created_at:type_name -> google.protobuf.Timestamp + 8, // 5: types.v1.ProjectStatus.updated_at:type_name -> google.protobuf.Timestamp + 5, // 6: types.v1.ProjectPointer.remote:type_name -> types.v1.ProjectPointer.RemoteGit + 6, // 7: types.v1.ProjectPointer.localhost:type_name -> types.v1.ProjectPointer.LocalGit + 7, // 8: types.v1.ProjectPointer.db:type_name -> types.v1.ProjectPointer.Virtual + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_types_v1_project_proto_init() } @@ -441,7 +594,7 @@ func file_types_v1_project_proto_init() { if File_types_v1_project_proto != nil { return } - file_types_v1_project_proto_msgTypes[0].OneofWrappers = []any{ + file_types_v1_project_proto_msgTypes[4].OneofWrappers = []any{ (*ProjectPointer_Remote)(nil), (*ProjectPointer_Localhost)(nil), (*ProjectPointer_Db)(nil), @@ -452,7 +605,7 @@ func file_types_v1_project_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_types_v1_project_proto_rawDesc), len(file_types_v1_project_proto_rawDesc)), NumEnums: 0, - NumMessages: 5, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, diff --git a/js/svc/project/v1/service-ProjectService_connectquery.ts b/js/svc/project/v1/service-ProjectService_connectquery.ts index 64e5891..0f4da50 100644 --- a/js/svc/project/v1/service-ProjectService_connectquery.ts +++ b/js/svc/project/v1/service-ProjectService_connectquery.ts @@ -28,3 +28,11 @@ export const deleteProject = ProjectService.method.deleteProject; * @generated from rpc svc.project.v1.ProjectService.ListProject */ export const listProject = ProjectService.method.listProject; + +/** + * SyncProject is like GetProject but guarantees that cached data + * gets updated. + * + * @generated from rpc svc.project.v1.ProjectService.SyncProject + */ +export const syncProject = ProjectService.method.syncProject; diff --git a/js/svc/project/v1/service_pb.ts b/js/svc/project/v1/service_pb.ts index e0d358b..4c23e6d 100644 --- a/js/svc/project/v1/service_pb.ts +++ b/js/svc/project/v1/service_pb.ts @@ -10,7 +10,7 @@ import type { Cursor } from "../../../types/v1/cursor_pb"; import { file_types_v1_cursor } from "../../../types/v1/cursor_pb"; import type { Dashboard } from "../../../types/v1/dashboard_pb"; import { file_types_v1_dashboard } from "../../../types/v1/dashboard_pb"; -import type { Project, ProjectPointer } from "../../../types/v1/project_pb"; +import type { Project, ProjectSpec } from "../../../types/v1/project_pb"; import { file_types_v1_project } from "../../../types/v1/project_pb"; import type { Message } from "@bufbuild/protobuf"; @@ -18,7 +18,7 @@ import type { Message } from "@bufbuild/protobuf"; * Describes the file svc/project/v1/service.proto. */ export const file_svc_project_v1_service: GenFile = /*@__PURE__*/ - fileDesc("ChxzdmMvcHJvamVjdC92MS9zZXJ2aWNlLnByb3RvEg5zdmMucHJvamVjdC52MSJnChRDcmVhdGVQcm9qZWN0UmVxdWVzdBIWCg5lbnZpcm9ubWVudF9pZBhlIAEoAxIMCgRuYW1lGAEgASgJEikKB3BvaW50ZXIYAiABKAsyGC50eXBlcy52MS5Qcm9qZWN0UG9pbnRlciI7ChVDcmVhdGVQcm9qZWN0UmVzcG9uc2USIgoHcHJvamVjdBgBIAEoCzIRLnR5cGVzLnYxLlByb2plY3QiOQoRR2V0UHJvamVjdFJlcXVlc3QSFgoOZW52aXJvbm1lbnRfaWQYZSABKAMSDAoEbmFtZRgBIAEoCSKNAQoSR2V0UHJvamVjdFJlc3BvbnNlEiIKB3Byb2plY3QYASABKAsyES50eXBlcy52MS5Qcm9qZWN0EicKCmRhc2hib2FyZHMYAiADKAsyEy50eXBlcy52MS5EYXNoYm9hcmQSKgoMYWxlcnRfZ3JvdXBzGAMgAygLMhQudHlwZXMudjEuQWxlcnRHcm91cCLVAQoUVXBkYXRlUHJvamVjdFJlcXVlc3QSFgoOZW52aXJvbm1lbnRfaWQYZSABKAMSDAoEbmFtZRgBIAEoCRJACgltdXRhdGlvbnMYAiADKAsyLS5zdmMucHJvamVjdC52MS5VcGRhdGVQcm9qZWN0UmVxdWVzdC5NdXRhdGlvbhpVCghNdXRhdGlvbhISCghzZXRfbmFtZRgBIAEoCUgAEi8KC3NldF9wb2ludGVyGAIgASgLMhgudHlwZXMudjEuUHJvamVjdFBvaW50ZXJIAEIECgJkbyI7ChVVcGRhdGVQcm9qZWN0UmVzcG9uc2USIgoHcHJvamVjdBgBIAEoCzIRLnR5cGVzLnYxLlByb2plY3QiPAoURGVsZXRlUHJvamVjdFJlcXVlc3QSFgoOZW52aXJvbm1lbnRfaWQYZSABKAMSDAoEbmFtZRgBIAEoCSIXChVEZWxldGVQcm9qZWN0UmVzcG9uc2UiXQoSTGlzdFByb2plY3RSZXF1ZXN0EhYKDmVudmlyb25tZW50X2lkGGUgASgDEiAKBmN1cnNvchgBIAEoCzIQLnR5cGVzLnYxLkN1cnNvchINCgVsaW1pdBgCIAEoBSKiAQoTTGlzdFByb2plY3RSZXNwb25zZRIeCgRuZXh0GAEgASgLMhAudHlwZXMudjEuQ3Vyc29yEjsKBWl0ZW1zGAIgAygLMiwuc3ZjLnByb2plY3QudjEuTGlzdFByb2plY3RSZXNwb25zZS5MaXN0SXRlbRouCghMaXN0SXRlbRIiCgdwcm9qZWN0GAEgASgLMhEudHlwZXMudjEuUHJvamVjdDLXAwoOUHJvamVjdFNlcnZpY2USXAoNQ3JlYXRlUHJvamVjdBIkLnN2Yy5wcm9qZWN0LnYxLkNyZWF0ZVByb2plY3RSZXF1ZXN0GiUuc3ZjLnByb2plY3QudjEuQ3JlYXRlUHJvamVjdFJlc3BvbnNlElMKCkdldFByb2plY3QSIS5zdmMucHJvamVjdC52MS5HZXRQcm9qZWN0UmVxdWVzdBoiLnN2Yy5wcm9qZWN0LnYxLkdldFByb2plY3RSZXNwb25zZRJcCg1VcGRhdGVQcm9qZWN0EiQuc3ZjLnByb2plY3QudjEuVXBkYXRlUHJvamVjdFJlcXVlc3QaJS5zdmMucHJvamVjdC52MS5VcGRhdGVQcm9qZWN0UmVzcG9uc2USXAoNRGVsZXRlUHJvamVjdBIkLnN2Yy5wcm9qZWN0LnYxLkRlbGV0ZVByb2plY3RSZXF1ZXN0GiUuc3ZjLnByb2plY3QudjEuRGVsZXRlUHJvamVjdFJlc3BvbnNlElYKC0xpc3RQcm9qZWN0EiIuc3ZjLnByb2plY3QudjEuTGlzdFByb2plY3RSZXF1ZXN0GiMuc3ZjLnByb2plY3QudjEuTGlzdFByb2plY3RSZXNwb25zZUKzAQoSY29tLnN2Yy5wcm9qZWN0LnYxQgxTZXJ2aWNlUHJvdG9QAVo1Z2l0aHViLmNvbS9odW1hbmxvZ2lvL2FwaS9nby9zdmMvcHJvamVjdC92MTtwcm9qZWN0djGiAgNTUFiqAg5TdmMuUHJvamVjdC5WMcoCDlN2Y1xQcm9qZWN0XFYx4gIaU3ZjXFByb2plY3RcVjFcR1BCTWV0YWRhdGHqAhBTdmM6OlByb2plY3Q6OlYxYgZwcm90bzM", [file_types_v1_alert, file_types_v1_cursor, file_types_v1_dashboard, file_types_v1_project]); + fileDesc("ChxzdmMvcHJvamVjdC92MS9zZXJ2aWNlLnByb3RvEg5zdmMucHJvamVjdC52MSJTChRDcmVhdGVQcm9qZWN0UmVxdWVzdBIWCg5lbnZpcm9ubWVudF9pZBhlIAEoAxIjCgRzcGVjGAEgASgLMhUudHlwZXMudjEuUHJvamVjdFNwZWMiOwoVQ3JlYXRlUHJvamVjdFJlc3BvbnNlEiIKB3Byb2plY3QYASABKAsyES50eXBlcy52MS5Qcm9qZWN0IjkKEUdldFByb2plY3RSZXF1ZXN0EhYKDmVudmlyb25tZW50X2lkGGUgASgDEgwKBG5hbWUYASABKAkijQEKEkdldFByb2plY3RSZXNwb25zZRIiCgdwcm9qZWN0GAEgASgLMhEudHlwZXMudjEuUHJvamVjdBInCgpkYXNoYm9hcmRzGAIgAygLMhMudHlwZXMudjEuRGFzaGJvYXJkEioKDGFsZXJ0X2dyb3VwcxgDIAMoCzIULnR5cGVzLnYxLkFsZXJ0R3JvdXAiYQoUVXBkYXRlUHJvamVjdFJlcXVlc3QSFgoOZW52aXJvbm1lbnRfaWQYZSABKAMSDAoEbmFtZRgBIAEoCRIjCgRzcGVjGAIgASgLMhUudHlwZXMudjEuUHJvamVjdFNwZWMiOwoVVXBkYXRlUHJvamVjdFJlc3BvbnNlEiIKB3Byb2plY3QYASABKAsyES50eXBlcy52MS5Qcm9qZWN0IjwKFERlbGV0ZVByb2plY3RSZXF1ZXN0EhYKDmVudmlyb25tZW50X2lkGGUgASgDEgwKBG5hbWUYASABKAkiFwoVRGVsZXRlUHJvamVjdFJlc3BvbnNlIl0KEkxpc3RQcm9qZWN0UmVxdWVzdBIWCg5lbnZpcm9ubWVudF9pZBhlIAEoAxIgCgZjdXJzb3IYASABKAsyEC50eXBlcy52MS5DdXJzb3ISDQoFbGltaXQYAiABKAUiogEKE0xpc3RQcm9qZWN0UmVzcG9uc2USHgoEbmV4dBgBIAEoCzIQLnR5cGVzLnYxLkN1cnNvchI7CgVpdGVtcxgCIAMoCzIsLnN2Yy5wcm9qZWN0LnYxLkxpc3RQcm9qZWN0UmVzcG9uc2UuTGlzdEl0ZW0aLgoITGlzdEl0ZW0SIgoHcHJvamVjdBgBIAEoCzIRLnR5cGVzLnYxLlByb2plY3QiOgoSU3luY1Byb2plY3RSZXF1ZXN0EhYKDmVudmlyb25tZW50X2lkGGUgASgDEgwKBG5hbWUYASABKAkiOQoTU3luY1Byb2plY3RSZXNwb25zZRIiCgdwcm9qZWN0GAEgASgLMhEudHlwZXMudjEuUHJvamVjdDKvBAoOUHJvamVjdFNlcnZpY2USXAoNQ3JlYXRlUHJvamVjdBIkLnN2Yy5wcm9qZWN0LnYxLkNyZWF0ZVByb2plY3RSZXF1ZXN0GiUuc3ZjLnByb2plY3QudjEuQ3JlYXRlUHJvamVjdFJlc3BvbnNlElMKCkdldFByb2plY3QSIS5zdmMucHJvamVjdC52MS5HZXRQcm9qZWN0UmVxdWVzdBoiLnN2Yy5wcm9qZWN0LnYxLkdldFByb2plY3RSZXNwb25zZRJcCg1VcGRhdGVQcm9qZWN0EiQuc3ZjLnByb2plY3QudjEuVXBkYXRlUHJvamVjdFJlcXVlc3QaJS5zdmMucHJvamVjdC52MS5VcGRhdGVQcm9qZWN0UmVzcG9uc2USXAoNRGVsZXRlUHJvamVjdBIkLnN2Yy5wcm9qZWN0LnYxLkRlbGV0ZVByb2plY3RSZXF1ZXN0GiUuc3ZjLnByb2plY3QudjEuRGVsZXRlUHJvamVjdFJlc3BvbnNlElYKC0xpc3RQcm9qZWN0EiIuc3ZjLnByb2plY3QudjEuTGlzdFByb2plY3RSZXF1ZXN0GiMuc3ZjLnByb2plY3QudjEuTGlzdFByb2plY3RSZXNwb25zZRJWCgtTeW5jUHJvamVjdBIiLnN2Yy5wcm9qZWN0LnYxLlN5bmNQcm9qZWN0UmVxdWVzdBojLnN2Yy5wcm9qZWN0LnYxLlN5bmNQcm9qZWN0UmVzcG9uc2VCswEKEmNvbS5zdmMucHJvamVjdC52MUIMU2VydmljZVByb3RvUAFaNWdpdGh1Yi5jb20vaHVtYW5sb2dpby9hcGkvZ28vc3ZjL3Byb2plY3QvdjE7cHJvamVjdHYxogIDU1BYqgIOU3ZjLlByb2plY3QuVjHKAg5TdmNcUHJvamVjdFxWMeICGlN2Y1xQcm9qZWN0XFYxXEdQQk1ldGFkYXRh6gIQU3ZjOjpQcm9qZWN0OjpWMWIGcHJvdG8z", [file_types_v1_alert, file_types_v1_cursor, file_types_v1_dashboard, file_types_v1_project]); /** * @generated from message svc.project.v1.CreateProjectRequest @@ -30,14 +30,9 @@ export type CreateProjectRequest = Message<"svc.project.v1.CreateProjectRequest" environmentId: bigint; /** - * @generated from field: string name = 1; - */ - name: string; - - /** - * @generated from field: types.v1.ProjectPointer pointer = 2; + * @generated from field: types.v1.ProjectSpec spec = 1; */ - pointer?: ProjectPointer; + spec?: ProjectSpec; }; /** @@ -128,9 +123,9 @@ export type UpdateProjectRequest = Message<"svc.project.v1.UpdateProjectRequest" name: string; /** - * @generated from field: repeated svc.project.v1.UpdateProjectRequest.Mutation mutations = 2; + * @generated from field: types.v1.ProjectSpec spec = 2; */ - mutations: UpdateProjectRequest_Mutation[]; + spec?: ProjectSpec; }; /** @@ -140,35 +135,6 @@ export type UpdateProjectRequest = Message<"svc.project.v1.UpdateProjectRequest" export const UpdateProjectRequestSchema: GenMessage = /*@__PURE__*/ messageDesc(file_svc_project_v1_service, 4); -/** - * @generated from message svc.project.v1.UpdateProjectRequest.Mutation - */ -export type UpdateProjectRequest_Mutation = Message<"svc.project.v1.UpdateProjectRequest.Mutation"> & { - /** - * @generated from oneof svc.project.v1.UpdateProjectRequest.Mutation.do - */ - do: { - /** - * @generated from field: string set_name = 1; - */ - value: string; - case: "setName"; - } | { - /** - * @generated from field: types.v1.ProjectPointer set_pointer = 2; - */ - value: ProjectPointer; - case: "setPointer"; - } | { case: undefined; value?: undefined }; -}; - -/** - * Describes the message svc.project.v1.UpdateProjectRequest.Mutation. - * Use `create(UpdateProjectRequest_MutationSchema)` to create a new message. - */ -export const UpdateProjectRequest_MutationSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_svc_project_v1_service, 4, 0); - /** * @generated from message svc.project.v1.UpdateProjectResponse */ @@ -287,6 +253,45 @@ export type ListProjectResponse_ListItem = Message<"svc.project.v1.ListProjectRe export const ListProjectResponse_ListItemSchema: GenMessage = /*@__PURE__*/ messageDesc(file_svc_project_v1_service, 9, 0); +/** + * @generated from message svc.project.v1.SyncProjectRequest + */ +export type SyncProjectRequest = Message<"svc.project.v1.SyncProjectRequest"> & { + /** + * @generated from field: int64 environment_id = 101; + */ + environmentId: bigint; + + /** + * @generated from field: string name = 1; + */ + name: string; +}; + +/** + * Describes the message svc.project.v1.SyncProjectRequest. + * Use `create(SyncProjectRequestSchema)` to create a new message. + */ +export const SyncProjectRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_svc_project_v1_service, 10); + +/** + * @generated from message svc.project.v1.SyncProjectResponse + */ +export type SyncProjectResponse = Message<"svc.project.v1.SyncProjectResponse"> & { + /** + * @generated from field: types.v1.Project project = 1; + */ + project?: Project; +}; + +/** + * Describes the message svc.project.v1.SyncProjectResponse. + * Use `create(SyncProjectResponseSchema)` to create a new message. + */ +export const SyncProjectResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_svc_project_v1_service, 11); + /** * @generated from service svc.project.v1.ProjectService */ @@ -331,6 +336,17 @@ export const ProjectService: GenService<{ input: typeof ListProjectRequestSchema; output: typeof ListProjectResponseSchema; }, + /** + * SyncProject is like GetProject but guarantees that cached data + * gets updated. + * + * @generated from rpc svc.project.v1.ProjectService.SyncProject + */ + syncProject: { + methodKind: "unary"; + input: typeof SyncProjectRequestSchema; + output: typeof SyncProjectResponseSchema; + }, }> = /*@__PURE__*/ serviceDesc(file_svc_project_v1_service, 0); diff --git a/js/types/v1/alert_pb.ts b/js/types/v1/alert_pb.ts index cb3ae11..e03d703 100644 --- a/js/types/v1/alert_pb.ts +++ b/js/types/v1/alert_pb.ts @@ -16,12 +16,52 @@ import type { Message } from "@bufbuild/protobuf"; * Describes the file types/v1/alert.proto. */ export const file_types_v1_alert: GenFile = /*@__PURE__*/ - fileDesc("ChR0eXBlcy92MS9hbGVydC5wcm90bxIIdHlwZXMudjEiygEKCkFsZXJ0R3JvdXASDAoEbmFtZRgBIAEoCRIrCghpbnRlcnZhbBgCIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbhIvCgxxdWVyeV9vZmZzZXQYAyABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb24SDQoFbGltaXQYBCABKAUSIgoFcnVsZXMYBSADKAsyEy50eXBlcy52MS5BbGVydFJ1bGUSHQoGbGFiZWxzGAYgASgLMg0udHlwZXMudjEuT2JqItcBCglBbGVydFJ1bGUSDAoEbmFtZRgBIAEoCRIdCgRleHByGAIgASgLMg8udHlwZXMudjEuUXVlcnkSHQoGbGFiZWxzGAMgASgLMg0udHlwZXMudjEuT2JqEiIKC2Fubm90YXRpb25zGAQgASgLMg0udHlwZXMudjEuT2JqEiYKA2ZvchgzIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbhIyCg9rZWVwX2ZpcmluZ19mb3IYNCABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb24iDgoMQWxlcnRVbmtub3duIgkKB0FsZXJ0T2siDgoMQWxlcnRQZW5kaW5nIiwKC0FsZXJ0RmlyaW5nEh0KBmxhYmVscxgBIAEoCzINLnR5cGVzLnYxLk9iaiLGAgoKQWxlcnRTdGF0ZRIhCgRydWxlGAEgASgLMhMudHlwZXMudjEuQWxlcnRSdWxlEioKB3Vua25vd24YyAEgASgLMhYudHlwZXMudjEuQWxlcnRVbmtub3duSAASIAoCb2sYyQEgASgLMhEudHlwZXMudjEuQWxlcnRPa0gAEioKB3BlbmRpbmcYygEgASgLMhYudHlwZXMudjEuQWxlcnRQZW5kaW5nSAASKAoGZmlyaW5nGMsBIAEoCzIVLnR5cGVzLnYxLkFsZXJ0RmlyaW5nSAASMwoPdHJhbnNpdGlvbmVkX2F0GAMgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIyCg5sYXN0X2ZpcmluZ19hdBgEIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCCAoGc3RhdHVzQooBCgxjb20udHlwZXMudjFCCkFsZXJ0UHJvdG9QAVotZ2l0aHViLmNvbS9odW1hbmxvZ2lvL2FwaS9nby90eXBlcy92MTt0eXBlc3YxogIDVFhYqgIIVHlwZXMuVjHKAghUeXBlc1xWMeICFFR5cGVzXFYxXEdQQk1ldGFkYXRh6gIJVHlwZXM6OlYxYgZwcm90bzM", [file_google_protobuf_duration, file_google_protobuf_timestamp, file_types_v1_query, file_types_v1_types]); + fileDesc("ChR0eXBlcy92MS9hbGVydC5wcm90bxIIdHlwZXMudjEiiAEKCkFsZXJ0R3JvdXASJgoEbWV0YRgBIAEoCzIYLnR5cGVzLnYxLkFsZXJ0R3JvdXBNZXRhEiYKBHNwZWMYAiABKAsyGC50eXBlcy52MS5BbGVydEdyb3VwU3BlYxIqCgZzdGF0dXMYAyABKAsyGi50eXBlcy52MS5BbGVydEdyb3VwU3RhdHVzIhAKDkFsZXJ0R3JvdXBNZXRhIs4BCg5BbGVydEdyb3VwU3BlYxIMCgRuYW1lGAEgASgJEisKCGludGVydmFsGAIgASgLMhkuZ29vZ2xlLnByb3RvYnVmLkR1cmF0aW9uEi8KDHF1ZXJ5X29mZnNldBgDIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbhINCgVsaW1pdBgEIAEoBRIiCgVydWxlcxgFIAMoCzITLnR5cGVzLnYxLkFsZXJ0UnVsZRIdCgZsYWJlbHMYBiABKAsyDS50eXBlcy52MS5PYmoiggEKEEFsZXJ0R3JvdXBTdGF0dXMSLgoKY3JlYXRlZF9hdBgBIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASLgoKdXBkYXRlZF9hdBgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASDgoGZXJyb3JzGAMgAygJItcBCglBbGVydFJ1bGUSDAoEbmFtZRgBIAEoCRIdCgRleHByGAIgASgLMg8udHlwZXMudjEuUXVlcnkSHQoGbGFiZWxzGAMgASgLMg0udHlwZXMudjEuT2JqEiIKC2Fubm90YXRpb25zGAQgASgLMg0udHlwZXMudjEuT2JqEiYKA2ZvchgzIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbhIyCg9rZWVwX2ZpcmluZ19mb3IYNCABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb24iDgoMQWxlcnRVbmtub3duIgkKB0FsZXJ0T2siDgoMQWxlcnRQZW5kaW5nIiwKC0FsZXJ0RmlyaW5nEh0KBmxhYmVscxgBIAEoCzINLnR5cGVzLnYxLk9iaiLGAgoKQWxlcnRTdGF0ZRIhCgRydWxlGAEgASgLMhMudHlwZXMudjEuQWxlcnRSdWxlEioKB3Vua25vd24YyAEgASgLMhYudHlwZXMudjEuQWxlcnRVbmtub3duSAASIAoCb2sYyQEgASgLMhEudHlwZXMudjEuQWxlcnRPa0gAEioKB3BlbmRpbmcYygEgASgLMhYudHlwZXMudjEuQWxlcnRQZW5kaW5nSAASKAoGZmlyaW5nGMsBIAEoCzIVLnR5cGVzLnYxLkFsZXJ0RmlyaW5nSAASMwoPdHJhbnNpdGlvbmVkX2F0GAMgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIyCg5sYXN0X2ZpcmluZ19hdBgEIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCCAoGc3RhdHVzQooBCgxjb20udHlwZXMudjFCCkFsZXJ0UHJvdG9QAVotZ2l0aHViLmNvbS9odW1hbmxvZ2lvL2FwaS9nby90eXBlcy92MTt0eXBlc3YxogIDVFhYqgIIVHlwZXMuVjHKAghUeXBlc1xWMeICFFR5cGVzXFYxXEdQQk1ldGFkYXRh6gIJVHlwZXM6OlYxYgZwcm90bzM", [file_google_protobuf_duration, file_google_protobuf_timestamp, file_types_v1_query, file_types_v1_types]); /** * @generated from message types.v1.AlertGroup */ export type AlertGroup = Message<"types.v1.AlertGroup"> & { + /** + * @generated from field: types.v1.AlertGroupMeta meta = 1; + */ + meta?: AlertGroupMeta; + + /** + * @generated from field: types.v1.AlertGroupSpec spec = 2; + */ + spec?: AlertGroupSpec; + + /** + * @generated from field: types.v1.AlertGroupStatus status = 3; + */ + status?: AlertGroupStatus; +}; + +/** + * Describes the message types.v1.AlertGroup. + * Use `create(AlertGroupSchema)` to create a new message. + */ +export const AlertGroupSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_types_v1_alert, 0); + +/** + * @generated from message types.v1.AlertGroupMeta + */ +export type AlertGroupMeta = Message<"types.v1.AlertGroupMeta"> & { +}; + +/** + * Describes the message types.v1.AlertGroupMeta. + * Use `create(AlertGroupMetaSchema)` to create a new message. + */ +export const AlertGroupMetaSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_types_v1_alert, 1); + +/** + * @generated from message types.v1.AlertGroupSpec + */ +export type AlertGroupSpec = Message<"types.v1.AlertGroupSpec"> & { /** * @generated from field: string name = 1; */ @@ -54,11 +94,38 @@ export type AlertGroup = Message<"types.v1.AlertGroup"> & { }; /** - * Describes the message types.v1.AlertGroup. - * Use `create(AlertGroupSchema)` to create a new message. + * Describes the message types.v1.AlertGroupSpec. + * Use `create(AlertGroupSpecSchema)` to create a new message. */ -export const AlertGroupSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_types_v1_alert, 0); +export const AlertGroupSpecSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_types_v1_alert, 2); + +/** + * @generated from message types.v1.AlertGroupStatus + */ +export type AlertGroupStatus = Message<"types.v1.AlertGroupStatus"> & { + /** + * @generated from field: google.protobuf.Timestamp created_at = 1; + */ + createdAt?: Timestamp; + + /** + * @generated from field: google.protobuf.Timestamp updated_at = 2; + */ + updatedAt?: Timestamp; + + /** + * @generated from field: repeated string errors = 3; + */ + errors: string[]; +}; + +/** + * Describes the message types.v1.AlertGroupStatus. + * Use `create(AlertGroupStatusSchema)` to create a new message. + */ +export const AlertGroupStatusSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_types_v1_alert, 3); /** * @generated from message types.v1.AlertRule @@ -100,7 +167,7 @@ export type AlertRule = Message<"types.v1.AlertRule"> & { * Use `create(AlertRuleSchema)` to create a new message. */ export const AlertRuleSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_types_v1_alert, 1); + messageDesc(file_types_v1_alert, 4); /** * @generated from message types.v1.AlertUnknown @@ -113,7 +180,7 @@ export type AlertUnknown = Message<"types.v1.AlertUnknown"> & { * Use `create(AlertUnknownSchema)` to create a new message. */ export const AlertUnknownSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_types_v1_alert, 2); + messageDesc(file_types_v1_alert, 5); /** * @generated from message types.v1.AlertOk @@ -126,7 +193,7 @@ export type AlertOk = Message<"types.v1.AlertOk"> & { * Use `create(AlertOkSchema)` to create a new message. */ export const AlertOkSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_types_v1_alert, 3); + messageDesc(file_types_v1_alert, 6); /** * @generated from message types.v1.AlertPending @@ -139,7 +206,7 @@ export type AlertPending = Message<"types.v1.AlertPending"> & { * Use `create(AlertPendingSchema)` to create a new message. */ export const AlertPendingSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_types_v1_alert, 4); + messageDesc(file_types_v1_alert, 7); /** * @generated from message types.v1.AlertFiring @@ -156,7 +223,7 @@ export type AlertFiring = Message<"types.v1.AlertFiring"> & { * Use `create(AlertFiringSchema)` to create a new message. */ export const AlertFiringSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_types_v1_alert, 5); + messageDesc(file_types_v1_alert, 8); /** * @generated from message types.v1.AlertState @@ -212,5 +279,5 @@ export type AlertState = Message<"types.v1.AlertState"> & { * Use `create(AlertStateSchema)` to create a new message. */ export const AlertStateSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_types_v1_alert, 6); + messageDesc(file_types_v1_alert, 9); diff --git a/js/types/v1/dashboard_pb.ts b/js/types/v1/dashboard_pb.ts index a286910..2f67f43 100644 --- a/js/types/v1/dashboard_pb.ts +++ b/js/types/v1/dashboard_pb.ts @@ -12,63 +12,119 @@ import type { Message } from "@bufbuild/protobuf"; * Describes the file types/v1/dashboard.proto. */ export const file_types_v1_dashboard: GenFile = /*@__PURE__*/ - fileDesc("Chh0eXBlcy92MS9kYXNoYm9hcmQucHJvdG8SCHR5cGVzLnYxIuUBCglEYXNoYm9hcmQSCgoCaWQYZCABKAkSDQoEbmFtZRjIASABKAkSFAoLZGVzY3JpcHRpb24YyQEgASgJEhQKC2lzX3JlYWRvbmx5GMoBIAEoCBIPCgRmaWxlGMsBIAEoCUgAEhQKC3BlcnNlc19qc29uGKwCIAEoDBIvCgpjcmVhdGVkX2F0GJADIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASLwoKdXBkYXRlZF9hdBiRAyABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQggKBnNvdXJjZUKOAQoMY29tLnR5cGVzLnYxQg5EYXNoYm9hcmRQcm90b1ABWi1naXRodWIuY29tL2h1bWFubG9naW8vYXBpL2dvL3R5cGVzL3YxO3R5cGVzdjGiAgNUWFiqAghUeXBlcy5WMcoCCFR5cGVzXFYx4gIUVHlwZXNcVjFcR1BCTWV0YWRhdGHqAglUeXBlczo6VjFiBnByb3RvMw", [file_google_protobuf_timestamp]); + fileDesc("Chh0eXBlcy92MS9kYXNoYm9hcmQucHJvdG8SCHR5cGVzLnYxIoIBCglEYXNoYm9hcmQSJQoEbWV0YRgBIAEoCzIXLnR5cGVzLnYxLkRhc2hib2FyZE1ldGESJQoEc3BlYxgCIAEoCzIXLnR5cGVzLnYxLkRhc2hib2FyZFNwZWMSJwoGc3RhdHVzGAMgASgLMhcudHlwZXMudjEuRGFzaGJvYXJkU3BlYyIbCg1EYXNoYm9hcmRNZXRhEgoKAmlkGAEgASgJIncKDURhc2hib2FyZFNwZWMSDAoEbmFtZRgBIAEoCRITCgtkZXNjcmlwdGlvbhgCIAEoCRITCgtpc19yZWFkb25seRgDIAEoCBIPCgRmaWxlGJEDIAEoCUgAEhMKC3BlcnNlc19qc29uGAUgASgMQggKBnNvdXJjZSKBAQoPRGFzaGJvYXJkU3RhdHVzEi4KCmNyZWF0ZWRfYXQYASABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCnVwZGF0ZWRfYXQYAiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEg4KBmVycm9ycxgDIAMoCUKOAQoMY29tLnR5cGVzLnYxQg5EYXNoYm9hcmRQcm90b1ABWi1naXRodWIuY29tL2h1bWFubG9naW8vYXBpL2dvL3R5cGVzL3YxO3R5cGVzdjGiAgNUWFiqAghUeXBlcy5WMcoCCFR5cGVzXFYx4gIUVHlwZXNcVjFcR1BCTWV0YWRhdGHqAglUeXBlczo6VjFiBnByb3RvMw", [file_google_protobuf_timestamp]); /** * @generated from message types.v1.Dashboard */ export type Dashboard = Message<"types.v1.Dashboard"> & { /** - * @generated from field: string id = 100; + * @generated from field: types.v1.DashboardMeta meta = 1; + */ + meta?: DashboardMeta; + + /** + * @generated from field: types.v1.DashboardSpec spec = 2; + */ + spec?: DashboardSpec; + + /** + * @generated from field: types.v1.DashboardSpec status = 3; + */ + status?: DashboardSpec; +}; + +/** + * Describes the message types.v1.Dashboard. + * Use `create(DashboardSchema)` to create a new message. + */ +export const DashboardSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_types_v1_dashboard, 0); + +/** + * @generated from message types.v1.DashboardMeta + */ +export type DashboardMeta = Message<"types.v1.DashboardMeta"> & { + /** + * @generated from field: string id = 1; */ id: string; +}; +/** + * Describes the message types.v1.DashboardMeta. + * Use `create(DashboardMetaSchema)` to create a new message. + */ +export const DashboardMetaSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_types_v1_dashboard, 1); + +/** + * @generated from message types.v1.DashboardSpec + */ +export type DashboardSpec = Message<"types.v1.DashboardSpec"> & { /** - * @generated from field: string name = 200; + * @generated from field: string name = 1; */ name: string; /** - * @generated from field: string description = 201; + * @generated from field: string description = 2; */ description: string; /** - * @generated from field: bool is_readonly = 202; + * @generated from field: bool is_readonly = 3; */ isReadonly: boolean; /** - * @generated from oneof types.v1.Dashboard.source + * @generated from oneof types.v1.DashboardSpec.source */ source: { /** - * @generated from field: string file = 203; + * @generated from field: string file = 401; */ value: string; case: "file"; } | { case: undefined; value?: undefined }; /** - * @generated from field: bytes perses_json = 300; + * @generated from field: bytes perses_json = 5; */ persesJson: Uint8Array; +}; + +/** + * Describes the message types.v1.DashboardSpec. + * Use `create(DashboardSpecSchema)` to create a new message. + */ +export const DashboardSpecSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_types_v1_dashboard, 2); +/** + * @generated from message types.v1.DashboardStatus + */ +export type DashboardStatus = Message<"types.v1.DashboardStatus"> & { /** - * @generated from field: google.protobuf.Timestamp created_at = 400; + * @generated from field: google.protobuf.Timestamp created_at = 1; */ createdAt?: Timestamp; /** - * @generated from field: google.protobuf.Timestamp updated_at = 401; + * @generated from field: google.protobuf.Timestamp updated_at = 2; */ updatedAt?: Timestamp; + + /** + * @generated from field: repeated string errors = 3; + */ + errors: string[]; }; /** - * Describes the message types.v1.Dashboard. - * Use `create(DashboardSchema)` to create a new message. + * Describes the message types.v1.DashboardStatus. + * Use `create(DashboardStatusSchema)` to create a new message. */ -export const DashboardSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_types_v1_dashboard, 0); +export const DashboardStatusSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_types_v1_dashboard, 3); diff --git a/js/types/v1/project_pb.ts b/js/types/v1/project_pb.ts index c272ca2..0f591f0 100644 --- a/js/types/v1/project_pb.ts +++ b/js/types/v1/project_pb.ts @@ -12,7 +12,95 @@ import type { Message } from "@bufbuild/protobuf"; * Describes the file types/v1/project.proto. */ export const file_types_v1_project: GenFile = /*@__PURE__*/ - fileDesc("ChZ0eXBlcy92MS9wcm9qZWN0LnByb3RvEgh0eXBlcy52MSL/AgoOUHJvamVjdFBvaW50ZXISNAoGcmVtb3RlGAEgASgLMiIudHlwZXMudjEuUHJvamVjdFBvaW50ZXIuUmVtb3RlR2l0SAASNgoJbG9jYWxob3N0GAIgASgLMiEudHlwZXMudjEuUHJvamVjdFBvaW50ZXIuTG9jYWxHaXRIABIuCgJkYhgDIAEoCzIgLnR5cGVzLnYxLlByb2plY3RQb2ludGVyLlZpcnR1YWxIABpWCglSZW1vdGVHaXQSEgoKcmVtb3RlX3VybBgBIAEoCRILCgNyZWYYAiABKAkSFQoNZGFzaGJvYXJkX2RpchgDIAEoCRIRCglhbGVydF9kaXIYBCABKAkaVQoITG9jYWxHaXQSDAoEcGF0aBgBIAEoCRIVCg1kYXNoYm9hcmRfZGlyGAIgASgJEhEKCWFsZXJ0X2RpchgDIAEoCRIRCglyZWFkX29ubHkYBCABKAgaFgoHVmlydHVhbBILCgN1cmkYASABKAlCCAoGc2NoZW1lIqQBCgdQcm9qZWN0EgwKBG5hbWUYASABKAkSKQoHcG9pbnRlchgCIAEoCzIYLnR5cGVzLnYxLlByb2plY3RQb2ludGVyEi8KCmNyZWF0ZWRfYXQYrAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIvCgp1cGRhdGVkX2F0GK0CIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCjAEKDGNvbS50eXBlcy52MUIMUHJvamVjdFByb3RvUAFaLWdpdGh1Yi5jb20vaHVtYW5sb2dpby9hcGkvZ28vdHlwZXMvdjE7dHlwZXN2MaICA1RYWKoCCFR5cGVzLlYxygIIVHlwZXNcVjHiAhRUeXBlc1xWMVxHUEJNZXRhZGF0YeoCCVR5cGVzOjpWMWIGcHJvdG8z", [file_google_protobuf_duration, file_google_protobuf_timestamp]); + fileDesc("ChZ0eXBlcy92MS9wcm9qZWN0LnByb3RvEgh0eXBlcy52MSJ8CgdQcm9qZWN0EiMKBG1ldGEYASABKAsyFS50eXBlcy52MS5Qcm9qZWN0TWV0YRIjCgRzcGVjGAIgASgLMhUudHlwZXMudjEuUHJvamVjdFNwZWMSJwoGc3RhdHVzGAMgASgLMhcudHlwZXMudjEuUHJvamVjdFN0YXR1cyIZCgtQcm9qZWN0TWV0YRIKCgJpZBgBIAEoCSJGCgtQcm9qZWN0U3BlYxIMCgRuYW1lGAEgASgJEikKB3BvaW50ZXIYAiABKAsyGC50eXBlcy52MS5Qcm9qZWN0UG9pbnRlciJvCg1Qcm9qZWN0U3RhdHVzEi4KCmNyZWF0ZWRfYXQYASABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCnVwZGF0ZWRfYXQYAiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wIv8CCg5Qcm9qZWN0UG9pbnRlchI0CgZyZW1vdGUYASABKAsyIi50eXBlcy52MS5Qcm9qZWN0UG9pbnRlci5SZW1vdGVHaXRIABI2Cglsb2NhbGhvc3QYAiABKAsyIS50eXBlcy52MS5Qcm9qZWN0UG9pbnRlci5Mb2NhbEdpdEgAEi4KAmRiGAMgASgLMiAudHlwZXMudjEuUHJvamVjdFBvaW50ZXIuVmlydHVhbEgAGlYKCVJlbW90ZUdpdBISCgpyZW1vdGVfdXJsGAEgASgJEgsKA3JlZhgCIAEoCRIVCg1kYXNoYm9hcmRfZGlyGAMgASgJEhEKCWFsZXJ0X2RpchgEIAEoCRpVCghMb2NhbEdpdBIMCgRwYXRoGAEgASgJEhUKDWRhc2hib2FyZF9kaXIYAiABKAkSEQoJYWxlcnRfZGlyGAMgASgJEhEKCXJlYWRfb25seRgEIAEoCBoWCgdWaXJ0dWFsEgsKA3VyaRgBIAEoCUIICgZzY2hlbWVCjAEKDGNvbS50eXBlcy52MUIMUHJvamVjdFByb3RvUAFaLWdpdGh1Yi5jb20vaHVtYW5sb2dpby9hcGkvZ28vdHlwZXMvdjE7dHlwZXN2MaICA1RYWKoCCFR5cGVzLlYxygIIVHlwZXNcVjHiAhRUeXBlc1xWMVxHUEJNZXRhZGF0YeoCCVR5cGVzOjpWMWIGcHJvdG8z", [file_google_protobuf_duration, file_google_protobuf_timestamp]); + +/** + * @generated from message types.v1.Project + */ +export type Project = Message<"types.v1.Project"> & { + /** + * @generated from field: types.v1.ProjectMeta meta = 1; + */ + meta?: ProjectMeta; + + /** + * @generated from field: types.v1.ProjectSpec spec = 2; + */ + spec?: ProjectSpec; + + /** + * @generated from field: types.v1.ProjectStatus status = 3; + */ + status?: ProjectStatus; +}; + +/** + * Describes the message types.v1.Project. + * Use `create(ProjectSchema)` to create a new message. + */ +export const ProjectSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_types_v1_project, 0); + +/** + * @generated from message types.v1.ProjectMeta + */ +export type ProjectMeta = Message<"types.v1.ProjectMeta"> & { + /** + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message types.v1.ProjectMeta. + * Use `create(ProjectMetaSchema)` to create a new message. + */ +export const ProjectMetaSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_types_v1_project, 1); + +/** + * @generated from message types.v1.ProjectSpec + */ +export type ProjectSpec = Message<"types.v1.ProjectSpec"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: types.v1.ProjectPointer pointer = 2; + */ + pointer?: ProjectPointer; +}; + +/** + * Describes the message types.v1.ProjectSpec. + * Use `create(ProjectSpecSchema)` to create a new message. + */ +export const ProjectSpecSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_types_v1_project, 2); + +/** + * @generated from message types.v1.ProjectStatus + */ +export type ProjectStatus = Message<"types.v1.ProjectStatus"> & { + /** + * @generated from field: google.protobuf.Timestamp created_at = 1; + */ + createdAt?: Timestamp; + + /** + * @generated from field: google.protobuf.Timestamp updated_at = 2; + */ + updatedAt?: Timestamp; +}; + +/** + * Describes the message types.v1.ProjectStatus. + * Use `create(ProjectStatusSchema)` to create a new message. + */ +export const ProjectStatusSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_types_v1_project, 3); /** * @generated from message types.v1.ProjectPointer @@ -47,7 +135,7 @@ export type ProjectPointer = Message<"types.v1.ProjectPointer"> & { * Use `create(ProjectPointerSchema)` to create a new message. */ export const ProjectPointerSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_types_v1_project, 0); + messageDesc(file_types_v1_project, 4); /** * @generated from message types.v1.ProjectPointer.RemoteGit @@ -79,7 +167,7 @@ export type ProjectPointer_RemoteGit = Message<"types.v1.ProjectPointer.RemoteGi * Use `create(ProjectPointer_RemoteGitSchema)` to create a new message. */ export const ProjectPointer_RemoteGitSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_types_v1_project, 0, 0); + messageDesc(file_types_v1_project, 4, 0); /** * @generated from message types.v1.ProjectPointer.LocalGit @@ -111,7 +199,7 @@ export type ProjectPointer_LocalGit = Message<"types.v1.ProjectPointer.LocalGit" * Use `create(ProjectPointer_LocalGitSchema)` to create a new message. */ export const ProjectPointer_LocalGitSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_types_v1_project, 0, 1); + messageDesc(file_types_v1_project, 4, 1); /** * @generated from message types.v1.ProjectPointer.Virtual @@ -128,37 +216,5 @@ export type ProjectPointer_Virtual = Message<"types.v1.ProjectPointer.Virtual"> * Use `create(ProjectPointer_VirtualSchema)` to create a new message. */ export const ProjectPointer_VirtualSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_types_v1_project, 0, 2); - -/** - * @generated from message types.v1.Project - */ -export type Project = Message<"types.v1.Project"> & { - /** - * @generated from field: string name = 1; - */ - name: string; - - /** - * @generated from field: types.v1.ProjectPointer pointer = 2; - */ - pointer?: ProjectPointer; - - /** - * @generated from field: google.protobuf.Timestamp created_at = 300; - */ - createdAt?: Timestamp; - - /** - * @generated from field: google.protobuf.Timestamp updated_at = 301; - */ - updatedAt?: Timestamp; -}; - -/** - * Describes the message types.v1.Project. - * Use `create(ProjectSchema)` to create a new message. - */ -export const ProjectSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_types_v1_project, 1); + messageDesc(file_types_v1_project, 4, 2); diff --git a/proto/svc/project/v1/service.proto b/proto/svc/project/v1/service.proto index 3a7a1dd..e913b6d 100644 --- a/proto/svc/project/v1/service.proto +++ b/proto/svc/project/v1/service.proto @@ -15,12 +15,15 @@ service ProjectService { rpc UpdateProject(UpdateProjectRequest) returns (UpdateProjectResponse); rpc DeleteProject(DeleteProjectRequest) returns (DeleteProjectResponse); rpc ListProject(ListProjectRequest) returns (ListProjectResponse); + + // SyncProject is like GetProject but guarantees that cached data + // gets updated. + rpc SyncProject(SyncProjectRequest) returns (SyncProjectResponse); } message CreateProjectRequest { int64 environment_id = 101; - string name = 1; - types.v1.ProjectPointer pointer = 2; + types.v1.ProjectSpec spec = 1; } message CreateProjectResponse { @@ -39,15 +42,9 @@ message GetProjectResponse { } message UpdateProjectRequest { - message Mutation { - oneof do { - string set_name = 1; - types.v1.ProjectPointer set_pointer = 2; - } - } int64 environment_id = 101; string name = 1; - repeated Mutation mutations = 2; + types.v1.ProjectSpec spec = 2; } message UpdateProjectResponse { @@ -74,3 +71,12 @@ message ListProjectResponse { } repeated ListItem items = 2; } + +message SyncProjectRequest { + int64 environment_id = 101; + string name = 1; +} + +message SyncProjectResponse { + types.v1.Project project = 1; +} diff --git a/proto/types/v1/alert.proto b/proto/types/v1/alert.proto index ec27bea..e59f57d 100644 --- a/proto/types/v1/alert.proto +++ b/proto/types/v1/alert.proto @@ -10,6 +10,14 @@ import "types/v1/types.proto"; option go_package = "types/v1;typesv1"; message AlertGroup { + AlertGroupMeta meta = 1; + AlertGroupSpec spec = 2; + AlertGroupStatus status = 3; +} + +message AlertGroupMeta {} + +message AlertGroupSpec { string name = 1; google.protobuf.Duration interval = 2; google.protobuf.Duration query_offset = 3; @@ -18,6 +26,12 @@ message AlertGroup { types.v1.Obj labels = 6; } +message AlertGroupStatus { + google.protobuf.Timestamp created_at = 1; + google.protobuf.Timestamp updated_at = 2; + repeated string errors = 3; +} + message AlertRule { string name = 1; types.v1.Query expr = 2; diff --git a/proto/types/v1/dashboard.proto b/proto/types/v1/dashboard.proto index 2d503ce..7663f93 100644 --- a/proto/types/v1/dashboard.proto +++ b/proto/types/v1/dashboard.proto @@ -7,16 +7,27 @@ import "google/protobuf/timestamp.proto"; option go_package = "types/v1;typesv1"; message Dashboard { - string id = 100; - string name = 200; - string description = 201; - bool is_readonly = 202; + DashboardMeta meta = 1; + DashboardSpec spec = 2; + DashboardSpec status = 3; +} + +message DashboardMeta { + string id = 1; +} + +message DashboardSpec { + string name = 1; + string description = 2; + bool is_readonly = 3; oneof source { - string file = 203; + string file = 401; } + bytes perses_json = 5; +} - bytes perses_json = 300; - - google.protobuf.Timestamp created_at = 400; - google.protobuf.Timestamp updated_at = 401; +message DashboardStatus { + google.protobuf.Timestamp created_at = 1; + google.protobuf.Timestamp updated_at = 2; + repeated string errors = 3; } diff --git a/proto/types/v1/project.proto b/proto/types/v1/project.proto index b2d13fe..6685403 100644 --- a/proto/types/v1/project.proto +++ b/proto/types/v1/project.proto @@ -7,6 +7,26 @@ import "google/protobuf/timestamp.proto"; option go_package = "types/v1;typesv1"; +message Project { + ProjectMeta meta = 1; + ProjectSpec spec = 2; + ProjectStatus status = 3; +} + +message ProjectMeta { + string id = 1; +} + +message ProjectSpec { + string name = 1; + ProjectPointer pointer = 2; +} + +message ProjectStatus { + google.protobuf.Timestamp created_at = 1; + google.protobuf.Timestamp updated_at = 2; +} + message ProjectPointer { message RemoteGit { string remote_url = 1; @@ -29,10 +49,3 @@ message ProjectPointer { Virtual db = 3; } } - -message Project { - string name = 1; - ProjectPointer pointer = 2; - google.protobuf.Timestamp created_at = 300; - google.protobuf.Timestamp updated_at = 301; -}