Skip to content

Commit

Permalink
add license
Browse files Browse the repository at this point in the history
Signed-off-by: Kosuke Morimoto <ksk@vdaas.org>
  • Loading branch information
kmrmt committed Jan 11, 2024
1 parent 5c370e1 commit a303a58
Show file tree
Hide file tree
Showing 17 changed files with 242 additions and 41 deletions.
2 changes: 2 additions & 0 deletions hack/license/gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
#
# Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>
#
# 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"]
15 changes: 15 additions & 0 deletions rust/bin/agent/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
#
# Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>
#
# 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"
Expand Down
15 changes: 15 additions & 0 deletions rust/bin/agent/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
//
// Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>
//
// 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!");
}
15 changes: 15 additions & 0 deletions rust/libs/ngt/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
#
# Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>
#
# 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"
Expand Down
15 changes: 15 additions & 0 deletions rust/libs/ngt/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
//
// Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>
//
// 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
}
Expand Down
15 changes: 15 additions & 0 deletions rust/libs/proto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
#
# Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>
#
# 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"
Expand Down
17 changes: 15 additions & 2 deletions rust/libs/proto/src/core.v1.tonic.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
// @generated
/// Generated client implementations.
//
// Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>
//
// 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::*;
Expand Down
17 changes: 15 additions & 2 deletions rust/libs/proto/src/discoverer.v1.tonic.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
// @generated
/// Generated client implementations.
//
// Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>
//
// 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::*;
Expand Down
17 changes: 15 additions & 2 deletions rust/libs/proto/src/filter.egress.v1.tonic.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
// @generated
/// Generated client implementations.
//
// Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>
//
// 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::*;
Expand Down
17 changes: 15 additions & 2 deletions rust/libs/proto/src/filter.ingress.v1.tonic.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
// @generated
/// Generated client implementations.
//
// Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>
//
// 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::*;
Expand Down
15 changes: 15 additions & 0 deletions rust/libs/proto/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
//
// Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>
//
// 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;
Expand Down
17 changes: 15 additions & 2 deletions rust/libs/proto/src/manager.index.v1.tonic.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
// @generated
/// Generated client implementations.
//
// Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>
//
// 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::*;
Expand Down
17 changes: 15 additions & 2 deletions rust/libs/proto/src/payload.v1.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
// @generated
/// Search related messages.
//
// Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>
//
// 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 {
Expand Down
40 changes: 15 additions & 25 deletions rust/libs/proto/src/rpc.v1.rs
Original file line number Diff line number Diff line change
@@ -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 <vald@vdaas.org>
//
// 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 {
Expand Down
17 changes: 15 additions & 2 deletions rust/libs/proto/src/sidecar.v1.tonic.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
// @generated
/// Generated client implementations.
//
// Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>
//
// 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::*;
Expand Down
17 changes: 15 additions & 2 deletions rust/libs/proto/src/vald.v1.tonic.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
// @generated
/// Generated client implementations.
//
// Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>
//
// 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::*;
Expand Down

0 comments on commit a303a58

Please sign in to comment.