mirror of
https://github.com/holos-run/holos.git
synced 2026-03-19 08:44:58 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac2ff47a9c |
2
go.mod
2
go.mod
@@ -20,6 +20,7 @@ require (
|
||||
github.com/lmittmann/tint v1.0.4
|
||||
github.com/mattn/go-isatty v0.0.20
|
||||
github.com/mattn/go-runewidth v0.0.15
|
||||
github.com/mennanov/fieldmask-utils v1.1.2
|
||||
github.com/olekukonko/tablewriter v0.0.5
|
||||
github.com/prometheus/client_golang v1.19.0
|
||||
github.com/rogpeppe/go-internal v1.12.0
|
||||
@@ -157,7 +158,6 @@ require (
|
||||
github.com/lufia/plan9stats v0.0.0-20240408141607-282e7b5d6b74 // indirect
|
||||
github.com/mailru/easyjson v0.7.7 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mennanov/fieldmask-utils v1.1.2 // indirect
|
||||
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
|
||||
github.com/miekg/dns v1.1.58 // indirect
|
||||
github.com/miekg/pkcs11 v1.1.1 // indirect
|
||||
|
||||
@@ -10,6 +10,7 @@ import { UserService } from './gen/holos/user/v1alpha1/user_service_connect';
|
||||
import { OrganizationService } from './gen/holos/organization/v1alpha1/organization_service_connect';
|
||||
import { PlatformService } from './gen/holos/platform/v1alpha1/platform_service_connect';
|
||||
import { HolosPanelWrapperComponent } from '../wrappers/holos-panel-wrapper/holos-panel-wrapper.component';
|
||||
import { SystemService } from './gen/holos/system/v1alpha1/system_service_connect';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
@@ -19,6 +20,7 @@ export const appConfig: ApplicationConfig = {
|
||||
provideClient(UserService),
|
||||
provideClient(OrganizationService),
|
||||
provideClient(PlatformService),
|
||||
provideClient(SystemService),
|
||||
importProvidersFrom(
|
||||
ConnectModule.forRoot({
|
||||
baseUrl: window.location.origin
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
// @generated by protoc-gen-es v1.9.0 with parameter "target=ts"
|
||||
// @generated from file holos/system/v1alpha1/system.proto (package holos.system.v1alpha1, syntax proto3)
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
|
||||
import { Message, proto3 } from "@bufbuild/protobuf";
|
||||
|
||||
/**
|
||||
* @generated from message holos.system.v1alpha1.Version
|
||||
*/
|
||||
export class Version extends Message<Version> {
|
||||
/**
|
||||
* @generated from field: string version = 1;
|
||||
*/
|
||||
version = "";
|
||||
|
||||
/**
|
||||
* @generated from field: string git_commit = 2;
|
||||
*/
|
||||
gitCommit = "";
|
||||
|
||||
/**
|
||||
* @generated from field: string git_tree_state = 3;
|
||||
*/
|
||||
gitTreeState = "";
|
||||
|
||||
/**
|
||||
* @generated from field: string go_version = 4;
|
||||
*/
|
||||
goVersion = "";
|
||||
|
||||
/**
|
||||
* @generated from field: string build_date = 5;
|
||||
*/
|
||||
buildDate = "";
|
||||
|
||||
/**
|
||||
* @generated from field: string os = 6;
|
||||
*/
|
||||
os = "";
|
||||
|
||||
/**
|
||||
* @generated from field: string arch = 7;
|
||||
*/
|
||||
arch = "";
|
||||
|
||||
constructor(data?: PartialMessage<Version>) {
|
||||
super();
|
||||
proto3.util.initPartial(data, this);
|
||||
}
|
||||
|
||||
static readonly runtime: typeof proto3 = proto3;
|
||||
static readonly typeName = "holos.system.v1alpha1.Version";
|
||||
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
||||
{ no: 1, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
{ no: 2, name: "git_commit", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
{ no: 3, name: "git_tree_state", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
{ no: 4, name: "go_version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
{ no: 5, name: "build_date", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
{ no: 6, name: "os", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
{ no: 7, name: "arch", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
]);
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Version {
|
||||
return new Version().fromBinary(bytes, options);
|
||||
}
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Version {
|
||||
return new Version().fromJson(jsonValue, options);
|
||||
}
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Version {
|
||||
return new Version().fromJsonString(jsonString, options);
|
||||
}
|
||||
|
||||
static equals(a: Version | PlainMessage<Version> | undefined, b: Version | PlainMessage<Version> | undefined): boolean {
|
||||
return proto3.util.equals(Version, a, b);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { DropTablesRequest, DropTablesResponse, SeedDatabaseRequest, SeedDatabaseResponse } from "./system_service_pb.js";
|
||||
import { DropTablesRequest, DropTablesResponse, GetVersionRequest, GetVersionResponse, SeedDatabaseRequest, SeedDatabaseResponse } from "./system_service_pb.js";
|
||||
import { MethodKind } from "@bufbuild/protobuf";
|
||||
|
||||
/**
|
||||
@@ -13,12 +13,12 @@ export const SystemService = {
|
||||
typeName: "holos.system.v1alpha1.SystemService",
|
||||
methods: {
|
||||
/**
|
||||
* @generated from rpc holos.system.v1alpha1.SystemService.SeedDatabase
|
||||
* @generated from rpc holos.system.v1alpha1.SystemService.GetVersion
|
||||
*/
|
||||
seedDatabase: {
|
||||
name: "SeedDatabase",
|
||||
I: SeedDatabaseRequest,
|
||||
O: SeedDatabaseResponse,
|
||||
getVersion: {
|
||||
name: "GetVersion",
|
||||
I: GetVersionRequest,
|
||||
O: GetVersionResponse,
|
||||
kind: MethodKind.Unary,
|
||||
},
|
||||
/**
|
||||
@@ -30,6 +30,15 @@ export const SystemService = {
|
||||
O: DropTablesResponse,
|
||||
kind: MethodKind.Unary,
|
||||
},
|
||||
/**
|
||||
* @generated from rpc holos.system.v1alpha1.SystemService.SeedDatabase
|
||||
*/
|
||||
seedDatabase: {
|
||||
name: "SeedDatabase",
|
||||
I: SeedDatabaseRequest,
|
||||
O: SeedDatabaseResponse,
|
||||
kind: MethodKind.Unary,
|
||||
},
|
||||
}
|
||||
} as const;
|
||||
|
||||
|
||||
@@ -4,7 +4,84 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
|
||||
import { Message, proto3 } from "@bufbuild/protobuf";
|
||||
import { FieldMask, Message, proto3 } from "@bufbuild/protobuf";
|
||||
import { Version } from "./system_pb.js";
|
||||
|
||||
/**
|
||||
* @generated from message holos.system.v1alpha1.GetVersionRequest
|
||||
*/
|
||||
export class GetVersionRequest extends Message<GetVersionRequest> {
|
||||
/**
|
||||
* FieldMask represents the fields to include in the response.
|
||||
*
|
||||
* @generated from field: google.protobuf.FieldMask field_mask = 1;
|
||||
*/
|
||||
fieldMask?: FieldMask;
|
||||
|
||||
constructor(data?: PartialMessage<GetVersionRequest>) {
|
||||
super();
|
||||
proto3.util.initPartial(data, this);
|
||||
}
|
||||
|
||||
static readonly runtime: typeof proto3 = proto3;
|
||||
static readonly typeName = "holos.system.v1alpha1.GetVersionRequest";
|
||||
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
||||
{ no: 1, name: "field_mask", kind: "message", T: FieldMask },
|
||||
]);
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetVersionRequest {
|
||||
return new GetVersionRequest().fromBinary(bytes, options);
|
||||
}
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetVersionRequest {
|
||||
return new GetVersionRequest().fromJson(jsonValue, options);
|
||||
}
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetVersionRequest {
|
||||
return new GetVersionRequest().fromJsonString(jsonString, options);
|
||||
}
|
||||
|
||||
static equals(a: GetVersionRequest | PlainMessage<GetVersionRequest> | undefined, b: GetVersionRequest | PlainMessage<GetVersionRequest> | undefined): boolean {
|
||||
return proto3.util.equals(GetVersionRequest, a, b);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated from message holos.system.v1alpha1.GetVersionResponse
|
||||
*/
|
||||
export class GetVersionResponse extends Message<GetVersionResponse> {
|
||||
/**
|
||||
* @generated from field: holos.system.v1alpha1.Version version = 1;
|
||||
*/
|
||||
version?: Version;
|
||||
|
||||
constructor(data?: PartialMessage<GetVersionResponse>) {
|
||||
super();
|
||||
proto3.util.initPartial(data, this);
|
||||
}
|
||||
|
||||
static readonly runtime: typeof proto3 = proto3;
|
||||
static readonly typeName = "holos.system.v1alpha1.GetVersionResponse";
|
||||
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
||||
{ no: 1, name: "version", kind: "message", T: Version },
|
||||
]);
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetVersionResponse {
|
||||
return new GetVersionResponse().fromBinary(bytes, options);
|
||||
}
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetVersionResponse {
|
||||
return new GetVersionResponse().fromJson(jsonValue, options);
|
||||
}
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetVersionResponse {
|
||||
return new GetVersionResponse().fromJsonString(jsonString, options);
|
||||
}
|
||||
|
||||
static equals(a: GetVersionResponse | PlainMessage<GetVersionResponse> | undefined, b: GetVersionResponse | PlainMessage<GetVersionResponse> | undefined): boolean {
|
||||
return proto3.util.equals(GetVersionResponse, a, b);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated from message holos.system.v1alpha1.SeedDatabaseRequest
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
</button>
|
||||
}
|
||||
</span>
|
||||
<app-version-button></app-version-button>
|
||||
<app-profile-button [user$]="user$"></app-profile-button>
|
||||
</mat-toolbar>
|
||||
<main class="main-content">
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
|
||||
import { AsyncPipe, NgIf } from '@angular/common';
|
||||
import { MatToolbarModule } from '@angular/material/toolbar';
|
||||
import { Component, OnDestroy, OnInit, inject } from '@angular/core';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatSidenavModule } from '@angular/material/sidenav';
|
||||
import { MatListModule } from '@angular/material/list';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map, shareReplay } from 'rxjs/operators';
|
||||
import { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
import { ProfileButtonComponent } from '../profile-button/profile-button.component';
|
||||
import { User } from '../gen/holos/user/v1alpha1/user_pb';
|
||||
import { UserService } from '../services/user.service';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatListModule } from '@angular/material/list';
|
||||
import { MatSidenavModule } from '@angular/material/sidenav';
|
||||
import { MatToolbarModule } from '@angular/material/toolbar';
|
||||
import { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router';
|
||||
import { Observable, Subject } from 'rxjs';
|
||||
import { map, shareReplay, takeUntil } from 'rxjs/operators';
|
||||
import { Organization } from '../gen/holos/organization/v1alpha1/organization_pb';
|
||||
import { User } from '../gen/holos/user/v1alpha1/user_pb';
|
||||
import { ProfileButtonComponent } from '../profile-button/profile-button.component';
|
||||
import { OrganizationService } from '../services/organization.service';
|
||||
import { UserService } from '../services/user.service';
|
||||
import { VersionButtonComponent } from '../version-button/version-button.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-nav',
|
||||
@@ -34,28 +35,35 @@ import { OrganizationService } from '../services/organization.service';
|
||||
RouterOutlet,
|
||||
MatCardModule,
|
||||
ProfileButtonComponent,
|
||||
VersionButtonComponent,
|
||||
]
|
||||
})
|
||||
export class NavComponent implements OnInit {
|
||||
export class NavComponent implements OnInit, OnDestroy {
|
||||
private breakpointObserver = inject(BreakpointObserver);
|
||||
private userService = inject(UserService);
|
||||
private orgService = inject(OrganizationService);
|
||||
private destroy$: Subject<boolean> = new Subject<boolean>();
|
||||
|
||||
user$!: Observable<User | null>;
|
||||
org$!: Observable<Organization | undefined>;
|
||||
|
||||
refreshOrg(): void {
|
||||
this.orgService.refreshOrganizations()
|
||||
}
|
||||
|
||||
isHandset$: Observable<boolean> = this.breakpointObserver.observe(Breakpoints.Handset)
|
||||
.pipe(
|
||||
map(result => result.matches),
|
||||
shareReplay()
|
||||
);
|
||||
|
||||
refreshOrg(): void {
|
||||
this.orgService.refreshOrganizations()
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.user$ = this.userService.getUser();
|
||||
this.org$ = this.orgService.activeOrg();
|
||||
this.user$ = this.userService.getUser().pipe(takeUntil(this.destroy$));
|
||||
this.org$ = this.orgService.activeOrg().pipe(takeUntil(this.destroy$));
|
||||
}
|
||||
|
||||
public ngOnDestroy(): void {
|
||||
this.destroy$.next(true);
|
||||
this.destroy$.complete();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Inject, Injectable } from '@angular/core';
|
||||
import { FieldMask, JsonValue, Struct } from '@bufbuild/protobuf';
|
||||
import { Observable, of, switchMap } from 'rxjs';
|
||||
import { ObservableClient } from '../../connect/observable-client';
|
||||
import { Organization } from '../gen/holos/organization/v1alpha1/organization_pb';
|
||||
import { Platform } from '../gen/holos/platform/v1alpha1/platform_pb';
|
||||
import { PlatformService as ConnectPlatformService } from '../gen/holos/platform/v1alpha1/platform_service_connect';
|
||||
import { Platform, Spec } from '../gen/holos/platform/v1alpha1/platform_pb';
|
||||
import { GetPlatformRequest, ListPlatformsRequest, UpdatePlatformOperation, UpdatePlatformRequest } from '../gen/holos/platform/v1alpha1/platform_service_pb';
|
||||
import { FieldMask, JsonValue, Struct } from '@bufbuild/protobuf';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { SystemService } from './system.service';
|
||||
|
||||
describe('SystemService', () => {
|
||||
let service: SystemService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(SystemService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
22
internal/frontend/holos/src/app/services/system.service.ts
Normal file
22
internal/frontend/holos/src/app/services/system.service.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { Inject, Injectable } from '@angular/core';
|
||||
import { Observable, of, switchMap } from 'rxjs';
|
||||
import { ObservableClient } from '../../connect/observable-client';
|
||||
import { Version } from '../gen/holos/system/v1alpha1/system_pb';
|
||||
import { SystemService as ConnectSystemService } from '../gen/holos/system/v1alpha1/system_service_connect';
|
||||
import { GetVersionRequest } from '../gen/holos/system/v1alpha1/system_service_pb';
|
||||
import { FieldMask } from '@bufbuild/protobuf';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class SystemService {
|
||||
getVersion(): Observable<Version | undefined> {
|
||||
const fieldMask = new FieldMask({ paths: ["version", "git_commit", "go_version", "os", "arch"] })
|
||||
const req = new GetVersionRequest({ fieldMask: fieldMask })
|
||||
return this.client.getVersion(req).pipe(
|
||||
switchMap(resp => { return of(resp.version) })
|
||||
)
|
||||
}
|
||||
|
||||
constructor(@Inject(ConnectSystemService) private client: ObservableClient<typeof ConnectSystemService>) { }
|
||||
}
|
||||
8
internal/frontend/holos/src/app/truncate.pipe.spec.ts
Normal file
8
internal/frontend/holos/src/app/truncate.pipe.spec.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { TruncatePipe } from './truncate.pipe';
|
||||
|
||||
describe('TruncatePipe', () => {
|
||||
it('create an instance', () => {
|
||||
const pipe = new TruncatePipe();
|
||||
expect(pipe).toBeTruthy();
|
||||
});
|
||||
});
|
||||
13
internal/frontend/holos/src/app/truncate.pipe.ts
Normal file
13
internal/frontend/holos/src/app/truncate.pipe.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
|
||||
@Pipe({
|
||||
name: 'truncate',
|
||||
standalone: true
|
||||
})
|
||||
export class TruncatePipe implements PipeTransform {
|
||||
|
||||
transform(value: string, limit: number = 8): string {
|
||||
if (!value) return '';
|
||||
return value.length > limit ? value.substring(0, limit) : value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
@if (version$ | async; as version) {
|
||||
<button mat-button [matMenuTriggerFor]="menu">
|
||||
{{ version.version }}
|
||||
</button>
|
||||
|
||||
<mat-menu class="version-menu" #menu="matMenu">
|
||||
<mat-card class="version-card">
|
||||
<mat-card-header>
|
||||
<mat-card-title>{{ version.version }}</mat-card-title>
|
||||
<mat-card-subtitle>Server version info</mat-card-subtitle>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<pre>Git: {{ version.gitCommit | truncate }}</pre>
|
||||
<pre>Go: {{ version.goVersion | truncate }}</pre>
|
||||
<pre>OS: {{ version.os | truncate }}</pre>
|
||||
<pre>Arch: {{ version.arch | truncate }}</pre>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<button mat-button (click)="refreshVersion()" [disabled]="isLoading">Refresh</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</mat-menu>
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { VersionButtonComponent } from './version-button.component';
|
||||
|
||||
describe('VersionButtonComponent', () => {
|
||||
let component: VersionButtonComponent;
|
||||
let fixture: ComponentFixture<VersionButtonComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [VersionButtonComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(VersionButtonComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,58 @@
|
||||
import { AsyncPipe, NgIf, NgStyle } from '@angular/common';
|
||||
import { Component, OnDestroy, OnInit, inject } from '@angular/core';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatMenuModule } from '@angular/material/menu';
|
||||
import { Observable, Subject, of, startWith, switchMap, takeUntil } from 'rxjs';
|
||||
import { Version } from '../gen/holos/system/v1alpha1/system_pb';
|
||||
import { SystemService } from '../services/system.service';
|
||||
import { TruncatePipe } from '../truncate.pipe';
|
||||
import { MatDivider } from '@angular/material/divider';
|
||||
|
||||
@Component({
|
||||
selector: 'app-version-button',
|
||||
standalone: true,
|
||||
imports: [
|
||||
AsyncPipe,
|
||||
MatButtonModule,
|
||||
MatCardModule,
|
||||
MatDivider,
|
||||
MatIconModule,
|
||||
MatMenuModule,
|
||||
NgIf,
|
||||
NgStyle,
|
||||
TruncatePipe,
|
||||
],
|
||||
templateUrl: './version-button.component.html',
|
||||
styleUrl: './version-button.component.scss'
|
||||
})
|
||||
export class VersionButtonComponent implements OnInit, OnDestroy {
|
||||
private destroy$: Subject<boolean> = new Subject<boolean>();
|
||||
private refreshVersion$ = new Subject<boolean>();
|
||||
private systemService = inject(SystemService);
|
||||
version$!: Observable<Version | undefined>;
|
||||
isLoading = false;
|
||||
|
||||
refreshVersion(): void {
|
||||
this.refreshVersion$.next(true);
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.version$ = this.refreshVersion$.pipe(
|
||||
takeUntil(this.destroy$),
|
||||
startWith(true),
|
||||
switchMap(() => {
|
||||
this.isLoading = true;
|
||||
return this.systemService.getVersion().pipe(
|
||||
switchMap((version) => { this.isLoading = false; return of(version); })
|
||||
);
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
public ngOnDestroy(): void {
|
||||
this.destroy$.next(true);
|
||||
this.destroy$.complete();
|
||||
}
|
||||
}
|
||||
@@ -3,14 +3,14 @@ import { Component, Input, OnDestroy, inject } from '@angular/core';
|
||||
import { FormGroup, ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatButton } from '@angular/material/button';
|
||||
import { MatDivider } from '@angular/material/divider';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { MatTab, MatTabGroup } from '@angular/material/tabs';
|
||||
import { JsonValue } from '@bufbuild/protobuf';
|
||||
import { FormlyFieldConfig, FormlyFormOptions, FormlyModule } from '@ngx-formly/core';
|
||||
import { FormlyMaterialModule } from '@ngx-formly/material';
|
||||
import { Subject, takeUntil } from 'rxjs';
|
||||
import { PlatformService } from '../../services/platform.service';
|
||||
import { Platform } from '../../gen/holos/platform/v1alpha1/platform_pb';
|
||||
import { MatSnackBar, MatSnackBarModule } from '@angular/material/snack-bar';
|
||||
import { PlatformService } from '../../services/platform.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-platform-detail',
|
||||
|
||||
@@ -73,7 +73,7 @@ func (h *PlatformHandler) GetPlatform(ctx context.Context, req *connect.Request[
|
||||
}
|
||||
rpcPlatform := PlatformToRPC(dbPlatform)
|
||||
|
||||
mask, err := fieldmask_utils.MaskFromPaths(req.Msg.GetFieldMask().GetPaths(), strings.PascalCase)
|
||||
mask, err := fieldmask_utils.MaskFromProtoFieldMask(req.Msg.GetFieldMask(), strings.PascalCase)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInvalidArgument, errors.Wrap(err))
|
||||
}
|
||||
@@ -95,7 +95,7 @@ func (h *PlatformHandler) ListPlatforms(ctx context.Context, req *connect.Reques
|
||||
return nil, errors.Wrap(err)
|
||||
}
|
||||
|
||||
mask, err := fieldmask_utils.MaskFromPaths(req.Msg.GetFieldMask().GetPaths(), strings.PascalCase)
|
||||
mask, err := fieldmask_utils.MaskFromProtoFieldMask(req.Msg.GetFieldMask(), strings.PascalCase)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInvalidArgument, errors.Wrap(err))
|
||||
}
|
||||
@@ -348,7 +348,9 @@ func rpcPlatforms(reqDBOrg *ent.Organization, mask fieldmask_utils.Mask) ([]*pla
|
||||
// fieldmask_utils.StructToMap. This is here largely as an placeholder to
|
||||
// remember we can mutate the value if we want.
|
||||
func newVisitor(ctx context.Context) func(filter fieldmask_utils.FieldFilter, src, dst reflect.Value, srcFieldName, dstFieldName string, srcFieldValue reflect.Value) fieldmask_utils.MapVisitorResult {
|
||||
log := logger.FromContext(ctx)
|
||||
return func(filter fieldmask_utils.FieldFilter, src, dst reflect.Value, srcFieldName, dstFieldName string, srcFieldValue reflect.Value) fieldmask_utils.MapVisitorResult {
|
||||
log.DebugContext(ctx, "visitor", "srcFieldName", srcFieldName, "dstFieldName", dstFieldName)
|
||||
return fieldmask_utils.MapVisitorResult{
|
||||
UpdatedDst: &dst,
|
||||
}
|
||||
|
||||
@@ -13,8 +13,11 @@ import (
|
||||
"github.com/holos-run/holos/internal/errors"
|
||||
"github.com/holos-run/holos/internal/server/middleware/authn"
|
||||
"github.com/holos-run/holos/internal/server/middleware/logger"
|
||||
holosstrings "github.com/holos-run/holos/internal/strings"
|
||||
storage "github.com/holos-run/holos/service/gen/holos/storage/v1alpha1"
|
||||
system "github.com/holos-run/holos/service/gen/holos/system/v1alpha1"
|
||||
"github.com/holos-run/holos/version"
|
||||
fieldmask_utils "github.com/mennanov/fieldmask-utils"
|
||||
)
|
||||
|
||||
const AdminEmail = "jeff@openinfrastructure.co"
|
||||
@@ -41,6 +44,26 @@ func (h *SystemHandler) checkAdmin(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (h *SystemHandler) GetVersion(ctx context.Context, req *connect.Request[system.GetVersionRequest]) (*connect.Response[system.GetVersionResponse], error) {
|
||||
_, err := authn.FromContext(ctx)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodePermissionDenied, errors.Wrap(err))
|
||||
}
|
||||
|
||||
mask, err := fieldmask_utils.MaskFromProtoFieldMask(req.Msg.GetFieldMask(), holosstrings.PascalCase)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err)
|
||||
}
|
||||
|
||||
srcVersion := version.NewVersionInfo()
|
||||
var rpcVersion system.Version
|
||||
if err := fieldmask_utils.StructToStruct(mask, &srcVersion, &rpcVersion); err != nil {
|
||||
return nil, errors.Wrap(err)
|
||||
}
|
||||
|
||||
return connect.NewResponse(&system.GetVersionResponse{Version: &rpcVersion}), nil
|
||||
}
|
||||
|
||||
func (h *SystemHandler) DropTables(ctx context.Context, req *connect.Request[system.DropTablesRequest]) (*connect.Response[system.DropTablesResponse], error) {
|
||||
if err := h.checkAdmin(ctx); err != nil {
|
||||
return nil, err
|
||||
|
||||
206
service/gen/holos/system/v1alpha1/system.pb.go
Normal file
206
service/gen/holos/system/v1alpha1/system.pb.go
Normal file
@@ -0,0 +1,206 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0-devel
|
||||
// protoc (unknown)
|
||||
// source: holos/system/v1alpha1/system.proto
|
||||
|
||||
package system
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type Version struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
|
||||
GitCommit string `protobuf:"bytes,2,opt,name=git_commit,json=gitCommit,proto3" json:"git_commit,omitempty"`
|
||||
GitTreeState string `protobuf:"bytes,3,opt,name=git_tree_state,json=gitTreeState,proto3" json:"git_tree_state,omitempty"`
|
||||
GoVersion string `protobuf:"bytes,4,opt,name=go_version,json=goVersion,proto3" json:"go_version,omitempty"`
|
||||
BuildDate string `protobuf:"bytes,5,opt,name=build_date,json=buildDate,proto3" json:"build_date,omitempty"`
|
||||
Os string `protobuf:"bytes,6,opt,name=os,proto3" json:"os,omitempty"`
|
||||
Arch string `protobuf:"bytes,7,opt,name=arch,proto3" json:"arch,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Version) Reset() {
|
||||
*x = Version{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_holos_system_v1alpha1_system_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Version) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Version) ProtoMessage() {}
|
||||
|
||||
func (x *Version) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_holos_system_v1alpha1_system_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Version.ProtoReflect.Descriptor instead.
|
||||
func (*Version) Descriptor() ([]byte, []int) {
|
||||
return file_holos_system_v1alpha1_system_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Version) GetVersion() string {
|
||||
if x != nil {
|
||||
return x.Version
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Version) GetGitCommit() string {
|
||||
if x != nil {
|
||||
return x.GitCommit
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Version) GetGitTreeState() string {
|
||||
if x != nil {
|
||||
return x.GitTreeState
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Version) GetGoVersion() string {
|
||||
if x != nil {
|
||||
return x.GoVersion
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Version) GetBuildDate() string {
|
||||
if x != nil {
|
||||
return x.BuildDate
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Version) GetOs() string {
|
||||
if x != nil {
|
||||
return x.Os
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Version) GetArch() string {
|
||||
if x != nil {
|
||||
return x.Arch
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_holos_system_v1alpha1_system_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_holos_system_v1alpha1_system_proto_rawDesc = []byte{
|
||||
0x0a, 0x22, 0x68, 0x6f, 0x6c, 0x6f, 0x73, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x76,
|
||||
0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x68, 0x6f, 0x6c, 0x6f, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74,
|
||||
0x65, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x22, 0xca, 0x01, 0x0a, 0x07,
|
||||
0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69,
|
||||
0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
|
||||
0x12, 0x24, 0x0a, 0x0e, 0x67, 0x69, 0x74, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x73, 0x74, 0x61,
|
||||
0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x67, 0x69, 0x74, 0x54, 0x72, 0x65,
|
||||
0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x6f, 0x5f, 0x76, 0x65, 0x72,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x6f, 0x56, 0x65,
|
||||
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x64,
|
||||
0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64,
|
||||
0x44, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x02, 0x6f, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x63, 0x68, 0x42, 0x45, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68,
|
||||
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x6f, 0x6c, 0x6f, 0x73, 0x2d, 0x72, 0x75, 0x6e,
|
||||
0x2f, 0x68, 0x6f, 0x6c, 0x6f, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x67,
|
||||
0x65, 0x6e, 0x2f, 0x68, 0x6f, 0x6c, 0x6f, 0x73, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f,
|
||||
0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_holos_system_v1alpha1_system_proto_rawDescOnce sync.Once
|
||||
file_holos_system_v1alpha1_system_proto_rawDescData = file_holos_system_v1alpha1_system_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_holos_system_v1alpha1_system_proto_rawDescGZIP() []byte {
|
||||
file_holos_system_v1alpha1_system_proto_rawDescOnce.Do(func() {
|
||||
file_holos_system_v1alpha1_system_proto_rawDescData = protoimpl.X.CompressGZIP(file_holos_system_v1alpha1_system_proto_rawDescData)
|
||||
})
|
||||
return file_holos_system_v1alpha1_system_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_holos_system_v1alpha1_system_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_holos_system_v1alpha1_system_proto_goTypes = []interface{}{
|
||||
(*Version)(nil), // 0: holos.system.v1alpha1.Version
|
||||
}
|
||||
var file_holos_system_v1alpha1_system_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_holos_system_v1alpha1_system_proto_init() }
|
||||
func file_holos_system_v1alpha1_system_proto_init() {
|
||||
if File_holos_system_v1alpha1_system_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_holos_system_v1alpha1_system_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Version); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_holos_system_v1alpha1_system_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_holos_system_v1alpha1_system_proto_goTypes,
|
||||
DependencyIndexes: file_holos_system_v1alpha1_system_proto_depIdxs,
|
||||
MessageInfos: file_holos_system_v1alpha1_system_proto_msgTypes,
|
||||
}.Build()
|
||||
File_holos_system_v1alpha1_system_proto = out.File
|
||||
file_holos_system_v1alpha1_system_proto_rawDesc = nil
|
||||
file_holos_system_v1alpha1_system_proto_goTypes = nil
|
||||
file_holos_system_v1alpha1_system_proto_depIdxs = nil
|
||||
}
|
||||
@@ -9,6 +9,7 @@ package system
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
@@ -20,6 +21,101 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type GetVersionRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// FieldMask represents the fields to include in the response.
|
||||
FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,1,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetVersionRequest) Reset() {
|
||||
*x = GetVersionRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_holos_system_v1alpha1_system_service_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetVersionRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetVersionRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetVersionRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_holos_system_v1alpha1_system_service_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetVersionRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetVersionRequest) Descriptor() ([]byte, []int) {
|
||||
return file_holos_system_v1alpha1_system_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *GetVersionRequest) GetFieldMask() *fieldmaskpb.FieldMask {
|
||||
if x != nil {
|
||||
return x.FieldMask
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetVersionResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Version *Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetVersionResponse) Reset() {
|
||||
*x = GetVersionResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_holos_system_v1alpha1_system_service_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetVersionResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetVersionResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetVersionResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_holos_system_v1alpha1_system_service_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetVersionResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetVersionResponse) Descriptor() ([]byte, []int) {
|
||||
return file_holos_system_v1alpha1_system_service_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GetVersionResponse) GetVersion() *Version {
|
||||
if x != nil {
|
||||
return x.Version
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type SeedDatabaseRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -29,7 +125,7 @@ type SeedDatabaseRequest struct {
|
||||
func (x *SeedDatabaseRequest) Reset() {
|
||||
*x = SeedDatabaseRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_holos_system_v1alpha1_system_service_proto_msgTypes[0]
|
||||
mi := &file_holos_system_v1alpha1_system_service_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -42,7 +138,7 @@ func (x *SeedDatabaseRequest) String() string {
|
||||
func (*SeedDatabaseRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SeedDatabaseRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_holos_system_v1alpha1_system_service_proto_msgTypes[0]
|
||||
mi := &file_holos_system_v1alpha1_system_service_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -55,7 +151,7 @@ func (x *SeedDatabaseRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use SeedDatabaseRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SeedDatabaseRequest) Descriptor() ([]byte, []int) {
|
||||
return file_holos_system_v1alpha1_system_service_proto_rawDescGZIP(), []int{0}
|
||||
return file_holos_system_v1alpha1_system_service_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
type SeedDatabaseResponse struct {
|
||||
@@ -67,7 +163,7 @@ type SeedDatabaseResponse struct {
|
||||
func (x *SeedDatabaseResponse) Reset() {
|
||||
*x = SeedDatabaseResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_holos_system_v1alpha1_system_service_proto_msgTypes[1]
|
||||
mi := &file_holos_system_v1alpha1_system_service_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -80,7 +176,7 @@ func (x *SeedDatabaseResponse) String() string {
|
||||
func (*SeedDatabaseResponse) ProtoMessage() {}
|
||||
|
||||
func (x *SeedDatabaseResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_holos_system_v1alpha1_system_service_proto_msgTypes[1]
|
||||
mi := &file_holos_system_v1alpha1_system_service_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -93,7 +189,7 @@ func (x *SeedDatabaseResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use SeedDatabaseResponse.ProtoReflect.Descriptor instead.
|
||||
func (*SeedDatabaseResponse) Descriptor() ([]byte, []int) {
|
||||
return file_holos_system_v1alpha1_system_service_proto_rawDescGZIP(), []int{1}
|
||||
return file_holos_system_v1alpha1_system_service_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
type DropTablesRequest struct {
|
||||
@@ -105,7 +201,7 @@ type DropTablesRequest struct {
|
||||
func (x *DropTablesRequest) Reset() {
|
||||
*x = DropTablesRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_holos_system_v1alpha1_system_service_proto_msgTypes[2]
|
||||
mi := &file_holos_system_v1alpha1_system_service_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -118,7 +214,7 @@ func (x *DropTablesRequest) String() string {
|
||||
func (*DropTablesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DropTablesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_holos_system_v1alpha1_system_service_proto_msgTypes[2]
|
||||
mi := &file_holos_system_v1alpha1_system_service_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -131,7 +227,7 @@ func (x *DropTablesRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DropTablesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DropTablesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_holos_system_v1alpha1_system_service_proto_rawDescGZIP(), []int{2}
|
||||
return file_holos_system_v1alpha1_system_service_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
type DropTablesResponse struct {
|
||||
@@ -143,7 +239,7 @@ type DropTablesResponse struct {
|
||||
func (x *DropTablesResponse) Reset() {
|
||||
*x = DropTablesResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_holos_system_v1alpha1_system_service_proto_msgTypes[3]
|
||||
mi := &file_holos_system_v1alpha1_system_service_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -156,7 +252,7 @@ func (x *DropTablesResponse) String() string {
|
||||
func (*DropTablesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DropTablesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_holos_system_v1alpha1_system_service_proto_msgTypes[3]
|
||||
mi := &file_holos_system_v1alpha1_system_service_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -169,7 +265,7 @@ func (x *DropTablesResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DropTablesResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DropTablesResponse) Descriptor() ([]byte, []int) {
|
||||
return file_holos_system_v1alpha1_system_service_proto_rawDescGZIP(), []int{3}
|
||||
return file_holos_system_v1alpha1_system_service_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
var File_holos_system_v1alpha1_system_service_proto protoreflect.FileDescriptor
|
||||
@@ -179,31 +275,52 @@ var file_holos_system_v1alpha1_system_service_proto_rawDesc = []byte{
|
||||
0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x73,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x68, 0x6f,
|
||||
0x6c, 0x6f, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
|
||||
0x68, 0x61, 0x31, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x65, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x62,
|
||||
0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x16, 0x0a, 0x14, 0x53, 0x65,
|
||||
0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x44, 0x72, 0x6f, 0x70, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x72, 0x6f, 0x70, 0x54,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xdf, 0x01,
|
||||
0x0a, 0x0d, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
|
||||
0x69, 0x0a, 0x0c, 0x53, 0x65, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12,
|
||||
0x2a, 0x2e, 0x68, 0x6f, 0x6c, 0x6f, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76,
|
||||
0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61,
|
||||
0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x68, 0x6f,
|
||||
0x6c, 0x6f, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
|
||||
0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
|
||||
0x68, 0x61, 0x31, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x68, 0x6f, 0x6c, 0x6f, 0x73, 0x2f, 0x73, 0x79, 0x73,
|
||||
0x74, 0x65, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x73,
|
||||
0x74, 0x65, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4e, 0x0a, 0x11, 0x47, 0x65, 0x74,
|
||||
0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39,
|
||||
0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x09,
|
||||
0x66, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x4e, 0x0a, 0x12, 0x47, 0x65, 0x74,
|
||||
0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x38, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x1e, 0x2e, 0x68, 0x6f, 0x6c, 0x6f, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e,
|
||||
0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x65, 0x65,
|
||||
0x64, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x22, 0x16, 0x0a, 0x14, 0x53, 0x65, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x44, 0x72, 0x6f, 0x70,
|
||||
0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x14, 0x0a,
|
||||
0x12, 0x44, 0x72, 0x6f, 0x70, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x32, 0xc4, 0x02, 0x0a, 0x0d, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x63, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x68, 0x6f, 0x6c, 0x6f, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74,
|
||||
0x65, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56,
|
||||
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e,
|
||||
0x68, 0x6f, 0x6c, 0x6f, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x31, 0x61,
|
||||
0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x63, 0x0a, 0x0a, 0x44, 0x72,
|
||||
0x6f, 0x70, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x28, 0x2e, 0x68, 0x6f, 0x6c, 0x6f, 0x73,
|
||||
0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
|
||||
0x2e, 0x44, 0x72, 0x6f, 0x70, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x29, 0x2e, 0x68, 0x6f, 0x6c, 0x6f, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65,
|
||||
0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x54,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42,
|
||||
0x45, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x6f,
|
||||
0x6c, 0x6f, 0x73, 0x2d, 0x72, 0x75, 0x6e, 0x2f, 0x68, 0x6f, 0x6c, 0x6f, 0x73, 0x2f, 0x73, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x68, 0x6f, 0x6c, 0x6f, 0x73, 0x2f,
|
||||
0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b,
|
||||
0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
|
||||
0x69, 0x0a, 0x0c, 0x53, 0x65, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12,
|
||||
0x2a, 0x2e, 0x68, 0x6f, 0x6c, 0x6f, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76,
|
||||
0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61,
|
||||
0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x68, 0x6f,
|
||||
0x6c, 0x6f, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
|
||||
0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x45, 0x5a, 0x43, 0x67, 0x69,
|
||||
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x6f, 0x6c, 0x6f, 0x73, 0x2d, 0x72,
|
||||
0x75, 0x6e, 0x2f, 0x68, 0x6f, 0x6c, 0x6f, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x68, 0x6f, 0x6c, 0x6f, 0x73, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65,
|
||||
0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x73, 0x79, 0x73, 0x74, 0x65,
|
||||
0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -218,23 +335,31 @@ func file_holos_system_v1alpha1_system_service_proto_rawDescGZIP() []byte {
|
||||
return file_holos_system_v1alpha1_system_service_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_holos_system_v1alpha1_system_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_holos_system_v1alpha1_system_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_holos_system_v1alpha1_system_service_proto_goTypes = []interface{}{
|
||||
(*SeedDatabaseRequest)(nil), // 0: holos.system.v1alpha1.SeedDatabaseRequest
|
||||
(*SeedDatabaseResponse)(nil), // 1: holos.system.v1alpha1.SeedDatabaseResponse
|
||||
(*DropTablesRequest)(nil), // 2: holos.system.v1alpha1.DropTablesRequest
|
||||
(*DropTablesResponse)(nil), // 3: holos.system.v1alpha1.DropTablesResponse
|
||||
(*GetVersionRequest)(nil), // 0: holos.system.v1alpha1.GetVersionRequest
|
||||
(*GetVersionResponse)(nil), // 1: holos.system.v1alpha1.GetVersionResponse
|
||||
(*SeedDatabaseRequest)(nil), // 2: holos.system.v1alpha1.SeedDatabaseRequest
|
||||
(*SeedDatabaseResponse)(nil), // 3: holos.system.v1alpha1.SeedDatabaseResponse
|
||||
(*DropTablesRequest)(nil), // 4: holos.system.v1alpha1.DropTablesRequest
|
||||
(*DropTablesResponse)(nil), // 5: holos.system.v1alpha1.DropTablesResponse
|
||||
(*fieldmaskpb.FieldMask)(nil), // 6: google.protobuf.FieldMask
|
||||
(*Version)(nil), // 7: holos.system.v1alpha1.Version
|
||||
}
|
||||
var file_holos_system_v1alpha1_system_service_proto_depIdxs = []int32{
|
||||
0, // 0: holos.system.v1alpha1.SystemService.SeedDatabase:input_type -> holos.system.v1alpha1.SeedDatabaseRequest
|
||||
2, // 1: holos.system.v1alpha1.SystemService.DropTables:input_type -> holos.system.v1alpha1.DropTablesRequest
|
||||
1, // 2: holos.system.v1alpha1.SystemService.SeedDatabase:output_type -> holos.system.v1alpha1.SeedDatabaseResponse
|
||||
3, // 3: holos.system.v1alpha1.SystemService.DropTables:output_type -> holos.system.v1alpha1.DropTablesResponse
|
||||
2, // [2:4] is the sub-list for method output_type
|
||||
0, // [0:2] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
6, // 0: holos.system.v1alpha1.GetVersionRequest.field_mask:type_name -> google.protobuf.FieldMask
|
||||
7, // 1: holos.system.v1alpha1.GetVersionResponse.version:type_name -> holos.system.v1alpha1.Version
|
||||
0, // 2: holos.system.v1alpha1.SystemService.GetVersion:input_type -> holos.system.v1alpha1.GetVersionRequest
|
||||
4, // 3: holos.system.v1alpha1.SystemService.DropTables:input_type -> holos.system.v1alpha1.DropTablesRequest
|
||||
2, // 4: holos.system.v1alpha1.SystemService.SeedDatabase:input_type -> holos.system.v1alpha1.SeedDatabaseRequest
|
||||
1, // 5: holos.system.v1alpha1.SystemService.GetVersion:output_type -> holos.system.v1alpha1.GetVersionResponse
|
||||
5, // 6: holos.system.v1alpha1.SystemService.DropTables:output_type -> holos.system.v1alpha1.DropTablesResponse
|
||||
3, // 7: holos.system.v1alpha1.SystemService.SeedDatabase:output_type -> holos.system.v1alpha1.SeedDatabaseResponse
|
||||
5, // [5:8] is the sub-list for method output_type
|
||||
2, // [2:5] 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
|
||||
}
|
||||
|
||||
func init() { file_holos_system_v1alpha1_system_service_proto_init() }
|
||||
@@ -242,9 +367,10 @@ func file_holos_system_v1alpha1_system_service_proto_init() {
|
||||
if File_holos_system_v1alpha1_system_service_proto != nil {
|
||||
return
|
||||
}
|
||||
file_holos_system_v1alpha1_system_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_holos_system_v1alpha1_system_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SeedDatabaseRequest); i {
|
||||
switch v := v.(*GetVersionRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@@ -256,7 +382,7 @@ func file_holos_system_v1alpha1_system_service_proto_init() {
|
||||
}
|
||||
}
|
||||
file_holos_system_v1alpha1_system_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SeedDatabaseResponse); i {
|
||||
switch v := v.(*GetVersionResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@@ -268,7 +394,7 @@ func file_holos_system_v1alpha1_system_service_proto_init() {
|
||||
}
|
||||
}
|
||||
file_holos_system_v1alpha1_system_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DropTablesRequest); i {
|
||||
switch v := v.(*SeedDatabaseRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@@ -280,6 +406,30 @@ func file_holos_system_v1alpha1_system_service_proto_init() {
|
||||
}
|
||||
}
|
||||
file_holos_system_v1alpha1_system_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SeedDatabaseResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_holos_system_v1alpha1_system_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DropTablesRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_holos_system_v1alpha1_system_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DropTablesResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -298,7 +448,7 @@ func file_holos_system_v1alpha1_system_service_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_holos_system_v1alpha1_system_service_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 4,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
||||
@@ -33,25 +33,30 @@ const (
|
||||
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
|
||||
// period.
|
||||
const (
|
||||
// SystemServiceSeedDatabaseProcedure is the fully-qualified name of the SystemService's
|
||||
// SeedDatabase RPC.
|
||||
SystemServiceSeedDatabaseProcedure = "/holos.system.v1alpha1.SystemService/SeedDatabase"
|
||||
// SystemServiceGetVersionProcedure is the fully-qualified name of the SystemService's GetVersion
|
||||
// RPC.
|
||||
SystemServiceGetVersionProcedure = "/holos.system.v1alpha1.SystemService/GetVersion"
|
||||
// SystemServiceDropTablesProcedure is the fully-qualified name of the SystemService's DropTables
|
||||
// RPC.
|
||||
SystemServiceDropTablesProcedure = "/holos.system.v1alpha1.SystemService/DropTables"
|
||||
// SystemServiceSeedDatabaseProcedure is the fully-qualified name of the SystemService's
|
||||
// SeedDatabase RPC.
|
||||
SystemServiceSeedDatabaseProcedure = "/holos.system.v1alpha1.SystemService/SeedDatabase"
|
||||
)
|
||||
|
||||
// These variables are the protoreflect.Descriptor objects for the RPCs defined in this package.
|
||||
var (
|
||||
systemServiceServiceDescriptor = v1alpha1.File_holos_system_v1alpha1_system_service_proto.Services().ByName("SystemService")
|
||||
systemServiceSeedDatabaseMethodDescriptor = systemServiceServiceDescriptor.Methods().ByName("SeedDatabase")
|
||||
systemServiceGetVersionMethodDescriptor = systemServiceServiceDescriptor.Methods().ByName("GetVersion")
|
||||
systemServiceDropTablesMethodDescriptor = systemServiceServiceDescriptor.Methods().ByName("DropTables")
|
||||
systemServiceSeedDatabaseMethodDescriptor = systemServiceServiceDescriptor.Methods().ByName("SeedDatabase")
|
||||
)
|
||||
|
||||
// SystemServiceClient is a client for the holos.system.v1alpha1.SystemService service.
|
||||
type SystemServiceClient interface {
|
||||
SeedDatabase(context.Context, *connect.Request[v1alpha1.SeedDatabaseRequest]) (*connect.Response[v1alpha1.SeedDatabaseResponse], error)
|
||||
GetVersion(context.Context, *connect.Request[v1alpha1.GetVersionRequest]) (*connect.Response[v1alpha1.GetVersionResponse], error)
|
||||
DropTables(context.Context, *connect.Request[v1alpha1.DropTablesRequest]) (*connect.Response[v1alpha1.DropTablesResponse], error)
|
||||
SeedDatabase(context.Context, *connect.Request[v1alpha1.SeedDatabaseRequest]) (*connect.Response[v1alpha1.SeedDatabaseResponse], error)
|
||||
}
|
||||
|
||||
// NewSystemServiceClient constructs a client for the holos.system.v1alpha1.SystemService service.
|
||||
@@ -64,10 +69,10 @@ type SystemServiceClient interface {
|
||||
func NewSystemServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) SystemServiceClient {
|
||||
baseURL = strings.TrimRight(baseURL, "/")
|
||||
return &systemServiceClient{
|
||||
seedDatabase: connect.NewClient[v1alpha1.SeedDatabaseRequest, v1alpha1.SeedDatabaseResponse](
|
||||
getVersion: connect.NewClient[v1alpha1.GetVersionRequest, v1alpha1.GetVersionResponse](
|
||||
httpClient,
|
||||
baseURL+SystemServiceSeedDatabaseProcedure,
|
||||
connect.WithSchema(systemServiceSeedDatabaseMethodDescriptor),
|
||||
baseURL+SystemServiceGetVersionProcedure,
|
||||
connect.WithSchema(systemServiceGetVersionMethodDescriptor),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
dropTables: connect.NewClient[v1alpha1.DropTablesRequest, v1alpha1.DropTablesResponse](
|
||||
@@ -76,18 +81,25 @@ func NewSystemServiceClient(httpClient connect.HTTPClient, baseURL string, opts
|
||||
connect.WithSchema(systemServiceDropTablesMethodDescriptor),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
seedDatabase: connect.NewClient[v1alpha1.SeedDatabaseRequest, v1alpha1.SeedDatabaseResponse](
|
||||
httpClient,
|
||||
baseURL+SystemServiceSeedDatabaseProcedure,
|
||||
connect.WithSchema(systemServiceSeedDatabaseMethodDescriptor),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
// systemServiceClient implements SystemServiceClient.
|
||||
type systemServiceClient struct {
|
||||
seedDatabase *connect.Client[v1alpha1.SeedDatabaseRequest, v1alpha1.SeedDatabaseResponse]
|
||||
getVersion *connect.Client[v1alpha1.GetVersionRequest, v1alpha1.GetVersionResponse]
|
||||
dropTables *connect.Client[v1alpha1.DropTablesRequest, v1alpha1.DropTablesResponse]
|
||||
seedDatabase *connect.Client[v1alpha1.SeedDatabaseRequest, v1alpha1.SeedDatabaseResponse]
|
||||
}
|
||||
|
||||
// SeedDatabase calls holos.system.v1alpha1.SystemService.SeedDatabase.
|
||||
func (c *systemServiceClient) SeedDatabase(ctx context.Context, req *connect.Request[v1alpha1.SeedDatabaseRequest]) (*connect.Response[v1alpha1.SeedDatabaseResponse], error) {
|
||||
return c.seedDatabase.CallUnary(ctx, req)
|
||||
// GetVersion calls holos.system.v1alpha1.SystemService.GetVersion.
|
||||
func (c *systemServiceClient) GetVersion(ctx context.Context, req *connect.Request[v1alpha1.GetVersionRequest]) (*connect.Response[v1alpha1.GetVersionResponse], error) {
|
||||
return c.getVersion.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// DropTables calls holos.system.v1alpha1.SystemService.DropTables.
|
||||
@@ -95,10 +107,16 @@ func (c *systemServiceClient) DropTables(ctx context.Context, req *connect.Reque
|
||||
return c.dropTables.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// SeedDatabase calls holos.system.v1alpha1.SystemService.SeedDatabase.
|
||||
func (c *systemServiceClient) SeedDatabase(ctx context.Context, req *connect.Request[v1alpha1.SeedDatabaseRequest]) (*connect.Response[v1alpha1.SeedDatabaseResponse], error) {
|
||||
return c.seedDatabase.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// SystemServiceHandler is an implementation of the holos.system.v1alpha1.SystemService service.
|
||||
type SystemServiceHandler interface {
|
||||
SeedDatabase(context.Context, *connect.Request[v1alpha1.SeedDatabaseRequest]) (*connect.Response[v1alpha1.SeedDatabaseResponse], error)
|
||||
GetVersion(context.Context, *connect.Request[v1alpha1.GetVersionRequest]) (*connect.Response[v1alpha1.GetVersionResponse], error)
|
||||
DropTables(context.Context, *connect.Request[v1alpha1.DropTablesRequest]) (*connect.Response[v1alpha1.DropTablesResponse], error)
|
||||
SeedDatabase(context.Context, *connect.Request[v1alpha1.SeedDatabaseRequest]) (*connect.Response[v1alpha1.SeedDatabaseResponse], error)
|
||||
}
|
||||
|
||||
// NewSystemServiceHandler builds an HTTP handler from the service implementation. It returns the
|
||||
@@ -107,10 +125,10 @@ type SystemServiceHandler interface {
|
||||
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
|
||||
// and JSON codecs. They also support gzip compression.
|
||||
func NewSystemServiceHandler(svc SystemServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
|
||||
systemServiceSeedDatabaseHandler := connect.NewUnaryHandler(
|
||||
SystemServiceSeedDatabaseProcedure,
|
||||
svc.SeedDatabase,
|
||||
connect.WithSchema(systemServiceSeedDatabaseMethodDescriptor),
|
||||
systemServiceGetVersionHandler := connect.NewUnaryHandler(
|
||||
SystemServiceGetVersionProcedure,
|
||||
svc.GetVersion,
|
||||
connect.WithSchema(systemServiceGetVersionMethodDescriptor),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
systemServiceDropTablesHandler := connect.NewUnaryHandler(
|
||||
@@ -119,12 +137,20 @@ func NewSystemServiceHandler(svc SystemServiceHandler, opts ...connect.HandlerOp
|
||||
connect.WithSchema(systemServiceDropTablesMethodDescriptor),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
systemServiceSeedDatabaseHandler := connect.NewUnaryHandler(
|
||||
SystemServiceSeedDatabaseProcedure,
|
||||
svc.SeedDatabase,
|
||||
connect.WithSchema(systemServiceSeedDatabaseMethodDescriptor),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
return "/holos.system.v1alpha1.SystemService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.URL.Path {
|
||||
case SystemServiceSeedDatabaseProcedure:
|
||||
systemServiceSeedDatabaseHandler.ServeHTTP(w, r)
|
||||
case SystemServiceGetVersionProcedure:
|
||||
systemServiceGetVersionHandler.ServeHTTP(w, r)
|
||||
case SystemServiceDropTablesProcedure:
|
||||
systemServiceDropTablesHandler.ServeHTTP(w, r)
|
||||
case SystemServiceSeedDatabaseProcedure:
|
||||
systemServiceSeedDatabaseHandler.ServeHTTP(w, r)
|
||||
default:
|
||||
http.NotFound(w, r)
|
||||
}
|
||||
@@ -134,10 +160,14 @@ func NewSystemServiceHandler(svc SystemServiceHandler, opts ...connect.HandlerOp
|
||||
// UnimplementedSystemServiceHandler returns CodeUnimplemented from all methods.
|
||||
type UnimplementedSystemServiceHandler struct{}
|
||||
|
||||
func (UnimplementedSystemServiceHandler) SeedDatabase(context.Context, *connect.Request[v1alpha1.SeedDatabaseRequest]) (*connect.Response[v1alpha1.SeedDatabaseResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("holos.system.v1alpha1.SystemService.SeedDatabase is not implemented"))
|
||||
func (UnimplementedSystemServiceHandler) GetVersion(context.Context, *connect.Request[v1alpha1.GetVersionRequest]) (*connect.Response[v1alpha1.GetVersionResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("holos.system.v1alpha1.SystemService.GetVersion is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedSystemServiceHandler) DropTables(context.Context, *connect.Request[v1alpha1.DropTablesRequest]) (*connect.Response[v1alpha1.DropTablesResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("holos.system.v1alpha1.SystemService.DropTables is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedSystemServiceHandler) SeedDatabase(context.Context, *connect.Request[v1alpha1.SeedDatabaseRequest]) (*connect.Response[v1alpha1.SeedDatabaseResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("holos.system.v1alpha1.SystemService.SeedDatabase is not implemented"))
|
||||
}
|
||||
|
||||
14
service/holos/system/v1alpha1/system.proto
Normal file
14
service/holos/system/v1alpha1/system.proto
Normal file
@@ -0,0 +1,14 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package holos.system.v1alpha1;
|
||||
option go_package = "github.com/holos-run/holos/service/gen/holos/system/v1alpha1;system";
|
||||
|
||||
message Version {
|
||||
string version = 1;
|
||||
string git_commit = 2;
|
||||
string git_tree_state = 3;
|
||||
string go_version = 4;
|
||||
string build_date = 5;
|
||||
string os = 6;
|
||||
string arch = 7;
|
||||
}
|
||||
@@ -1,12 +1,19 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package holos.system.v1alpha1;
|
||||
|
||||
option go_package = "github.com/holos-run/holos/service/gen/holos/system/v1alpha1;system";
|
||||
|
||||
// git clone https://github.com/bufbuild/protovalidate then add <parent>/protovalidate/proto/protovalidate to your editor proto search path
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "holos/system/v1alpha1/system.proto";
|
||||
|
||||
// For validation, see the [Standard constraints](https://github.com/bufbuild/protovalidate/blob/main/docs/standard-constraints.md)
|
||||
message GetVersionRequest {
|
||||
// FieldMask represents the fields to include in the response.
|
||||
google.protobuf.FieldMask field_mask = 1;
|
||||
}
|
||||
|
||||
message GetVersionResponse {
|
||||
Version version = 1;
|
||||
}
|
||||
|
||||
message SeedDatabaseRequest {}
|
||||
message SeedDatabaseResponse {}
|
||||
@@ -15,6 +22,7 @@ message DropTablesRequest {}
|
||||
message DropTablesResponse {}
|
||||
|
||||
service SystemService {
|
||||
rpc SeedDatabase(SeedDatabaseRequest) returns (SeedDatabaseResponse) {}
|
||||
rpc GetVersion(GetVersionRequest) returns (GetVersionResponse) {}
|
||||
rpc DropTables(DropTablesRequest) returns (DropTablesResponse) {}
|
||||
rpc SeedDatabase(SeedDatabaseRequest) returns (SeedDatabaseResponse) {}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
75
|
||||
76
|
||||
|
||||
@@ -1 +1 @@
|
||||
1
|
||||
0
|
||||
|
||||
Reference in New Issue
Block a user