Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: move buf.yaml into the module to fix usage package import error #75

Merged
merged 2 commits into from
May 30, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: mv buf yaml into module and add workspace yaml
  • Loading branch information
xiaofei-du committed May 29, 2022
commit 279846869c113ee94b5b2d23810e62b8c04ff2cf
3 changes: 3 additions & 0 deletions buf.work.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
version: v1
directories:
- instill
4 changes: 2 additions & 2 deletions buf.lock → instill/buf.lock
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@ deps:
- remote: buf.build
owner: googleapis
repository: googleapis
commit: 2ecc14c6771e48bd86ced753e97424ff
commit: 346b021f31c34ab9a853cb1f5303b0df
- remote: buf.build
owner: grpc-ecosystem
repository: grpc-gateway
commit: febd9e8be39b4f4b878b9c64bcc203fd
commit: 00116f302b12478b85deb33b734e026c
File renamed without changes.
2 changes: 1 addition & 1 deletion instill/connector/v1alpha/auth.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";

package instill.connector.v1alpha;
package connector.v1alpha;

// Protobuf standard
import "google/protobuf/struct.proto";
4 changes: 2 additions & 2 deletions instill/connector/v1alpha/connector.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";

package instill.connector.v1alpha;
package connector.v1alpha;

// Protocol Buffers Well-Known Types
import "google/protobuf/timestamp.proto";
@@ -11,7 +11,7 @@ import "protoc-gen-openapiv2/options/annotations.proto";
import "google/api/resource.proto";
import "google/api/field_behavior.proto";

import "instill/connector/v1alpha/connector_definition.proto";
import "connector/v1alpha/connector_definition.proto";

// Connector represents a connector data model
message Connector {
4 changes: 2 additions & 2 deletions instill/connector/v1alpha/connector_definition.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";

package instill.connector.v1alpha;
package connector.v1alpha;

// Protocol Buffers Well-Known Types
import "google/protobuf/struct.proto";
@@ -14,7 +14,7 @@ import "google/api/field_behavior.proto";
// Google type
import "google/type/date.proto";

import "instill/connector/v1alpha/spec.proto";
import "connector/v1alpha/spec.proto";

// View enumerates the definition views
enum View {
42 changes: 24 additions & 18 deletions instill/connector/v1alpha/connector_service.proto
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
syntax = "proto3";

package instill.connector.v1alpha;
package connector.v1alpha;

// Google API
import "google/api/annotations.proto";
import "google/api/client.proto";

import "instill/connector/v1alpha/healthcheck.proto";
import "instill/connector/v1alpha/connector_definition.proto";
import "instill/connector/v1alpha/connector.proto";
import "connector/v1alpha/connector_definition.proto";
import "connector/v1alpha/connector.proto";

///////////////////////////////////////////////////////////////////////////////
// Connector service responds to incoming connector requests.
@@ -150,8 +149,9 @@ service ConnectorService {

// Connect a source connector.
// The "state" of the connector after connecting is "CONNECTED".
// ConnectSourceConnector can be called on SourceConnector in the state `DISCONNECTED`;
// SourceConnector in a different state (including `CONNECTED`) returns an error.
// ConnectSourceConnector can be called on SourceConnector in the state
// `DISCONNECTED`; SourceConnector in a different state (including
// `CONNECTED`) returns an error.
rpc ConnectSourceConnector(ConnectSourceConnectorRequest)
returns (ConnectSourceConnectorResponse) {
option (google.api.http) = {
@@ -163,8 +163,9 @@ service ConnectorService {

// Disconnect a source connector.
// The "state" of the connector after disconnecting is "DISCONNECTED".
// DisconnectSourceConnector can be called on SourceConnector in the state `CONNECTED`;
// SourceConnector in a different state (including `DISCONNECTED`) returns an error.
// DisconnectSourceConnector can be called on SourceConnector in the state
// `CONNECTED`; SourceConnector in a different state (including
// `DISCONNECTED`) returns an error.
rpc DisconnectSourceConnector(DisconnectSourceConnectorRequest)
returns (DisconnectSourceConnectorResponse) {
option (google.api.http) = {
@@ -174,9 +175,10 @@ service ConnectorService {
option (google.api.method_signature) = "name";
}

// RenameDestinationConnector method receives a RenameSourceConnectorRequest message and returns
// a RenameSourceConnectorResponse message.
rpc RenameSourceConnector(RenameSourceConnectorRequest) returns (RenameSourceConnectorResponse) {
// RenameDestinationConnector method receives a RenameSourceConnectorRequest
// message and returns a RenameSourceConnectorResponse message.
rpc RenameSourceConnector(RenameSourceConnectorRequest)
returns (RenameSourceConnectorResponse) {
option (google.api.http) = {
post : "/v1alpha/{name=source-connectors/*}:rename"
body : "*"
@@ -253,8 +255,9 @@ service ConnectorService {

// Connect a destination connector.
// The "state" of the connector after connecting is "CONNECTED".
// ConnectDestinationConnector can be called on DestinationConnector in the state `DISCONNECTED`;
// DestinationConnector in a different state (including `CONNECTED`) returns an error.
// ConnectDestinationConnector can be called on DestinationConnector in the
// state `DISCONNECTED`; DestinationConnector in a different state (including
// `CONNECTED`) returns an error.
rpc ConnectDestinationConnector(ConnectDestinationConnectorRequest)
returns (ConnectDestinationConnectorResponse) {
option (google.api.http) = {
@@ -266,8 +269,9 @@ service ConnectorService {

// Disconnect a destination connector.
// The "state" of the connector after disconnecting is "DISCONNECTED".
// DisconnectDestinationConnector can be called on DestinationConnector in the state `CONNECTED`;
// DestinationConnector in a different state (including `DISCONNECTED`) returns an error.
// DisconnectDestinationConnector can be called on DestinationConnector in the
// state `CONNECTED`; DestinationConnector in a different state (including
// `DISCONNECTED`) returns an error.
rpc DisconnectDestinationConnector(DisconnectDestinationConnectorRequest)
returns (DisconnectDestinationConnectorResponse) {
option (google.api.http) = {
@@ -277,9 +281,11 @@ service ConnectorService {
option (google.api.method_signature) = "name";
}

// RenameDestinationConnector method receives a RenameDestinationConnectorRequest message and returns
// a RenameDestinationConnectorResponse message.
rpc RenameDestinationConnector(RenameDestinationConnectorRequest) returns (RenameDestinationConnectorResponse) {
// RenameDestinationConnector method receives a
// RenameDestinationConnectorRequest message and returns a
// RenameDestinationConnectorResponse message.
rpc RenameDestinationConnector(RenameDestinationConnectorRequest)
returns (RenameDestinationConnectorResponse) {
option (google.api.http) = {
post : "/v1alpha/{name=destination-connectors/*}:rename"
body : "*"
4 changes: 2 additions & 2 deletions instill/connector/v1alpha/spec.proto
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
syntax = "proto3";

package instill.connector.v1alpha;
package connector.v1alpha;

// Protocol Buffers Well-Known Types
import "google/protobuf/struct.proto";

// Google API
import "google/api/field_behavior.proto";

import "instill/connector/v1alpha/auth.proto";
import "connector/v1alpha/auth.proto";

////////////////////////////////////
// Spec represents a spec data model
2 changes: 1 addition & 1 deletion instill/mgmt/v1alpha/mgmt.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";

package instill.mgmt.v1alpha;
package mgmt.v1alpha;

// Protobuf standard
import "google/protobuf/field_mask.proto";
4 changes: 2 additions & 2 deletions instill/mgmt/v1alpha/mgmt_service.proto
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
syntax = "proto3";

package instill.mgmt.v1alpha;
package mgmt.v1alpha;

// Google API
import "google/api/annotations.proto";
import "google/api/client.proto";

import "instill/mgmt/v1alpha/mgmt.proto";
import "mgmt/v1alpha/mgmt.proto";

// User service responds to incoming user requests.
service UserService {
4 changes: 2 additions & 2 deletions instill/model/v1alpha/model.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";

package instill.model.v1alpha;
package model.v1alpha;

// Protobuf standard
import "google/protobuf/struct.proto";
@@ -12,7 +12,7 @@ import "protoc-gen-openapiv2/options/annotations.proto";
import "google/api/resource.proto";
import "google/api/field_behavior.proto";

import "instill/model/v1alpha/model_definition.proto";
import "model/v1alpha/model_definition.proto";

// Model represents a model
message Model {
2 changes: 1 addition & 1 deletion instill/model/v1alpha/model_definition.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";

package instill.model.v1alpha;
package model.v1alpha;

// Protocol Buffers Well-Known Types
import "google/protobuf/struct.proto";
6 changes: 3 additions & 3 deletions instill/model/v1alpha/model_service.proto
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
syntax = "proto3";

package instill.model.v1alpha;
package model.v1alpha;

// Google API
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";

import "instill/model/v1alpha/model_definition.proto";
import "instill/model/v1alpha/model.proto";
import "model/v1alpha/model_definition.proto";
import "model/v1alpha/model.proto";

// HealthCheckRequest represents a request to health check a service
message HealthCheckRequest {
2 changes: 1 addition & 1 deletion instill/pipeline/v1alpha/pipeline.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";

package instill.pipeline.v1alpha;
package pipeline.v1alpha;

// Protocol Buffers Well-Known Types
import "google/protobuf/struct.proto";
5 changes: 2 additions & 3 deletions instill/pipeline/v1alpha/pipeline_service.proto
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
syntax = "proto3";

package instill.pipeline.v1alpha;
package pipeline.v1alpha;

// Google API
import "google/api/annotations.proto";
import "google/api/client.proto";

import "instill/pipeline/v1alpha/healthcheck.proto";
import "instill/pipeline/v1alpha/pipeline.proto";
import "pipeline/v1alpha/pipeline.proto";

// Pipeline service responds to incoming pipeline requests.
service PipelineService {
6 changes: 3 additions & 3 deletions instill/usage/v1alpha/usage.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";

package instill.usage.v1alpha;
package usage.v1alpha;

// Protobuf standard
import "google/protobuf/timestamp.proto";
@@ -9,7 +9,7 @@ import "google/protobuf/timestamp.proto";
import "google/api/resource.proto";
import "google/api/field_behavior.proto";

import "instill/mgmt/v1alpha/mgmt.proto";
import "mgmt/v1alpha/mgmt.proto";

// HealthCheckRequest represents a request to health check a service
message HealthCheckRequest {
@@ -108,7 +108,7 @@ message SessionData {
// Management service usage data
message MgmtUsageData {
// Repeated user usage data
repeated instill.mgmt.v1alpha.User user = 1;
repeated mgmt.v1alpha.User user = 1;
}

// Connector service usage data
4 changes: 2 additions & 2 deletions instill/usage/v1alpha/usage_service.proto
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
syntax = "proto3";

package instill.usage.v1alpha;
package usage.v1alpha;

// Google API
import "google/api/annotations.proto";
import "google/api/client.proto";

import "instill/usage/v1alpha/usage.proto";
import "usage/v1alpha/usage.proto";

// UsageService responds to incoming usage requests.
service UsageService {