From ea4c2be18ebf9deeab6177c2754aafca65c953ab Mon Sep 17 00:00:00 2001 From: Kosuke Morimoto Date: Thu, 11 Jan 2024 17:36:15 +0900 Subject: [PATCH] add license Signed-off-by: Kosuke Morimoto --- hack/license/gen/main.go | 2 + rust/Cargo.toml | 15 +++++++ rust/bin/agent/Cargo.toml | 15 +++++++ rust/bin/agent/src/main.rs | 15 +++++++ rust/libs/ngt/Cargo.toml | 15 +++++++ rust/libs/ngt/src/lib.rs | 15 +++++++ rust/libs/proto/Cargo.toml | 15 +++++++ rust/libs/proto/src/core.v1.tonic.rs | 17 +++++++- rust/libs/proto/src/discoverer.v1.tonic.rs | 17 +++++++- rust/libs/proto/src/filter.egress.v1.tonic.rs | 17 +++++++- .../libs/proto/src/filter.ingress.v1.tonic.rs | 17 +++++++- rust/libs/proto/src/lib.rs | 15 +++++++ rust/libs/proto/src/manager.index.v1.tonic.rs | 17 +++++++- rust/libs/proto/src/payload.v1.rs | 17 +++++++- rust/libs/proto/src/rpc.v1.rs | 40 +++++++------------ rust/libs/proto/src/sidecar.v1.tonic.rs | 17 +++++++- rust/libs/proto/src/vald.v1.tonic.rs | 17 +++++++- 17 files changed, 242 insertions(+), 41 deletions(-) diff --git a/hack/license/gen/main.go b/hack/license/gen/main.go index 6ae6618718f..e68ca932c9c 100644 --- a/hack/license/gen/main.go +++ b/hack/license/gen/main.go @@ -293,6 +293,8 @@ func readAndRewrite(path string) error { tmpl = googleProtoApache } d.Escape = slushEscape + case ".rs": + d.Escape = slushEscape default: if fi.Name() == "Dockerfile" { tmpl = docker diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 7874df2706e..082e3583136 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -1,2 +1,17 @@ +# +# Copyright (C) 2019-2024 vdaas.org vald team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# [workspace] members = ["libs/proto", "libs/ngt", "bin/agent"] diff --git a/rust/bin/agent/Cargo.toml b/rust/bin/agent/Cargo.toml index 884007ea668..26c1fdf5481 100644 --- a/rust/bin/agent/Cargo.toml +++ b/rust/bin/agent/Cargo.toml @@ -1,3 +1,18 @@ +# +# Copyright (C) 2019-2024 vdaas.org vald team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# [package] name = "agent" version = "0.1.0" diff --git a/rust/bin/agent/src/main.rs b/rust/bin/agent/src/main.rs index e7a11a969c0..7546cec8106 100644 --- a/rust/bin/agent/src/main.rs +++ b/rust/bin/agent/src/main.rs @@ -1,3 +1,18 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// fn main() { println!("Hello, world!"); } diff --git a/rust/libs/ngt/Cargo.toml b/rust/libs/ngt/Cargo.toml index bcea351fcd8..cf9c8f82fe9 100644 --- a/rust/libs/ngt/Cargo.toml +++ b/rust/libs/ngt/Cargo.toml @@ -1,3 +1,18 @@ +# +# Copyright (C) 2019-2024 vdaas.org vald team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# [package] name = "ngt" version = "0.1.0" diff --git a/rust/libs/ngt/src/lib.rs b/rust/libs/ngt/src/lib.rs index 7d12d9af819..958ec94a9e1 100644 --- a/rust/libs/ngt/src/lib.rs +++ b/rust/libs/ngt/src/lib.rs @@ -1,3 +1,18 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// pub fn add(left: usize, right: usize) -> usize { left + right } diff --git a/rust/libs/proto/Cargo.toml b/rust/libs/proto/Cargo.toml index e1445c8d026..d185dbf6559 100644 --- a/rust/libs/proto/Cargo.toml +++ b/rust/libs/proto/Cargo.toml @@ -1,3 +1,18 @@ +# +# Copyright (C) 2019-2024 vdaas.org vald team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# [package] name = "proto" version = "0.1.0" diff --git a/rust/libs/proto/src/core.v1.tonic.rs b/rust/libs/proto/src/core.v1.tonic.rs index 95938df3a97..7540a3508c6 100644 --- a/rust/libs/proto/src/core.v1.tonic.rs +++ b/rust/libs/proto/src/core.v1.tonic.rs @@ -1,5 +1,18 @@ -// @generated -/// Generated client implementations. +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// pub mod agent_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; diff --git a/rust/libs/proto/src/discoverer.v1.tonic.rs b/rust/libs/proto/src/discoverer.v1.tonic.rs index e62453e6503..23729bc1c6a 100644 --- a/rust/libs/proto/src/discoverer.v1.tonic.rs +++ b/rust/libs/proto/src/discoverer.v1.tonic.rs @@ -1,5 +1,18 @@ -// @generated -/// Generated client implementations. +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// pub mod discoverer_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; diff --git a/rust/libs/proto/src/filter.egress.v1.tonic.rs b/rust/libs/proto/src/filter.egress.v1.tonic.rs index 35e2e751592..87ea20f66c9 100644 --- a/rust/libs/proto/src/filter.egress.v1.tonic.rs +++ b/rust/libs/proto/src/filter.egress.v1.tonic.rs @@ -1,5 +1,18 @@ -// @generated -/// Generated client implementations. +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// pub mod filter_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; diff --git a/rust/libs/proto/src/filter.ingress.v1.tonic.rs b/rust/libs/proto/src/filter.ingress.v1.tonic.rs index 8952e18ecf8..0b47f102586 100644 --- a/rust/libs/proto/src/filter.ingress.v1.tonic.rs +++ b/rust/libs/proto/src/filter.ingress.v1.tonic.rs @@ -1,5 +1,18 @@ -// @generated -/// Generated client implementations. +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// pub mod filter_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; diff --git a/rust/libs/proto/src/lib.rs b/rust/libs/proto/src/lib.rs index 296d4c12fd6..a25f31ae094 100644 --- a/rust/libs/proto/src/lib.rs +++ b/rust/libs/proto/src/lib.rs @@ -1,3 +1,18 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// pub mod google { pub mod rpc { pub type Status = tonic_types::Status; diff --git a/rust/libs/proto/src/manager.index.v1.tonic.rs b/rust/libs/proto/src/manager.index.v1.tonic.rs index b4bb33cff20..8dae1cc3f04 100644 --- a/rust/libs/proto/src/manager.index.v1.tonic.rs +++ b/rust/libs/proto/src/manager.index.v1.tonic.rs @@ -1,5 +1,18 @@ -// @generated -/// Generated client implementations. +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// pub mod index_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; diff --git a/rust/libs/proto/src/payload.v1.rs b/rust/libs/proto/src/payload.v1.rs index bd136dd9e4d..3e5c7bfde60 100644 --- a/rust/libs/proto/src/payload.v1.rs +++ b/rust/libs/proto/src/payload.v1.rs @@ -1,5 +1,18 @@ -// @generated -/// Search related messages. +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Search { diff --git a/rust/libs/proto/src/rpc.v1.rs b/rust/libs/proto/src/rpc.v1.rs index 7924d6d4db9..7e546ee43ed 100644 --- a/rust/libs/proto/src/rpc.v1.rs +++ b/rust/libs/proto/src/rpc.v1.rs @@ -1,28 +1,18 @@ -// @generated -/// Describes the cause of the error with structured details. -/// -/// Example of an error when contacting the "pubsub.googleapis.com" API when it -/// is not enabled: -/// -/// { "reason": "API_DISABLED" -/// "domain": "googleapis.com" -/// "metadata": { -/// "resource": "projects/123", -/// "service": "pubsub.googleapis.com" -/// } -/// } -/// -/// This response indicates that the pubsub.googleapis.com API is not enabled. -/// -/// Example of an error that is returned when attempting to create a Spanner -/// instance in a region that is out of stock: -/// -/// { "reason": "STOCKOUT" -/// "domain": "spanner.googleapis.com", -/// "metadata": { -/// "availableRegions": "us-central1,us-east2" -/// } -/// } +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ErrorInfo { diff --git a/rust/libs/proto/src/sidecar.v1.tonic.rs b/rust/libs/proto/src/sidecar.v1.tonic.rs index 820398520d8..f1f8c1065a6 100644 --- a/rust/libs/proto/src/sidecar.v1.tonic.rs +++ b/rust/libs/proto/src/sidecar.v1.tonic.rs @@ -1,5 +1,18 @@ -// @generated -/// Generated client implementations. +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// pub mod sidecar_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; diff --git a/rust/libs/proto/src/vald.v1.tonic.rs b/rust/libs/proto/src/vald.v1.tonic.rs index 0c6f81b193b..481ee81ea8e 100644 --- a/rust/libs/proto/src/vald.v1.tonic.rs +++ b/rust/libs/proto/src/vald.v1.tonic.rs @@ -1,5 +1,18 @@ -// @generated -/// Generated client implementations. +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// pub mod filter_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*;