-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[content-service] Introduce log entity
- Loading branch information
Showing
20 changed files
with
1,847 additions
and
22 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright (c) 2021 Gitpod GmbH. All rights reserved. | ||
// Licensed under the GNU Affero General Public License (AGPL). | ||
// See License-AGPL.txt in the project root for license information. | ||
|
||
syntax = "proto3"; | ||
|
||
package contentservice; | ||
|
||
option go_package = "github.com/gitpod-io/gitpod/content-service/api"; | ||
|
||
service LogService { | ||
// LogDownloadURL provides a URL from where the content of a workspace can be downloaded from | ||
rpc LogDownloadURL(LogDownloadURLRequest) returns (LogDownloadURLResponse) {}; | ||
|
||
// ListPrebuildLogs returns a list of taskIds for the specified workspace instance | ||
rpc ListPrebuildLogs(ListPrebuildLogsRequest) returns (ListPrebuildLogsResponse) {}; | ||
} | ||
|
||
message LogDownloadURLRequest { | ||
string owner_id = 1; | ||
string workspace_id = 2; | ||
string instance_id = 3; | ||
string task_id = 4; | ||
} | ||
message LogDownloadURLResponse { | ||
string url = 1; | ||
} | ||
|
||
message ListPrebuildLogsRequest { | ||
string owner_id = 1; | ||
string workspace_id = 2; | ||
string instance_id = 3; | ||
} | ||
message ListPrebuildLogsResponse { | ||
repeated string taskId = 1; | ||
} |
65 changes: 65 additions & 0 deletions
65
components/content-service-api/typescript/src/log_grpc_pb.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/** | ||
* Copyright (c) 2021 Gitpod GmbH. All rights reserved. | ||
* Licensed under the GNU Affero General Public License (AGPL). | ||
* See License-AGPL.txt in the project root for license information. | ||
*/ | ||
|
||
// package: contentservice | ||
// file: log.proto | ||
|
||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
|
||
import * as grpc from "@grpc/grpc-js"; | ||
import {handleClientStreamingCall} from "@grpc/grpc-js/build/src/server-call"; | ||
import * as log_pb from "./log_pb"; | ||
|
||
interface ILogServiceService extends grpc.ServiceDefinition<grpc.UntypedServiceImplementation> { | ||
logDownloadURL: ILogServiceService_ILogDownloadURL; | ||
listPrebuildLogs: ILogServiceService_IListPrebuildLogs; | ||
} | ||
|
||
interface ILogServiceService_ILogDownloadURL extends grpc.MethodDefinition<log_pb.LogDownloadURLRequest, log_pb.LogDownloadURLResponse> { | ||
path: "/contentservice.LogService/LogDownloadURL"; | ||
requestStream: false; | ||
responseStream: false; | ||
requestSerialize: grpc.serialize<log_pb.LogDownloadURLRequest>; | ||
requestDeserialize: grpc.deserialize<log_pb.LogDownloadURLRequest>; | ||
responseSerialize: grpc.serialize<log_pb.LogDownloadURLResponse>; | ||
responseDeserialize: grpc.deserialize<log_pb.LogDownloadURLResponse>; | ||
} | ||
interface ILogServiceService_IListPrebuildLogs extends grpc.MethodDefinition<log_pb.ListPrebuildLogsRequest, log_pb.ListPrebuildLogsResponse> { | ||
path: "/contentservice.LogService/ListPrebuildLogs"; | ||
requestStream: false; | ||
responseStream: false; | ||
requestSerialize: grpc.serialize<log_pb.ListPrebuildLogsRequest>; | ||
requestDeserialize: grpc.deserialize<log_pb.ListPrebuildLogsRequest>; | ||
responseSerialize: grpc.serialize<log_pb.ListPrebuildLogsResponse>; | ||
responseDeserialize: grpc.deserialize<log_pb.ListPrebuildLogsResponse>; | ||
} | ||
|
||
export const LogServiceService: ILogServiceService; | ||
|
||
export interface ILogServiceServer extends grpc.UntypedServiceImplementation { | ||
logDownloadURL: grpc.handleUnaryCall<log_pb.LogDownloadURLRequest, log_pb.LogDownloadURLResponse>; | ||
listPrebuildLogs: grpc.handleUnaryCall<log_pb.ListPrebuildLogsRequest, log_pb.ListPrebuildLogsResponse>; | ||
} | ||
|
||
export interface ILogServiceClient { | ||
logDownloadURL(request: log_pb.LogDownloadURLRequest, callback: (error: grpc.ServiceError | null, response: log_pb.LogDownloadURLResponse) => void): grpc.ClientUnaryCall; | ||
logDownloadURL(request: log_pb.LogDownloadURLRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: log_pb.LogDownloadURLResponse) => void): grpc.ClientUnaryCall; | ||
logDownloadURL(request: log_pb.LogDownloadURLRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: log_pb.LogDownloadURLResponse) => void): grpc.ClientUnaryCall; | ||
listPrebuildLogs(request: log_pb.ListPrebuildLogsRequest, callback: (error: grpc.ServiceError | null, response: log_pb.ListPrebuildLogsResponse) => void): grpc.ClientUnaryCall; | ||
listPrebuildLogs(request: log_pb.ListPrebuildLogsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: log_pb.ListPrebuildLogsResponse) => void): grpc.ClientUnaryCall; | ||
listPrebuildLogs(request: log_pb.ListPrebuildLogsRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: log_pb.ListPrebuildLogsResponse) => void): grpc.ClientUnaryCall; | ||
} | ||
|
||
export class LogServiceClient extends grpc.Client implements ILogServiceClient { | ||
constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial<grpc.ClientOptions>); | ||
public logDownloadURL(request: log_pb.LogDownloadURLRequest, callback: (error: grpc.ServiceError | null, response: log_pb.LogDownloadURLResponse) => void): grpc.ClientUnaryCall; | ||
public logDownloadURL(request: log_pb.LogDownloadURLRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: log_pb.LogDownloadURLResponse) => void): grpc.ClientUnaryCall; | ||
public logDownloadURL(request: log_pb.LogDownloadURLRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: log_pb.LogDownloadURLResponse) => void): grpc.ClientUnaryCall; | ||
public listPrebuildLogs(request: log_pb.ListPrebuildLogsRequest, callback: (error: grpc.ServiceError | null, response: log_pb.ListPrebuildLogsResponse) => void): grpc.ClientUnaryCall; | ||
public listPrebuildLogs(request: log_pb.ListPrebuildLogsRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: log_pb.ListPrebuildLogsResponse) => void): grpc.ClientUnaryCall; | ||
public listPrebuildLogs(request: log_pb.ListPrebuildLogsRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: log_pb.ListPrebuildLogsResponse) => void): grpc.ClientUnaryCall; | ||
} |
84 changes: 84 additions & 0 deletions
84
components/content-service-api/typescript/src/log_grpc_pb.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
// GENERATED CODE -- DO NOT EDIT! | ||
|
||
// Original file comments: | ||
// Copyright (c) 2021 Gitpod GmbH. All rights reserved. | ||
// Licensed under the GNU Affero General Public License (AGPL). | ||
// See License-AGPL.txt in the project root for license information. | ||
// | ||
'use strict'; | ||
var grpc = require('@grpc/grpc-js'); | ||
var log_pb = require('./log_pb.js'); | ||
|
||
function serialize_contentservice_ListPrebuildLogsRequest(arg) { | ||
if (!(arg instanceof log_pb.ListPrebuildLogsRequest)) { | ||
throw new Error('Expected argument of type contentservice.ListPrebuildLogsRequest'); | ||
} | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
|
||
function deserialize_contentservice_ListPrebuildLogsRequest(buffer_arg) { | ||
return log_pb.ListPrebuildLogsRequest.deserializeBinary(new Uint8Array(buffer_arg)); | ||
} | ||
|
||
function serialize_contentservice_ListPrebuildLogsResponse(arg) { | ||
if (!(arg instanceof log_pb.ListPrebuildLogsResponse)) { | ||
throw new Error('Expected argument of type contentservice.ListPrebuildLogsResponse'); | ||
} | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
|
||
function deserialize_contentservice_ListPrebuildLogsResponse(buffer_arg) { | ||
return log_pb.ListPrebuildLogsResponse.deserializeBinary(new Uint8Array(buffer_arg)); | ||
} | ||
|
||
function serialize_contentservice_LogDownloadURLRequest(arg) { | ||
if (!(arg instanceof log_pb.LogDownloadURLRequest)) { | ||
throw new Error('Expected argument of type contentservice.LogDownloadURLRequest'); | ||
} | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
|
||
function deserialize_contentservice_LogDownloadURLRequest(buffer_arg) { | ||
return log_pb.LogDownloadURLRequest.deserializeBinary(new Uint8Array(buffer_arg)); | ||
} | ||
|
||
function serialize_contentservice_LogDownloadURLResponse(arg) { | ||
if (!(arg instanceof log_pb.LogDownloadURLResponse)) { | ||
throw new Error('Expected argument of type contentservice.LogDownloadURLResponse'); | ||
} | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
|
||
function deserialize_contentservice_LogDownloadURLResponse(buffer_arg) { | ||
return log_pb.LogDownloadURLResponse.deserializeBinary(new Uint8Array(buffer_arg)); | ||
} | ||
|
||
|
||
var LogServiceService = exports.LogServiceService = { | ||
// LogDownloadURL provides a URL from where the content of a workspace can be downloaded from | ||
logDownloadURL: { | ||
path: '/contentservice.LogService/LogDownloadURL', | ||
requestStream: false, | ||
responseStream: false, | ||
requestType: log_pb.LogDownloadURLRequest, | ||
responseType: log_pb.LogDownloadURLResponse, | ||
requestSerialize: serialize_contentservice_LogDownloadURLRequest, | ||
requestDeserialize: deserialize_contentservice_LogDownloadURLRequest, | ||
responseSerialize: serialize_contentservice_LogDownloadURLResponse, | ||
responseDeserialize: deserialize_contentservice_LogDownloadURLResponse, | ||
}, | ||
// ListPrebuildLogs returns a list of taskIds for the specified workspace instance | ||
listPrebuildLogs: { | ||
path: '/contentservice.LogService/ListPrebuildLogs', | ||
requestStream: false, | ||
responseStream: false, | ||
requestType: log_pb.ListPrebuildLogsRequest, | ||
responseType: log_pb.ListPrebuildLogsResponse, | ||
requestSerialize: serialize_contentservice_ListPrebuildLogsRequest, | ||
requestDeserialize: deserialize_contentservice_ListPrebuildLogsRequest, | ||
responseSerialize: serialize_contentservice_ListPrebuildLogsResponse, | ||
responseDeserialize: deserialize_contentservice_ListPrebuildLogsResponse, | ||
}, | ||
}; | ||
|
||
exports.LogServiceClient = grpc.makeGenericClientConstructor(LogServiceService); |
Oops, something went wrong.