├── .gitignore
├── buf.work.yaml
├── example
├── grpc-server
│ ├── getClusters.http
│ ├── http-gw.go
│ └── main.go
├── readme.md
├── grpc-client
│ └── main.go
└── ras-client
│ ├── main.go
│ └── simpleClient
│ └── client.go
├── proto-gen.ps1
├── third_party
├── googleapis
│ ├── buf.yaml
│ ├── README.grpc-gateway
│ └── google
│ │ ├── type
│ │ ├── README.md
│ │ ├── fraction.proto
│ │ ├── type.yaml
│ │ ├── dayofweek.proto
│ │ ├── localized_text.proto
│ │ ├── latlng.proto
│ │ ├── month.proto
│ │ ├── money.proto
│ │ ├── timeofday.proto
│ │ ├── interval.proto
│ │ ├── calendar_period.proto
│ │ ├── date.proto
│ │ ├── expr.proto
│ │ ├── quaternion.proto
│ │ ├── datetime.proto
│ │ ├── decimal.proto
│ │ └── phone_number.proto
│ │ ├── api
│ │ ├── annotations.proto
│ │ └── httpbody.proto
│ │ └── rpc
│ │ └── status.proto
├── encodingapis
│ └── ras
│ │ ├── encoding
│ │ ├── file.proto
│ │ └── ras.proto
│ │ └── client
│ │ └── client.proto
└── openapiv2
│ └── protoc-gen-openapiv2
│ └── options
│ └── annotations.proto
├── .idea
├── vcs.xml
├── .gitignore
├── modules.xml
├── proto.iml
├── go.imports.xml
├── protos.iml
├── protobuf.xml
└── protoeditor.xml
├── serializeapis
├── buf.yaml
├── buf.gen.yaml
├── v8platform
│ └── serialize
│ │ └── v1
│ │ ├── services.proto
│ │ ├── managers.proto
│ │ ├── assignments.proto
│ │ ├── locks.proto
│ │ ├── connections.proto
│ │ ├── licanses.proto
│ │ ├── clusters.proto
│ │ ├── servers.proto
│ │ ├── processes.proto
│ │ ├── infobases.proto
│ │ └── sessions.proto
└── buf.lock
├── rasencoderapis
├── buf.yaml
├── buf.lock
└── ras
│ └── encoder
│ └── encoder_service.proto
├── .goreleaser.yaml
├── rasapis
├── buf.yaml
├── buf.gen.yaml
├── ras
│ ├── protocol
│ │ └── v1
│ │ │ ├── param.proto
│ │ │ ├── packet.proto
│ │ │ ├── connect.proto
│ │ │ ├── types.proto
│ │ │ └── endpoint.proto
│ ├── client
│ │ └── v1
│ │ │ ├── client_service.proto
│ │ │ └── api_service.proto
│ └── messages
│ │ └── v1
│ │ ├── services_messages.proto
│ │ ├── managers_messages.proto
│ │ ├── auth_messages.proto
│ │ ├── clusters_messages.proto
│ │ ├── working_processes_messages.proto
│ │ ├── connections_messages.proto
│ │ ├── working_servers_messages.proto
│ │ ├── sessions_messages.proto
│ │ ├── types.proto
│ │ ├── locks_messages.proto
│ │ └── admin_messages.proto
└── buf.lock
├── HOWTO.md
├── go.mod
├── .github
└── workflows
│ ├── buf.yaml
│ ├── releaser.yaml
│ └── generate.yaml
├── packet-negotiate.puml
├── buf.gen.yaml
├── LICENSE
├── powerproto.yaml
├── ras-client.puml
├── gen
├── ras
│ ├── protocol
│ │ └── v1
│ │ │ ├── param_ras.pb.go
│ │ │ └── connect_ras.pb.go
│ └── messages
│ │ └── v1
│ │ ├── services_messages_ras.pb.go
│ │ ├── auth_messages_ras.pb.go
│ │ ├── managers_messages_ras.pb.go
│ │ ├── clusters_messages_ras.pb.go
│ │ └── connections_messages_ras.pb.go
└── v8platform
│ └── serialize
│ └── v1
│ ├── services_ras.pb.go
│ ├── managers_ras.pb.go
│ ├── locks_ras.pb.go
│ ├── assignments_ras.pb.go
│ ├── connections_ras.pb.go
│ ├── licanses_ras.pb.go
│ └── clusters_ras.pb.go
├── packet-get-clusters-request.puml
└── use-case-ras=proxy.puml
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | .idea
3 |
--------------------------------------------------------------------------------
/buf.work.yaml:
--------------------------------------------------------------------------------
1 | version: v1
2 | directories:
3 | - serializeapis
4 | - rasapis
5 | - rasserviceapis
6 | - rasencoderapis
--------------------------------------------------------------------------------
/example/grpc-server/getClusters.http:
--------------------------------------------------------------------------------
1 | GET http://localhost:8081/api/v1/clusters
2 | Accept: application/json
3 |
4 | ###
5 |
6 |
--------------------------------------------------------------------------------
/proto-gen.ps1:
--------------------------------------------------------------------------------
1 |
2 | docker run --volume "$(PWD):/workspace" -v "C:\Users\khorevaa\go\bin\bin\protoc-gen-go.exe:/bin/protoc-gen-go" --workdir /workspace bufbuild/buf generate
3 |
4 |
5 |
--------------------------------------------------------------------------------
/third_party/googleapis/buf.yaml:
--------------------------------------------------------------------------------
1 | version: v1
2 |
3 | name: buf.build/googleapis/googleapis
4 |
5 | lint:
6 | use:
7 | - DEFAULT
8 | breaking:
9 | use:
10 | - FILE
11 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Datasource local storage ignored files
5 | /dataSources/
6 | /dataSources.local.xml
7 | # Editor-based HTTP Client requests
8 | /httpRequests/
9 |
--------------------------------------------------------------------------------
/example/readme.md:
--------------------------------------------------------------------------------
1 | # Как запустить
2 |
3 | - Сначала надо собрать proto файлы
4 |
5 | ```shell
6 |
7 | buf generate ./rasapis
8 | buf generate ./serializeapis
9 | buf generate ./rasserviceeapis
10 |
11 | ```
12 |
13 |
--------------------------------------------------------------------------------
/serializeapis/buf.yaml:
--------------------------------------------------------------------------------
1 | version: v1
2 | name: buf.build/v8platform/serializeapis
3 | deps:
4 | - buf.build/v8platform/encodingapis
5 | - buf.build/grpc-ecosystem/grpc-gateway
6 | lint:
7 | use:
8 | - DEFAULT
9 | breaking:
10 | use:
11 | - FILE
12 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/rasencoderapis/buf.yaml:
--------------------------------------------------------------------------------
1 | version: v1
2 | name: buf.build/v8platform/rasencoderapis
3 | deps:
4 | - buf.build/v8platform/encodingapis
5 | - buf.build/v8platform/serializeapis
6 | - buf.build/v8platform/rasapis
7 |
8 | lint:
9 | use:
10 | - DEFAULT
11 | breaking:
12 | use:
13 | - FILE
14 |
--------------------------------------------------------------------------------
/.goreleaser.yaml:
--------------------------------------------------------------------------------
1 | project_name: protos
2 | before:
3 | hooks:
4 | - go mod tidy
5 | changelog:
6 | sort: asc
7 | filters:
8 | exclude:
9 | - '^docs:'
10 | - '^test:'
11 | - Merge pull request
12 | - Merge branch
13 | build:
14 | skip: true
15 | release:
16 | github:
17 | prerelease: auto
--------------------------------------------------------------------------------
/rasapis/buf.yaml:
--------------------------------------------------------------------------------
1 | version: v1
2 | name: buf.build/v8platform/rasapis
3 | deps:
4 | - buf.build/googleapis/googleapis
5 | - buf.build/v8platform/encodingapis
6 | - buf.build/v8platform/serializeapis
7 | - buf.build/grpc-ecosystem/grpc-gateway
8 |
9 | lint:
10 | use:
11 | - DEFAULT
12 | breaking:
13 | use:
14 | - FILE
15 |
--------------------------------------------------------------------------------
/HOWTO.md:
--------------------------------------------------------------------------------
1 |
2 | ## Как создать клиента для `ras`
3 |
4 | ### Генерация кода под нужный язык разработки
5 |
6 | ### Реализация кодирования данных под бинарый протокол 1С
7 |
8 | ### Создание клиента
9 |
10 | 
11 |
--------------------------------------------------------------------------------
/.idea/proto.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/go.imports.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/protos.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/third_party/encodingapis/ras/encoding/file.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package ras.encoding;
4 |
5 | import "google/protobuf/descriptor.proto";
6 |
7 |
8 | option go_package = "github.com/v8platform/protoc-gen-go-ras/plugin/ras/encoding";
9 |
10 | extend google.protobuf.FileOptions {
11 | FileImplOptions impl = 475223888;
12 | }
13 |
14 | message FileImplOptions {
15 | repeated string interface = 1;
16 | }
--------------------------------------------------------------------------------
/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/v8platform/protos
2 |
3 | go 1.17
4 |
5 | //replace github.com/v8platform/encoder v0.0.3 => ../../khorevaa/encoder
6 |
7 | require (
8 | github.com/grpc-ecosystem/grpc-gateway/v2 v2.6.0
9 | github.com/v8platform/encoder v0.0.4
10 | github.com/v8platform/protoc-gen-go-ras v0.2.1
11 | google.golang.org/protobuf v1.27.1
12 | )
13 |
14 | require (
15 | github.com/kr/pretty v0.3.0 // indirect
16 | github.com/satori/go.uuid v1.2.0 // indirect
17 | )
18 |
--------------------------------------------------------------------------------
/.idea/protobuf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/rasapis/buf.gen.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | version: v1
3 | managed:
4 | enabled: true
5 | go_package_prefix:
6 | default: github.com/v8platform/protos/gen
7 | except:
8 | - buf.build/googleapis/googleapis
9 | - buf.build/grpc-ecosystem/grpc-gateway
10 | - buf.build/v8platform/encodingapis
11 | - github.com/v8platform/protoc-gen-go-ras
12 |
13 | plugins:
14 | - name: go
15 | out: ./gen
16 | opt: paths=source_relative
17 | - name: go-ras
18 | opt: paths=source_relative
19 | out: ./gen
20 |
--------------------------------------------------------------------------------
/serializeapis/buf.gen.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | version: v1
3 | managed:
4 | enabled: true
5 | go_package_prefix:
6 | default: github.com/v8platform/protos/gen
7 | except:
8 | - buf.build/googleapis/googleapis
9 | - buf.build/grpc-ecosystem/grpc-gateway
10 | - buf.build/v8platform/encodingapis
11 | - github.com/v8platform/protoc-gen-go-ras
12 |
13 | plugins:
14 | - name: go
15 | out: ./gen
16 | opt: paths=source_relative
17 | - name: go-ras
18 | opt: paths=source_relative
19 | out: ./gen
20 |
--------------------------------------------------------------------------------
/.github/workflows/buf.yaml:
--------------------------------------------------------------------------------
1 | name: buf-push
2 | on:
3 | push:
4 | tags:
5 | - '*'
6 | jobs:
7 | push-changes:
8 | runs-on: ubuntu-latest
9 | steps:
10 | - uses: actions/checkout@v2
11 | - uses: bufbuild/buf-setup-action@v0.3.1
12 | - uses: bufbuild/buf-push-action@v0.3.0
13 | with:
14 | input: 'serializeapis'
15 | buf_token: ${{ secrets.BUF_TOKEN }}-
16 | - uses: bufbuild/buf-push-action@v0.3.0
17 | with:
18 | input: 'rasapis'
19 | buf_token: ${{ secrets.BUF_TOKEN }}
--------------------------------------------------------------------------------
/third_party/googleapis/README.grpc-gateway:
--------------------------------------------------------------------------------
1 | Google APIs
2 | ============
3 |
4 | Project: Google APIs
5 | URL: https://github.com/google/googleapis
6 | Revision: 3544ab16c3342d790b00764251e348705991ea4b
7 | License: Apache License 2.0
8 |
9 |
10 | Imported Files
11 | ---------------
12 |
13 | - google/api/annotations.proto
14 | - google/api/http.proto
15 | - google/api/httpbody.proto
16 |
17 |
18 | Generated Files
19 | ----------------
20 |
21 | They are generated from the .proto files by protoc-gen-go.
22 | - google/api/annotations.pb.go
23 | - google/api/http.pb.go
24 |
--------------------------------------------------------------------------------
/packet-negotiate.puml:
--------------------------------------------------------------------------------
1 | @startuml
2 | 'https://plantuml.com/class-diagram
3 |
4 | title Описание пакета данных ras
5 | caption Установка подключения
6 | class packet {
7 | type : PacketTypes
8 | size : INTEGER
9 | ..
10 | data : BYTES
11 | }
12 |
13 |
14 | class NegotiateMessage {
15 | magic : int32
16 | protocol : uint16
17 | version : uint16}
18 | }
19 |
20 | enum PacketTypes {
21 | PACKET_TYPE_NEGOTIATE = 0
22 | PACKET_TYPE_CONNECT = 1
23 | }
24 | packet::type *-- PacketTypes::PACKET_TYPE_NEGOTIATE
25 | packet::data <-- NegotiateMessage : Encode
26 |
27 | @enduml
--------------------------------------------------------------------------------
/buf.gen.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | version: v1
3 | managed:
4 | enabled: true
5 | go_package_prefix:
6 | default: github.com/v8platform/protos/gen
7 | except:
8 | - buf.build/googleapis/googleapis
9 | - buf.build/v8platform/encodingapis
10 | # - buf.build/v8platform/serializeapis
11 | - buf.build/grpc-ecosystem/grpc-gateway
12 | # - buf.build/v8platform/rasapis
13 | # - buf.build/v8platform/rasserviceapis
14 |
15 | plugins:
16 | - name: go
17 | out: ./gen
18 | opt: paths=source_relative
19 | - name: go-ras
20 | out: ./gen
21 | opt: paths=source_relative
22 |
23 |
--------------------------------------------------------------------------------
/serializeapis/v8platform/serialize/v1/services.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package v8platform.serialize.v1;
4 |
5 | import "google/protobuf/timestamp.proto";
6 | import "ras/encoding/ras.proto";
7 | import "v8platform/serialize/v1/licanses.proto";
8 |
9 |
10 | option go_package = "github.com/v8platform/protos/gen/v8platform/serialize/v1;serializev1";
11 |
12 | message ServiceInfo {
13 |
14 | string name = 1 [(ras.encoding.field) = {order: 1}];
15 | string descr = 2 [(ras.encoding.field) = {order: 2}];
16 | int32 main_only = 3 [(ras.encoding.field) = {order: 3}];
17 | repeated string managers = 4 [(ras.encoding.field) = {order: 4, encoder: "uuid"}];
18 |
19 | }
--------------------------------------------------------------------------------
/third_party/googleapis/google/type/README.md:
--------------------------------------------------------------------------------
1 | # Google Common Types
2 |
3 | This package contains definitions of common types for Google APIs.
4 | All types defined in this package are suitable for different APIs to
5 | exchange data, and will never break binary compatibility. They should
6 | have design quality comparable to major programming languages like
7 | Java and C#.
8 |
9 | NOTE: Some common types are defined in the package `google.protobuf`
10 | as they are directly supported by Protocol Buffers compiler and
11 | runtime. Those types are called Well-Known Types.
12 |
13 | ## Java Utilities
14 |
15 | A set of Java utilities for the Common Types are provided in the
16 | `//java/com/google/type/util/` package.
--------------------------------------------------------------------------------
/serializeapis/v8platform/serialize/v1/managers.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package v8platform.serialize.v1;
4 |
5 | import "google/protobuf/timestamp.proto";
6 | import "ras/encoding/ras.proto";
7 |
8 | option go_package = "github.com/v8platform/protos/gen/v8platform/serialize/v1;serializev1";
9 |
10 | message ManagerInfo {
11 |
12 | string uuid = 1 [(ras.encoding.field) = {encoder: "uuid", order: 1}];
13 | string descr = 2 [(ras.encoding.field) = {order: 2}];
14 | string host = 3 [(ras.encoding.field).order = 3];
15 | int32 main_manager = 4 [(ras.encoding.field).order = 4];
16 | int32 port = 5 [(ras.encoding.field) = {encoder: "short", order: 5}];
17 | string pid = 6 [(ras.encoding.field).order = 6];
18 |
19 | }
--------------------------------------------------------------------------------
/serializeapis/v8platform/serialize/v1/assignments.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package v8platform.serialize.v1;
4 |
5 | import "google/protobuf/timestamp.proto";
6 | import "ras/encoding/ras.proto";
7 |
8 |
9 | option go_package = "github.com/v8platform/protos/gen/v8platform/serialize/v1;serializev1";
10 |
11 | message AssignmentInfo {
12 |
13 | string uuid = 1 [(ras.encoding.field) = {encoder: "uuid", order: 1}];
14 | string object_type = 2 [(ras.encoding.field) = {order: 2}];
15 | string infobase_name = 3 [(ras.encoding.field) = {order: 3}];
16 | int32 type = 4 [(ras.encoding.field) = {order: 4}];
17 | string application_ext = 5 [(ras.encoding.field) = {order: 5}];
18 | int32 priority = 6 [(ras.encoding.field) = {order: 6}];
19 |
20 | }
--------------------------------------------------------------------------------
/example/grpc-server/http-gw.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | //
4 | // func RunGW(srv apiv1.ClustersServiceServer) {
5 | // ctx := context.Background()
6 | // ctx, cancel := context.WithCancel(ctx)
7 | // defer cancel()
8 | //
9 | // // Register gRPC server endpoint
10 | // // Note: Make sure the gRPC server is running properly and accessible
11 | // mux := runtime.NewServeMux()
12 | // // opts := []grpc.DialOption{grpc.WithInsecure()}
13 | // err := apiv1.RegisterClustersServiceHandlerServer(ctx, mux, srv)
14 | // if err != nil {
15 | // panic(err)
16 | // }
17 | //
18 | // go func() {
19 | // log.Println("Listening HTTP on :8081")
20 | //
21 | // http.ListenAndServe(":8081", mux)
22 | // }()
23 | // // Start HTTP server (and proxy calls to gRPC server endpoint)
24 | //
25 | // }
26 |
--------------------------------------------------------------------------------
/serializeapis/v8platform/serialize/v1/locks.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package v8platform.serialize.v1;
4 |
5 | import "google/protobuf/timestamp.proto";
6 | import "ras/encoding/ras.proto";
7 | import "v8platform/serialize/v1/licanses.proto";
8 |
9 |
10 | option go_package = "github.com/v8platform/protos/gen/v8platform/serialize/v1;serializev1";
11 |
12 | message LockInfo {
13 |
14 | string connection_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"}];
15 | string description = 2 [(ras.encoding.field) = {order: 2}];
16 | google.protobuf.Timestamp locked_at = 3 [(ras.encoding.field) = {order: 3, encoder: "time"}];
17 | string object_id = 4 [(ras.encoding.field) = {order: 4, encoder: "uuid"}];
18 | string session_id = 5 [(ras.encoding.field) = {order: 5, encoder: "uuid"}];
19 |
20 | }
--------------------------------------------------------------------------------
/.github/workflows/releaser.yaml:
--------------------------------------------------------------------------------
1 | name: goreleaser
2 |
3 | on:
4 | pull_request:
5 | push:
6 | tags:
7 | - '*'
8 | jobs:
9 | goreleaser:
10 | runs-on: ubuntu-latest
11 | steps:
12 | - name: Checkout
13 | uses: actions/checkout@v2
14 | with:
15 | fetch-depth: 0
16 | - name: Set up Go
17 | uses: actions/setup-go@v2
18 | with:
19 | go-version: 1.17
20 | - name: Run GoReleaser
21 | uses: goreleaser/goreleaser-action@v2
22 | with:
23 | version: latest
24 | args: release --rm-dist
25 | env:
26 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27 | - name: Clear
28 | if: always() && startsWith(github.ref, 'refs/tags/v')
29 | run: |
30 | rm -f ${HOME}/.docker/config.json
--------------------------------------------------------------------------------
/third_party/encodingapis/ras/client/client.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package ras.client;
4 |
5 | import "google/protobuf/descriptor.proto";
6 |
7 | option go_package = "github.com/v8platform/protoc-gen-go-ras/plugin/ras/client";
8 |
9 | extend google.protobuf.ServiceOptions {
10 | ClientOptions client = 475223888;
11 | }
12 |
13 | message ClientOptions {
14 | bool is_client = 1;
15 | bool is_endpoint = 2;
16 | bool is_request_service = 3;
17 | bool is_ras_service = 4;
18 | }
19 |
20 |
21 | extend google.protobuf.MethodOptions {
22 | ClientMethodOptions method = 475223888;
23 | }
24 |
25 | message ClientMethodOptions {
26 |
27 | bool no_packet_pack = 1;
28 | map param = 2;
29 | bool ignore_empty = 3;
30 | bool new_endpoint_func = 4;
31 | string proxy_name = 5;
32 |
33 |
34 | }
--------------------------------------------------------------------------------
/example/grpc-client/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | //
4 | // func main() {
5 | // if err := run(); err != nil {
6 | // log.Fatal(err)
7 | // }
8 | // }
9 | // func run() error {
10 | // connectTo := "127.0.0.1:8080"
11 | // conn, err := grpc.Dial(connectTo, grpc.WithBlock(), grpc.WithInsecure())
12 | // if err != nil {
13 | // return fmt.Errorf("failed to connect to ClustersService on %s: %w", connectTo, err)
14 | // }
15 | // log.Println("Connected to", connectTo)
16 | //
17 | // clusterService := apiv1.NewClustersServiceClient(conn)
18 | // resp, err := clusterService.Clusters(context.Background(), &apiv1.GetClustersRequest{})
19 | // if err != nil {
20 | // return fmt.Errorf("failed to Clusters: %w", err)
21 | // }
22 | //
23 | // log.Printf("Successfully Clusters \n %v", resp.Items)
24 | // return nil
25 | // }
26 |
--------------------------------------------------------------------------------
/rasapis/ras/protocol/v1/param.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package ras.protocol.v1;
4 |
5 | import "ras/encoding/ras.proto";
6 |
7 | option csharp_namespace = "ras.protocol.v1";
8 | option go_package = "github.com/v8platform/protos/gen/ras/protocol/v1;protocolv1";
9 |
10 | message Param {
11 | ParamType type = 1 [(ras.encoding.field) = {order: 1, encoder: "byte"}];
12 | bytes value = 2 [(ras.encoding.field) = {order: 2, encoder: "type"}];
13 | }
14 |
15 | enum ParamType {
16 | PARAM_UNKNOWN_TYPE = 0;
17 | PARAM_BOOLEAN = 1;
18 | PARAM_BYTE = 2;
19 | PARAM_SHORT = 3;
20 | PARAM_INT = 4;
21 | PARAM_LONG = 5;
22 | PARAM_FLOAT = 6;
23 | PARAM_DOUBLE = 7;
24 | PARAM_SIZE = 8;
25 | PARAM_NULLABLE_SIZE = 9;
26 | PARAM_STRING = 10;
27 | PARAM_UUID = 11;
28 | PARAM_TYPE = 12;
29 | PARAM_ENDPOINT_ID = 13;
30 | }
31 |
--------------------------------------------------------------------------------
/serializeapis/buf.lock:
--------------------------------------------------------------------------------
1 | # Generated by buf. DO NOT EDIT.
2 | version: v1
3 | deps:
4 | - remote: buf.build
5 | owner: googleapis
6 | repository: googleapis
7 | branch: main
8 | commit: 6358935a97044c1494fe13d369ac2f3b
9 | digest: b1-4hxgpEmLuajuxqkZd7NMVnKipt3zqnXaTHsBEKtUOsM=
10 | create_time: 2021-08-13T15:04:04.653816Z
11 | - remote: buf.build
12 | owner: grpc-ecosystem
13 | repository: grpc-gateway
14 | branch: main
15 | commit: de24a84aed3d4d84806740946b55d947
16 | digest: b1-Q-mEW3P3NR5UL8gm0pr3YWFSo5DAtrBqqgvkwH2WFWw=
17 | create_time: 2021-09-08T00:32:28.231758Z
18 | - remote: buf.build
19 | owner: v8platform
20 | repository: encodingapis
21 | branch: main
22 | commit: 091695bd6f3f4d0586002d3d0968d58b
23 | digest: b1-5jEAqm3xGhroobf8noT90y9leB7HYIrgmLfg5M32wgs=
24 | create_time: 2021-09-07T09:19:15.738113Z
25 |
--------------------------------------------------------------------------------
/rasapis/ras/protocol/v1/packet.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package ras.protocol.v1;
4 |
5 | import "google/protobuf/any.proto";
6 | import "google/protobuf/descriptor.proto";
7 | import "ras/protocol/v1/param.proto";
8 | import "ras/protocol/v1/types.proto";
9 | import "ras/encoding/ras.proto";
10 |
11 | option csharp_namespace = "ras.protocol.v1";
12 | option go_package = "github.com/v8platform/protos/gen/ras/protocol/v1;protocolv1";
13 |
14 | // Порядок кодирования/декодирования в формат RAS
15 | message Packet {
16 | option (ras.encoding.options).generate_packet_helpers = true;
17 | option (ras.encoding.options).generate_io_write_to = true;
18 | PacketType type = 1 [(ras.encoding.field) = {
19 | encoder: "byte",
20 | order: 1,
21 | }
22 | ];
23 |
24 | int32 size = 2 [(ras.encoding.field) = {
25 | encoder: "size",
26 | order: 2,
27 | }];
28 |
29 | bytes data = 3 [(ras.encoding.field) = {
30 | encoder: "bytes",
31 | order: 3,
32 | type_field: 1,
33 | size_field: 2,
34 | }];
35 | }
36 |
--------------------------------------------------------------------------------
/serializeapis/v8platform/serialize/v1/connections.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package v8platform.serialize.v1;
4 |
5 | import "google/protobuf/timestamp.proto";
6 | import "ras/encoding/ras.proto";
7 | import "v8platform/serialize/v1/licanses.proto";
8 |
9 |
10 | option go_package = "github.com/v8platform/protos/gen/v8platform/serialize/v1;serializev1";
11 |
12 | message ConnectionInfo {
13 |
14 | string uuid = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"}];
15 | string application = 2 [(ras.encoding.field) = {order: 2}];
16 | int32 blocked_by_ls = 3 [(ras.encoding.field) = {order: 3}];
17 | google.protobuf.Timestamp connected_at = 4 [(ras.encoding.field) = {order: 4, encoder: "time"}];
18 | int32 id = 5 [(ras.encoding.field) = {order: 5}];
19 | string host = 6 [(ras.encoding.field) = {order: 6}];
20 | string infobase_id = 7 [(ras.encoding.field) = {order: 7, encoder: "uuid"}];
21 | string process_id = 8 [(ras.encoding.field) = {order: 8, encoder: "uuid"}];
22 | int32 session_id = 9 [(ras.encoding.field) = {order: 9}];
23 |
24 | }
--------------------------------------------------------------------------------
/rasapis/ras/client/v1/client_service.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package ras.client.v1;
4 | import "google/protobuf/empty.proto";
5 | import "google/protobuf/any.proto";
6 | import "ras/protocol/v1/connect.proto";
7 | import "ras/protocol/v1/endpoint.proto";
8 | import "ras/client/client.proto";
9 | option go_package = "github.com/v8platform/protos/gen/ras/client/v1;clientv1";
10 |
11 | service ClientService {
12 |
13 | option(client).is_client = true;
14 |
15 | rpc Negotiate(protocol.v1.NegotiateMessage) returns (google.protobuf.Empty) {
16 | option(method).no_packet_pack = true;
17 | };
18 | rpc Connect(protocol.v1.ConnectMessage) returns (protocol.v1.ConnectMessageAck) {};
19 | rpc Disconnect(protocol.v1.DisconnectMessage) returns (google.protobuf.Empty) {};
20 |
21 | rpc EndpointOpen(protocol.v1.EndpointOpen) returns (protocol.v1.EndpointOpenAck) {};
22 | rpc EndpointClose(protocol.v1.EndpointClose) returns (google.protobuf.Empty) {};
23 | rpc EndpointMessage(protocol.v1.EndpointMessage) returns (protocol.v1.EndpointMessage) {};
24 |
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 v8platform
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/powerproto.yaml:
--------------------------------------------------------------------------------
1 | scopes:
2 | - ./
3 | protoc: v3.17.3
4 | protocWorkDir: ""
5 | plugins:
6 | protoc-gen-deepcopy: istio.io/tools/cmd/protoc-gen-deepcopy@v0.0.0-20210903154605-82c44ca41d2e
7 | protoc-gen-go: google.golang.org/protobuf/cmd/protoc-gen-go@v1.27.1
8 | protoc-gen-go-grpc: google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1.0
9 | protoc-gen-go-json: github.com/mitchellh/protoc-gen-go-json@v1.1.0
10 | protoc-gen-grpc-gateway: github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@v2.5.0
11 | repositories:
12 | GOOGLE_APIS: https://github.com/googleapis/googleapis@75e9812478607db997376ccea247dd6928f70f45
13 | options:
14 | - --go_out=.
15 | - --go_opt=paths=source_relative
16 | - --go-grpc_out=.
17 | - --go-grpc_opt=paths=source_relative
18 | - --grpc-gateway_out=.
19 | - --grpc-gateway_opt=paths=source_relative
20 | - --deepcopy_out=source_relative:.
21 | - --go-json_out=.
22 | importPaths:
23 | - .
24 | - $GOPATH
25 | - $POWERPROTO_INCLUDE
26 | - $SOURCE_RELATIVE
27 | - $GOOGLE_APIS/github.com/googleapis/googleapis
28 | postActions: []
29 | postShell: ""
30 |
--------------------------------------------------------------------------------
/rasapis/buf.lock:
--------------------------------------------------------------------------------
1 | # Generated by buf. DO NOT EDIT.
2 | version: v1
3 | deps:
4 | - remote: buf.build
5 | owner: googleapis
6 | repository: googleapis
7 | branch: main
8 | commit: 7d452530229747c18e7fb356d083908e
9 | digest: b1--iOE3RUMTW_MZfzxxCUgplse84R14WEekhQwcz1rIGQ=
10 | create_time: 2021-09-16T15:04:58.905133Z
11 | - remote: buf.build
12 | owner: grpc-ecosystem
13 | repository: grpc-gateway
14 | branch: main
15 | commit: de24a84aed3d4d84806740946b55d947
16 | digest: b1-Q-mEW3P3NR5UL8gm0pr3YWFSo5DAtrBqqgvkwH2WFWw=
17 | create_time: 2021-09-08T00:32:28.231758Z
18 | - remote: buf.build
19 | owner: v8platform
20 | repository: encodingapis
21 | branch: main
22 | commit: 091695bd6f3f4d0586002d3d0968d58b
23 | digest: b1-5jEAqm3xGhroobf8noT90y9leB7HYIrgmLfg5M32wgs=
24 | create_time: 2021-09-07T09:19:15.738113Z
25 | - remote: buf.build
26 | owner: v8platform
27 | repository: serializeapis
28 | branch: main
29 | commit: 837eaaf1de3848dca95a06d332420413
30 | digest: b1-QrX-igsdqmPOLCNZuQUyo7pZlxiJI79iAJvjpdo15h0=
31 | create_time: 2021-09-17T09:53:31.879505Z
32 |
--------------------------------------------------------------------------------
/rasencoderapis/buf.lock:
--------------------------------------------------------------------------------
1 | # Generated by buf. DO NOT EDIT.
2 | version: v1
3 | deps:
4 | - remote: buf.build
5 | owner: googleapis
6 | repository: googleapis
7 | branch: main
8 | commit: d1a849b8f8304950832335723096e954
9 | digest: b1-zJkwX0YeOp1Wa0Jaj_RqMLa2-oEzePH6PJEK8aaMeI4=
10 | create_time: 2021-08-26T15:07:19.652533Z
11 | - remote: buf.build
12 | owner: v8platform
13 | repository: encodingapis
14 | branch: main
15 | commit: 091695bd6f3f4d0586002d3d0968d58b
16 | digest: b1-5jEAqm3xGhroobf8noT90y9leB7HYIrgmLfg5M32wgs=
17 | create_time: 2021-09-07T09:19:15.738113Z
18 | - remote: buf.build
19 | owner: v8platform
20 | repository: rasapis
21 | branch: main
22 | commit: 1cbb8402348f49d898fbc5e09f5d2c22
23 | digest: b1-u2gLa7llo2APcb9BWhxaUcIVW5e9wuHn4cpHaI8xfeU=
24 | create_time: 2021-09-02T14:45:40.015879Z
25 | - remote: buf.build
26 | owner: v8platform
27 | repository: serializeapis
28 | branch: main
29 | commit: a6246712ab2d4c7c9d39db56af30c29f
30 | digest: b1-POYK5yqMR2XramkW0fhT3tgaMai5H3QVonnMsFn1mqc=
31 | create_time: 2021-09-02T14:45:14.885435Z
32 |
--------------------------------------------------------------------------------
/ras-client.puml:
--------------------------------------------------------------------------------
1 | @startuml
2 | 'https://plantuml.com/sequence-diagram
3 |
4 | autonumber
5 |
6 | == Подключение ==
7 | Клиент -> ras: NegotiateMessage
8 | note left: Начало работы
9 | Клиент --> ras: ConnectMessage
10 | note left: Подключение
11 | ras --> Клиент: ConnectMessageAck
12 | note right: Ответ на подлючение
13 |
14 | == Открытые точки работы ==
15 | Клиент --> ras: EndpointOpen
16 | note left: Передается версия и \n формат обмена
17 | ras --> Клиент: EndpointOpenAck
18 | note right: Ответ на открытие точки работы \n, в том числе и endpoint_id
19 |
20 | == Цикл работы ==
21 |
22 | Клиент --> ras: AuthenticateAgentRequest
23 | note left: Авторитизация на агенте\n(необязательно)
24 | Клиент --> ras: GetClustersRequest
25 | ras --> Клиент: GetClustersResponse
26 |
27 | Клиент --> ras: ClusterAuthenticateRequest
28 | note left: Авторитизация на кластере\n(необязательно)
29 |
30 | Клиент --> ras: GetInfobasesRequest
31 | ras --> Клиент: GetInfobasesResponse
32 |
33 | == Закрытие точки работы ==
34 | ref over ras
35 | Закрытие открытых
36 | точек работы
37 | end ref
38 | Клиент --> ras: EndpointClose
39 |
40 |
41 | == Отключение ==
42 | Клиент --> ras: DisconnectMessage
43 |
44 | @enduml
--------------------------------------------------------------------------------
/third_party/googleapis/google/api/annotations.proto:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2015, Google Inc.
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | syntax = "proto3";
16 |
17 | package google.api;
18 |
19 | import "google/api/http.proto";
20 | import "google/protobuf/descriptor.proto";
21 |
22 | option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
23 | option java_multiple_files = true;
24 | option java_outer_classname = "AnnotationsProto";
25 | option java_package = "com.google.api";
26 | option objc_class_prefix = "GAPI";
27 |
28 | extend google.protobuf.MethodOptions {
29 | // See `HttpRule`.
30 | HttpRule http = 72295728;
31 | }
32 |
--------------------------------------------------------------------------------
/gen/ras/protocol/v1/param_ras.pb.go:
--------------------------------------------------------------------------------
1 | // Code generated by protoc-gen-go-ras. DO NOT EDIT.
2 |
3 | // This is a compile-time assertion to ensure that this generated file
4 | // is compatible with the v8platform/protoc-gen-go-ras ras it is being compiled against.
5 |
6 | package protocolv1
7 |
8 | import (
9 | codec256 "github.com/v8platform/encoder/ras/codec256"
10 | io "io"
11 | )
12 |
13 | func (x *Param) Parse(reader io.Reader, version int32) error {
14 | if x == nil {
15 | return nil
16 | }
17 | // decode x.Type opts: encoder:"byte" order:1
18 | var val_Type int32
19 | if err := codec256.ParseByte(reader, &val_Type); err != nil {
20 | return err
21 | }
22 | x.Type = ParamType(val_Type)
23 | // decode x.Value opts: encoder:"type" order:2
24 | var err error
25 | x.Value, err = io.ReadAll(reader)
26 | if err != nil {
27 | return err
28 | }
29 | return nil
30 | }
31 | func (x *Param) Formatter(writer io.Writer, version int32) error {
32 | if x == nil {
33 | return nil
34 | }
35 | // decode x.Type opts: encoder:"byte" order:1
36 | if err := codec256.FormatByte(writer, int32(x.Type)); err != nil {
37 | return err
38 | }
39 | // decode x.Value opts: encoder:"type" order:2
40 | if err := codec256.FormatBytes(writer, x.Value); err != nil {
41 | return err
42 | }
43 | return nil
44 | }
45 |
--------------------------------------------------------------------------------
/third_party/googleapis/google/type/fraction.proto:
--------------------------------------------------------------------------------
1 | // Copyright 2021 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | syntax = "proto3";
16 |
17 | package google.type;
18 |
19 | option go_package = "google.golang.org/genproto/googleapis/type/fraction;fraction";
20 | option java_multiple_files = true;
21 | option java_outer_classname = "FractionProto";
22 | option java_package = "com.google.type";
23 | option objc_class_prefix = "GTP";
24 |
25 | // Represents a fraction in terms of a numerator divided by a denominator.
26 | message Fraction {
27 | // The numerator in the fraction, e.g. 2 in 2/3.
28 | int64 numerator = 1;
29 |
30 | // The value by which the numerator is divided, e.g. 3 in 2/3. Must be
31 | // positive.
32 | int64 denominator = 2;
33 | }
34 |
--------------------------------------------------------------------------------
/.github/workflows/generate.yaml:
--------------------------------------------------------------------------------
1 | name: generate-prtos
2 | on:
3 | push:
4 | paths:
5 | - '*.proto'
6 | - '.github/workflows/generate.yaml'
7 | jobs:
8 | generate:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: actions/checkout@v2
12 | - uses: bufbuild/buf-setup-action@v0.3.1
13 | - name: Set up Go
14 | uses: actions/setup-go@v2
15 | with:
16 | go-version: 1.17
17 | - name: Buf generate
18 | if: success()
19 | run: |
20 | go install google.golang.org/protobuf/cmd/protoc-gen-go
21 | go install github.com/v8platform/protoc-gen-go-ras
22 | buf generate
23 | - name: Set up Git
24 | env:
25 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26 | run: |
27 | git config user.name GitHub
28 | git config user.email noreply@github.com
29 | git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
30 | - name: Commit and push changes
31 | run: |
32 | git add .
33 | if output=$(git status --porcelain) && [ ! -z "$output" ]; then
34 | git commit --author "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" --message "buf generate"
35 | git push
36 | fi
--------------------------------------------------------------------------------
/serializeapis/v8platform/serialize/v1/licanses.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package v8platform.serialize.v1;
4 |
5 | import "google/protobuf/timestamp.proto";
6 | import "ras/encoding/ras.proto";
7 | option go_package = "github.com/v8platform/protos/gen/v8platform/serialize/v1;serializev1";
8 |
9 |
10 | message LicenseInfo {
11 |
12 | // ignore
13 | // need fill
14 | string cluster_id = 1;
15 | string process_id = 2;
16 | string session_id = 3;
17 | string user_name = 4;
18 | string host = 6;
19 | string app_id = 7;
20 |
21 | // all version
22 | string full_name = 8 [(ras.encoding.field) = {order: 1}];
23 | string full_presentation = 9 [(ras.encoding.field) = {order: 2}];
24 | bool issued_by_server = 10 [(ras.encoding.field) = {order: 3}];
25 | int32 license_type = 11 [(ras.encoding.field) = {order: 4}];
26 | int32 max_users_all = 12 [(ras.encoding.field) = {order: 5}];
27 | int32 max_users_cur = 13 [(ras.encoding.field) = {order: 6}];
28 | bool net = 14 [(ras.encoding.field) = {order: 7}];
29 | string rmngr_address = 15 [(ras.encoding.field) = {order: 8}];
30 | string rmngr_pid = 16 [(ras.encoding.field) = {order: 9}];
31 | int32 rmngr_port = 17 [(ras.encoding.field) = {order: 10}];
32 | string series = 18 [(ras.encoding.field) = {order: 11}];
33 | string short_presentation = 19 [(ras.encoding.field) = {order: 12}];
34 |
35 | }
--------------------------------------------------------------------------------
/rasapis/ras/messages/v1/services_messages.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package ras.messages.v1;
4 |
5 | import "ras/encoding/ras.proto";
6 | import "v8platform/serialize/v1/services.proto";
7 | import "protoc-gen-openapiv2/options/annotations.proto";
8 |
9 | option csharp_namespace = "ras.messages.v1";
10 | option go_package = "github.com/v8platform/protos/gen/ras/messages/v1;messagesv1";
11 |
12 | message GetClusterServicesRequest {
13 | option (ras.encoding.options).message_type = "GET_CLUSTER_SERVICES_REQUEST";
14 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
15 | json_schema: {
16 | title: "GetClusterServicesRequest";
17 | description: "Получение списка сервисов локального кластера";
18 | required: ["cluster_id"];
19 | };
20 | };
21 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
22 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
23 | description: "Уникальный идентификатор локального кластера"
24 | format: "uuid"
25 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
26 | }
27 | ];
28 | }
29 |
30 | message GetClusterServicesResponse {
31 | option (ras.encoding.options).message_type = "GET_CLUSTER_SERVICES_RESPONSE";
32 | repeated v8platform.serialize.v1.ServiceInfo services = 1 [(ras.encoding.field).order = 1];
33 | }
34 |
--------------------------------------------------------------------------------
/third_party/googleapis/google/type/type.yaml:
--------------------------------------------------------------------------------
1 | type: google.api.Service
2 | config_version: 3
3 | name: type.googleapis.com
4 | title: Common Types
5 |
6 | types:
7 | - name: google.type.Color
8 | - name: google.type.Date
9 | - name: google.type.DateTime
10 | - name: google.type.Decimal
11 | - name: google.type.Expr
12 | - name: google.type.Fraction
13 | - name: google.type.Interval
14 | - name: google.type.LatLng
15 | - name: google.type.LocalizedText
16 | - name: google.type.Money
17 | - name: google.type.PhoneNumber
18 | - name: google.type.PostalAddress
19 | - name: google.type.Quaternion
20 | - name: google.type.TimeOfDay
21 |
22 | enums:
23 | - name: google.type.CalendarPeriod
24 | - name: google.type.DayOfWeek
25 | - name: google.type.Month
26 |
27 | documentation:
28 | summary: Defines common types for Google APIs.
29 | overview: |-
30 | # Google Common Types
31 |
32 | This package contains definitions of common types for Google APIs.
33 | All types defined in this package are suitable for different APIs to
34 | exchange data, and will never break binary compatibility. They should
35 | have design quality comparable to major programming languages like
36 | Java and C#.
37 |
38 | NOTE: Some common types are defined in the package `google.protobuf`
39 | as they are directly supported by Protocol Buffers compiler and
40 | runtime. Those types are called Well-Known Types.
41 |
--------------------------------------------------------------------------------
/third_party/googleapis/google/type/dayofweek.proto:
--------------------------------------------------------------------------------
1 | // Copyright 2021 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | syntax = "proto3";
16 |
17 | package google.type;
18 |
19 | option go_package = "google.golang.org/genproto/googleapis/type/dayofweek;dayofweek";
20 | option java_multiple_files = true;
21 | option java_outer_classname = "DayOfWeekProto";
22 | option java_package = "com.google.type";
23 | option objc_class_prefix = "GTP";
24 |
25 | // Represents a day of the week.
26 | enum DayOfWeek {
27 | // The day of the week is unspecified.
28 | DAY_OF_WEEK_UNSPECIFIED = 0;
29 |
30 | // Monday
31 | MONDAY = 1;
32 |
33 | // Tuesday
34 | TUESDAY = 2;
35 |
36 | // Wednesday
37 | WEDNESDAY = 3;
38 |
39 | // Thursday
40 | THURSDAY = 4;
41 |
42 | // Friday
43 | FRIDAY = 5;
44 |
45 | // Saturday
46 | SATURDAY = 6;
47 |
48 | // Sunday
49 | SUNDAY = 7;
50 | }
51 |
--------------------------------------------------------------------------------
/.idea/protoeditor.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/example/ras-client/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | //
4 | // func main() {
5 | //
6 | // var host string
7 | // flag.StringVar(&host, "server", "srv-uk-app31:1545", "Адрес сервера и порт")
8 | //
9 | // flag.Parse()
10 | //
11 | // ctx := context.Background()
12 | //
13 | // client := simpleClient.NewClient(host)
14 | // defer func() {
15 | // err := client.Close()
16 | // if err != nil {
17 | // panic(err)
18 | // }
19 | // }()
20 | //
21 | // err := client.Connect(ctx)
22 | // if err != nil {
23 | // panic(err)
24 | // }
25 | //
26 | // endpointService, err := client.Open("10.0")
27 | // if err != nil {
28 | // panic(err)
29 | // }
30 | //
31 | // ras := clientv1.NewRasService(endpointService)
32 | // clusters, err := ras.GetClusters(&messagesv1.GetClustersRequest{})
33 | // if err != nil {
34 | // panic(err)
35 | // }
36 | //
37 | // _, err = ras.AuthenticateCluster(&messagesv1.ClusterAuthenticateRequest{ClusterId: clusters.Clusters[0].Uuid})
38 | // if err != nil {
39 | // panic(err)
40 | // }
41 | //
42 | // sessions, err := ras.GetSessions(&messagesv1.GetSessionsRequest{ClusterId: clusters.Clusters[0].Uuid})
43 | // if err != nil {
44 | // panic(err)
45 | // }
46 | // // pp.SetDefaultMaxDepth(1)
47 | // // pp.Println(resp.Sessions)
48 | // fmt.Println("Список полученных сессий ", len(sessions.Sessions))
49 | // for _, session := range sessions.Sessions {
50 | //
51 | // log.Println(session.String())
52 | // }
53 | //
54 | // }
55 |
--------------------------------------------------------------------------------
/third_party/googleapis/google/type/localized_text.proto:
--------------------------------------------------------------------------------
1 | // Copyright 2021 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | syntax = "proto3";
16 |
17 | package google.type;
18 |
19 | option cc_enable_arenas = true;
20 | option go_package = "google.golang.org/genproto/googleapis/type/localized_text;localized_text";
21 | option java_multiple_files = true;
22 | option java_outer_classname = "LocalizedTextProto";
23 | option java_package = "com.google.type";
24 | option objc_class_prefix = "GTP";
25 |
26 | // Localized variant of a text in a particular language.
27 | message LocalizedText {
28 | // Localized string in the language corresponding to `language_code' below.
29 | string text = 1;
30 |
31 | // The text's BCP-47 language code, such as "en-US" or "sr-Latn".
32 | //
33 | // For more information, see
34 | // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
35 | string language_code = 2;
36 | }
37 |
--------------------------------------------------------------------------------
/third_party/googleapis/google/type/latlng.proto:
--------------------------------------------------------------------------------
1 | // Copyright 2021 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | syntax = "proto3";
16 |
17 | package google.type;
18 |
19 | option cc_enable_arenas = true;
20 | option go_package = "google.golang.org/genproto/googleapis/type/latlng;latlng";
21 | option java_multiple_files = true;
22 | option java_outer_classname = "LatLngProto";
23 | option java_package = "com.google.type";
24 | option objc_class_prefix = "GTP";
25 |
26 | // An object that represents a latitude/longitude pair. This is expressed as a
27 | // pair of doubles to represent degrees latitude and degrees longitude. Unless
28 | // specified otherwise, this must conform to the
29 | // WGS84
30 | // standard. Values must be within normalized ranges.
31 | message LatLng {
32 | // The latitude in degrees. It must be in the range [-90.0, +90.0].
33 | double latitude = 1;
34 |
35 | // The longitude in degrees. It must be in the range [-180.0, +180.0].
36 | double longitude = 2;
37 | }
38 |
--------------------------------------------------------------------------------
/rasapis/ras/protocol/v1/connect.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package ras.protocol.v1;
4 |
5 | import "google/protobuf/any.proto";
6 | import "google/protobuf/descriptor.proto";
7 | import "ras/protocol/v1/param.proto";
8 | import "ras/protocol/v1/types.proto";
9 | import "ras/protocol/v1/packet.proto";
10 | import "ras/encoding/ras.proto";
11 |
12 |
13 | option csharp_namespace = "ras.protocol.v1";
14 | option go_package = "github.com/v8platform/protos/gen/ras/protocol/v1;protocolv1";
15 |
16 | message NegotiateMessage {
17 | option (ras.encoding.options).packet_type = "PACKET_TYPE_NEGOTIATE";
18 | option (ras.encoding.options).is_negotiate = true;
19 |
20 | int32 magic = 1 [(ras.encoding.field) = {
21 | order: 1,
22 | encoder: "int32",
23 | }]; // Use only one value `475223888`
24 | int32 protocol = 2 [(ras.encoding.field) = {
25 | order: 2,
26 | encoder: "short",
27 | }];
28 | int32 version = 3 [(ras.encoding.field) = {
29 | order: 3,
30 | encoder: "short",
31 | }];
32 | }
33 |
34 | message ConnectMessage {
35 | option (ras.encoding.options).packet_type = "PACKET_TYPE_CONNECT";
36 |
37 | // Известные параметры
38 | // "connect.timeout" = 2000
39 | map params = 1 [(ras.encoding.field).order = 1];
40 | }
41 |
42 | message DisconnectMessage {
43 | option (ras.encoding.options).packet_type = "PACKET_TYPE_DISCONNECT";
44 | map params = 1 [(ras.encoding.field).order = 1];
45 | }
46 |
47 | message ConnectMessageAck {
48 | option (ras.encoding.options).packet_type = "PACKET_TYPE_CONNECT_ACK";
49 | option (ras.encoding.options).generate_empty = true;
50 | }
--------------------------------------------------------------------------------
/serializeapis/v8platform/serialize/v1/clusters.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package v8platform.serialize.v1;
4 |
5 | import "google/protobuf/timestamp.proto";
6 | import "ras/encoding/ras.proto";
7 |
8 | option go_package = "github.com/v8platform/protos/gen/v8platform/serialize/v1;serializev1";
9 |
10 |
11 | message ClusterInfo {
12 |
13 | string uuid = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"}];
14 | int32 expiration_timeout = 2 [json_name = "expiration_timeout", (ras.encoding.field).order = 2];
15 | string host = 3 [(ras.encoding.field) = {
16 | order: 3,
17 | }];
18 | int32 lifetime_limit = 4 [(ras.encoding.field) = {
19 | order: 4,
20 | }];
21 | int32 port = 5 [(ras.encoding.field) = {
22 | order: 5,
23 | encoder: "short",
24 | }];
25 | int32 max_memory_size = 6 [(ras.encoding.field) = {
26 | order: 6,
27 | }];
28 | int32 max_memory_time_limit = 7 [(ras.encoding.field) = {
29 | order: 7,
30 | }];
31 | string name = 8 [(ras.encoding.field) = {
32 | order: 8,
33 | }];
34 | int32 security_level = 9 [(ras.encoding.field) = {
35 | order: 9,
36 | }];
37 | int32 session_fault_tolerance_level = 10 [(ras.encoding.field) = {
38 | order: 10,
39 | }];
40 | int32 load_balancing_mode = 11 [(ras.encoding.field) = {
41 | order: 11,
42 | }];
43 | int32 errors_count_threshold = 12 [(ras.encoding.field) = {
44 | order: 12,
45 | }];
46 | bool kill_problem_processes = 13 [(ras.encoding.field) = {
47 | order: 13,
48 | }];
49 | // version >= 9
50 | bool kill_by_memory_with_dump = 14 [(ras.encoding.field) = {
51 | order: 14,
52 | version: 9,
53 | }];
54 |
55 | }
--------------------------------------------------------------------------------
/rasencoderapis/ras/encoder/encoder_service.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package ras.encoder;
4 | import "google/protobuf/any.proto";
5 | import "google/protobuf/wrappers.proto";
6 | import "ras/protocol/v1/packet.proto";
7 |
8 | option go_package = "github.com/v8platform/protos/gen/ras/encoder;encoder";
9 |
10 | service EncoderService {
11 | //codec debug func
12 | rpc Encode(EncodeRequest) returns (google.protobuf.BytesValue) {};
13 | rpc Decode(DecodeRequest) returns (google.protobuf.Any) {};
14 |
15 | //packet debug func
16 | rpc PacketEncode(ras.protocol.v1.Packet) returns (google.protobuf.BytesValue);
17 | rpc PacketDecode(google.protobuf.BytesValue) returns (ras.protocol.v1.Packet);
18 |
19 | // Конвертирует любой сообщение в пакет
20 | // Сообщение должно реализовавать интерфейс пакета
21 | // * PacketType()
22 | // * Format()
23 | rpc NewPacket(google.protobuf.Any) returns (ras.protocol.v1.Packet);
24 | // Аналог NewPacket только еще сразу кодирует пакет в байты
25 | rpc NewPacketBytes(google.protobuf.Any) returns (google.protobuf.BytesValue);
26 |
27 | // Выполняет распаковку пакета в полученное сообщение
28 | // Распаковывает 1 уровень данных
29 | // Возможные значения
30 | // * ras.protocol.v1.ConnectMessageAck
31 | // * ras.protocol.v1.EndpointFailureAck
32 | // * ras.protocol.v1.EndpointOpenAck
33 | // * ras.protocol.v1.EndpointMessage
34 | rpc UnpackPacket(ras.protocol.v1.Packet) returns (google.protobuf.Any);
35 |
36 | }
37 |
38 | message DecodeRequest {
39 | int32 version = 1;
40 | bytes data = 2;
41 | }
42 |
43 | message EncodeRequest {
44 | int32 version = 1;
45 | google.protobuf.Any data = 2;
46 | }
47 |
--------------------------------------------------------------------------------
/packet-get-clusters-request.puml:
--------------------------------------------------------------------------------
1 | @startuml
2 | 'https://plantuml.com/component-diagram
3 | set namespaceSeparator none
4 |
5 | title Описание пакета данных
6 | caption Запрос списка кластеров
7 |
8 | class ras.protocol.v1.Packet {
9 | type : ras.protocol.v1.PacketTypes
10 | size : INTEGER
11 | ..
12 | data : BYTES
13 | }
14 |
15 | class ras.protocol.v1.EndpointMessage {
16 | endpoint_id : int32
17 | format: int32
18 | type: ras.protocol.v1.EndpointDataType
19 | data: ras.protocol.v1.EndpointDataMessage
20 | }
21 |
22 |
23 | class ras.messages.v1.GetClustersRequest {}
24 |
25 | enum ras.messages.v1.EndpointMessageType {
26 | GET_CLUSTERS_REQUEST = 11
27 | }
28 | enum ras.protocol.v1.EndpointDataType {
29 | VOID_MESSAGE = 0
30 | MESSAGE = 1
31 | EXCEPTION = 255
32 | }
33 |
34 | class ras.protocol.v1.EndpointDataMessage {
35 | type: ras.messages.v1.EndpointMessageType
36 | data: BYTES
37 | }
38 |
39 | enum ras.protocol.v1.PacketTypes {
40 | ...
41 | PACKET_TYPE_ENDPOINT_MESSAGE = 10
42 | ...
43 | }
44 |
45 | ' GetClustersRequest *-- EndpointMessageType::GET_CLUSTERS_REQUEST
46 | ras.protocol.v1.EndpointDataMessage::type *-- ras.messages.v1.EndpointMessageType::GET_CLUSTERS_REQUEST
47 | ras.protocol.v1.EndpointDataMessage::data <-- ras.messages.v1.GetClustersRequest : encode
48 | ras.protocol.v1.Packet::type *-- ras.protocol.v1.PacketTypes::PACKET_TYPE_ENDPOINT_MESSAGE
49 | ras.protocol.v1.EndpointMessage::data *-- ras.protocol.v1.EndpointDataMessage
50 | ras.protocol.v1.EndpointMessage::type *-- ras.protocol.v1.EndpointDataType::MESSAGE
51 | ras.protocol.v1.Packet::data <-- ras.protocol.v1.EndpointMessage : Encode
52 |
53 |
54 | @enduml
--------------------------------------------------------------------------------
/third_party/encodingapis/ras/encoding/ras.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package ras.encoding;
4 |
5 | import "google/protobuf/descriptor.proto";
6 |
7 |
8 | option go_package = "github.com/v8platform/protoc-gen-go-ras/plugin/ras/encoding";
9 |
10 | extend google.protobuf.FieldOptions {
11 | EncodingFieldOptions field = 475223888;
12 | }
13 |
14 | extend google.protobuf.OneofOptions {
15 | EncodingFieldOptions oneof_field = 475223888;
16 | }
17 |
18 | extend google.protobuf.MessageOptions {
19 | EncodingMessageOptions options = 475223889;
20 | ClientMessageOptions client_options = 475223890;
21 | }
22 |
23 | message ClientMessageOptions {
24 | bool impl = 1; // Указания на интерфейс
25 | }
26 |
27 | message EncodingMessageOptions {
28 | bool generate_empty = 1;
29 | bool generate_packet_helpers = 2;
30 | bool generate_endpoint_message_helpers = 3;
31 | bool generate_message_helpers = 4;
32 | oneof type {
33 | string packet_type = 5;
34 | string endpoint_data_type = 6;
35 | string message_type = 7;
36 | }
37 | bool generate_error_fn = 8;
38 | bool generate_endpoint_helpers = 9;
39 | bool generate_io_write_to = 10;
40 | bool is_negotiate = 11;
41 | }
42 |
43 | message EncodingFieldOptions {
44 | optional string encoder = 1;
45 | optional int32 order = 2;
46 | optional int32 version = 3;
47 | optional int32 type_field = 7;
48 | string type_url = 8;
49 | bool ignore = 9;
50 | optional int32 size_field = 10;
51 |
52 | }
53 |
54 |
55 | extend google.protobuf.EnumOptions {
56 | // Название опции в message
57 | string message_option = 475223891;
58 | }
59 |
60 | extend google.protobuf.EnumValueOptions {
61 | string type_url = 475223891;
62 | }
--------------------------------------------------------------------------------
/third_party/googleapis/google/type/month.proto:
--------------------------------------------------------------------------------
1 | // Copyright 2021 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | syntax = "proto3";
16 |
17 | package google.type;
18 |
19 | option go_package = "google.golang.org/genproto/googleapis/type/month;month";
20 | option java_multiple_files = true;
21 | option java_outer_classname = "MonthProto";
22 | option java_package = "com.google.type";
23 | option objc_class_prefix = "GTP";
24 |
25 | // Represents a month in the Gregorian calendar.
26 | enum Month {
27 | // The unspecified month.
28 | MONTH_UNSPECIFIED = 0;
29 |
30 | // The month of January.
31 | JANUARY = 1;
32 |
33 | // The month of February.
34 | FEBRUARY = 2;
35 |
36 | // The month of March.
37 | MARCH = 3;
38 |
39 | // The month of April.
40 | APRIL = 4;
41 |
42 | // The month of May.
43 | MAY = 5;
44 |
45 | // The month of June.
46 | JUNE = 6;
47 |
48 | // The month of July.
49 | JULY = 7;
50 |
51 | // The month of August.
52 | AUGUST = 8;
53 |
54 | // The month of September.
55 | SEPTEMBER = 9;
56 |
57 | // The month of October.
58 | OCTOBER = 10;
59 |
60 | // The month of November.
61 | NOVEMBER = 11;
62 |
63 | // The month of December.
64 | DECEMBER = 12;
65 | }
66 |
--------------------------------------------------------------------------------
/third_party/googleapis/google/type/money.proto:
--------------------------------------------------------------------------------
1 | // Copyright 2021 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | syntax = "proto3";
16 |
17 | package google.type;
18 |
19 | option cc_enable_arenas = true;
20 | option go_package = "google.golang.org/genproto/googleapis/type/money;money";
21 | option java_multiple_files = true;
22 | option java_outer_classname = "MoneyProto";
23 | option java_package = "com.google.type";
24 | option objc_class_prefix = "GTP";
25 |
26 | // Represents an amount of money with its currency type.
27 | message Money {
28 | // The three-letter currency code defined in ISO 4217.
29 | string currency_code = 1;
30 |
31 | // The whole units of the amount.
32 | // For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
33 | int64 units = 2;
34 |
35 | // Number of nano (10^-9) units of the amount.
36 | // The value must be between -999,999,999 and +999,999,999 inclusive.
37 | // If `units` is positive, `nanos` must be positive or zero.
38 | // If `units` is zero, `nanos` can be positive, zero, or negative.
39 | // If `units` is negative, `nanos` must be negative or zero.
40 | // For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
41 | int32 nanos = 3;
42 | }
43 |
--------------------------------------------------------------------------------
/rasapis/ras/protocol/v1/types.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package ras.protocol.v1;
4 |
5 | import "ras/encoding/ras.proto";
6 |
7 | option csharp_namespace = "ras.protocol.v1";
8 | option go_package = "github.com/v8platform/protos/gen/ras/protocol/v1;protocolv1";
9 |
10 | enum EndpointDataType {
11 |
12 | ENDPOINT_DATA_TYPE_VOID_MESSAGE = 0 [(ras.encoding.type_url) = "ras.protocol.v1.EndpointVoidDataMessage"];
13 | ENDPOINT_DATA_TYPE_MESSAGE = 1 [(ras.encoding.type_url) = "ras.protocol.v1.EndpointDataMessage"];
14 | ENDPOINT_DATA_TYPE_EXCEPTION = 255 [(ras.encoding.type_url) = "ras.protocol.v1.EndpointFailureMessage"];
15 | }
16 |
17 | enum PacketType {
18 | PACKET_TYPE_NEGOTIATE = 0 [(ras.encoding.type_url) = "ras.protocol.v1.NegotiateMessage"];
19 | PACKET_TYPE_CONNECT = 1 [(ras.encoding.type_url) = "ras.protocol.v1.ConnectMessage"];
20 | PACKET_TYPE_CONNECT_ACK = 2 [(ras.encoding.type_url) = "ras.protocol.v1.ConnectMessageAck"];
21 | PACKET_TYPE_DISCONNECT = 4 [(ras.encoding.type_url) = "ras.protocol.v1.DisconnectMessage"];
22 | reserved 3, 5 to 10;
23 | reserved "PACKET_TYPE_START_TLS", "PACKET_TYPE_SASL_NEGOTIATE", "PACKET_TYPE_SASL_AUTH", "PACKET_TYPE_SASL_CHALLENGE";
24 | reserved "PACKET_TYPE_SASL_SUCCESS", "PACKET_TYPE_SASL_FAILURE", "PACKET_TYPE_SASL_ABORT";
25 | PACKET_TYPE_ENDPOINT_OPEN = 11 [(ras.encoding.type_url) = "ras.protocol.v1.EndpointOpen"];
26 | PACKET_TYPE_ENDPOINT_OPEN_ACK = 12 [(ras.encoding.type_url) = "ras.protocol.v1.EndpointOpenAck"];
27 | PACKET_TYPE_ENDPOINT_CLOSE = 13 [(ras.encoding.type_url) = "ras.protocol.v1.EndpointOClose"];
28 | PACKET_TYPE_ENDPOINT_MESSAGE = 14 [(ras.encoding.type_url) = "ras.protocol.v1.EndpointMessage"];
29 | PACKET_TYPE_ENDPOINT_FAILURE = 15 [(ras.encoding.type_url) = "ras.protocol.v1.EndpointFailure"];
30 | PACKET_TYPE_KEEP_ALIVE = 16;
31 | }
32 |
--------------------------------------------------------------------------------
/serializeapis/v8platform/serialize/v1/servers.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package v8platform.serialize.v1;
4 |
5 | import "google/protobuf/timestamp.proto";
6 | import "ras/encoding/ras.proto";
7 | import "v8platform/serialize/v1/licanses.proto";
8 |
9 |
10 | option go_package = "github.com/v8platform/protos/gen/v8platform/serialize/v1;serializev1";
11 |
12 | message ServerInfo {
13 |
14 | string uuid = 1 [(ras.encoding.field) = {encoder: "uuid", order: 1}];
15 | string agent_host = 2 [(ras.encoding.field).order = 2];
16 | int32 agent_port = 3 [(ras.encoding.field) = {order: 3, encoder: "short"}];
17 | string name = 4 [(ras.encoding.field).order = 4];
18 | bool main_server = 5 [(ras.encoding.field).order = 5];
19 | int64 safe_working_processes_memory_limit = 6 [(ras.encoding.field) = {encoder: "long", order: 6}];
20 | int64 safe_call_memory_limit = 7 [(ras.encoding.field).order = 7];
21 | int32 infobases_limit = 8 [(ras.encoding.field).order = 8];
22 | int64 memory_limit = 9 [(ras.encoding.field).order = 9];
23 |
24 | int32 connections_limit = 10 [(ras.encoding.field).order = 10];
25 | int32 cluster_port = 11 [(ras.encoding.field) = {order: 11, encoder: "short"}];
26 | bool dedicate_managers = 12 [(ras.encoding.field).order = 12];
27 | repeated PortRange port_ranges = 13 [(ras.encoding.field).order = 13];
28 |
29 | int64 critical_total_memory = 14 [(ras.encoding.field) = {version: 8, order: 14}];
30 | int64 temporary_allowed_total_memory = 15 [(ras.encoding.field) = {version: 8, order: 15}];
31 | int64 temporary_allowed_total_memory_time_limit = 16 [(ras.encoding.field) = {version: 8, order: 16}];
32 |
33 | }
34 |
35 | message PortRange {
36 |
37 | int32 high = 1 [(ras.encoding.field) = {encoder: "short", order: 1}];
38 | int32 low = 2 [(ras.encoding.field) = {encoder: "short", order: 2}];
39 |
40 | }
--------------------------------------------------------------------------------
/third_party/googleapis/google/type/timeofday.proto:
--------------------------------------------------------------------------------
1 | // Copyright 2021 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | syntax = "proto3";
16 |
17 | package google.type;
18 |
19 | option cc_enable_arenas = true;
20 | option go_package = "google.golang.org/genproto/googleapis/type/timeofday;timeofday";
21 | option java_multiple_files = true;
22 | option java_outer_classname = "TimeOfDayProto";
23 | option java_package = "com.google.type";
24 | option objc_class_prefix = "GTP";
25 |
26 | // Represents a time of day. The date and time zone are either not significant
27 | // or are specified elsewhere. An API may choose to allow leap seconds. Related
28 | // types are [google.type.Date][google.type.Date] and
29 | // `google.protobuf.Timestamp`.
30 | message TimeOfDay {
31 | // Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
32 | // to allow the value "24:00:00" for scenarios like business closing time.
33 | int32 hours = 1;
34 |
35 | // Minutes of hour of day. Must be from 0 to 59.
36 | int32 minutes = 2;
37 |
38 | // Seconds of minutes of the time. Must normally be from 0 to 59. An API may
39 | // allow the value 60 if it allows leap-seconds.
40 | int32 seconds = 3;
41 |
42 | // Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
43 | int32 nanos = 4;
44 | }
45 |
--------------------------------------------------------------------------------
/third_party/googleapis/google/type/interval.proto:
--------------------------------------------------------------------------------
1 | // Copyright 2021 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | syntax = "proto3";
16 |
17 | package google.type;
18 |
19 | import "google/protobuf/timestamp.proto";
20 |
21 | option cc_enable_arenas = true;
22 | option go_package = "google.golang.org/genproto/googleapis/type/interval;interval";
23 | option java_multiple_files = true;
24 | option java_outer_classname = "IntervalProto";
25 | option java_package = "com.google.type";
26 | option objc_class_prefix = "GTP";
27 |
28 | // Represents a time interval, encoded as a Timestamp start (inclusive) and a
29 | // Timestamp end (exclusive).
30 | //
31 | // The start must be less than or equal to the end.
32 | // When the start equals the end, the interval is empty (matches no time).
33 | // When both start and end are unspecified, the interval matches any time.
34 | message Interval {
35 | // Optional. Inclusive start of the interval.
36 | //
37 | // If specified, a Timestamp matching this interval will have to be the same
38 | // or after the start.
39 | google.protobuf.Timestamp start_time = 1;
40 |
41 | // Optional. Exclusive end of the interval.
42 | //
43 | // If specified, a Timestamp matching this interval will have to be before the
44 | // end.
45 | google.protobuf.Timestamp end_time = 2;
46 | }
47 |
--------------------------------------------------------------------------------
/example/ras-client/simpleClient/client.go:
--------------------------------------------------------------------------------
1 | package simpleClient
2 |
3 | //
4 | // var defaultVersion = "10.0"
5 | //
6 | // type Client struct {
7 | // host string
8 | // client clientv1.ClientServiceImpl
9 | // version string
10 | // }
11 | //
12 | // func NewClient(host string) *Client {
13 | //
14 | // return &Client{
15 | // host: host,
16 | // version: defaultVersion,
17 | // }
18 | //
19 | // }
20 | //
21 | // func (c *Client) Connect(ctx context.Context) (err error) {
22 | //
23 | // c.client = clientv1.NewClientService(c.host)
24 | // client := c.client
25 | //
26 | // _, err = client.Negotiate(protocolv1.NewNegotiateMessage())
27 | // if err != nil {
28 | // return err
29 | // }
30 | //
31 | // _, err = client.Connect(&protocolv1.ConnectMessage{})
32 | // if err != nil {
33 | // return err
34 | // }
35 | //
36 | // return nil
37 | // }
38 | //
39 | // func (c *Client) Open(version string) (endpoint clientv1.EndpointServiceImpl, err error) {
40 | //
41 | // EndpointOpenAck, err := c.client.EndpointOpen(&protocolv1.EndpointOpen{
42 | // Service: "v8.service.Admin.Cluster",
43 | // Version: version,
44 | // })
45 | //
46 | // if err != nil {
47 | // if version := c.client.DetectSupportedVersion(err); len(version) == 0 {
48 | // return nil, err
49 | // }
50 | // if EndpointOpenAck, err = c.client.EndpointOpen(&protocolv1.EndpointOpen{
51 | // Service: "v8.service.Admin.Cluster",
52 | // Version: version,
53 | // }); err != nil {
54 | // return nil, err
55 | // }
56 | // }
57 | //
58 | // end, err := c.client.NewEndpoint(EndpointOpenAck)
59 | // if err != nil {
60 | // return nil, err
61 | // }
62 | //
63 | // return clientv1.NewEndpointService(c.client, end), nil
64 | // }
65 | //
66 | // func (c *Client) Close() error {
67 | // _, err := c.client.Disconnect(&protocolv1.DisconnectMessage{})
68 | // if err != nil {
69 | // return err
70 | // }
71 | //
72 | // return nil
73 | // }
74 |
--------------------------------------------------------------------------------
/serializeapis/v8platform/serialize/v1/processes.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package v8platform.serialize.v1;
4 |
5 | import "google/protobuf/timestamp.proto";
6 | import "ras/encoding/ras.proto";
7 | import "v8platform/serialize/v1/licanses.proto";
8 |
9 |
10 | option go_package = "github.com/v8platform/protos/gen/v8platform/serialize/v1;serializev1";
11 |
12 |
13 | message ProcessInfo {
14 |
15 | string uuid = 1 [(ras.encoding.field) = {encoder: "uuid", order: 1}];
16 | double avg_back_call_time = 2 [(ras.encoding.field) = {order: 2}];
17 | double avg_call_time = 3 [(ras.encoding.field) = {order: 3}];
18 | double avg_db_call_time = 4 [(ras.encoding.field) = {order: 4}];
19 | double avg_lock_call_time = 5 [(ras.encoding.field) = {order: 5}];
20 | double avg_server_call_time = 6 [(ras.encoding.field) = {order: 6}];
21 | double avg_threads = 7 [(ras.encoding.field) = {order: 7}];
22 | int32 capacity = 8 [(ras.encoding.field) = {order: 8}];
23 | int32 connections = 9 [(ras.encoding.field) = {order: 9}];
24 | string host = 10 [(ras.encoding.field) = {order: 10}];
25 | bool enable = 11 [(ras.encoding.field) = {order: 11}];
26 | repeated LicenseInfo licenses = 12 [(ras.encoding.field) = {order: 12}];
27 | int32 port = 13 [(ras.encoding.field) = {encoder: "short", order: 13}];
28 | int32 memory_excess_time = 14 [(ras.encoding.field) = {order: 14}];
29 | int32 memory_size = 15 [(ras.encoding.field) = {order: 15}];
30 | string pid = 16 [(ras.encoding.field) = {order: 16}];
31 | bool running = 17 [(ras.encoding.field) = {encoder: "int",order: 17}];
32 | int32 selection_size = 18 [(ras.encoding.field) = {order: 18}];
33 | google.protobuf.Timestamp started_at = 19 [(ras.encoding.field) = {encoder: "time", order: 18}];
34 | bool use = 20 [(ras.encoding.field) = {encoder: "int", order: 20}];
35 | int32 available_perfomance = 21 [(ras.encoding.field) = {order: 21}];
36 | bool reverse = 22 [(ras.encoding.field) = {version: 9, order: 22}];
37 |
38 | }
--------------------------------------------------------------------------------
/third_party/openapiv2/protoc-gen-openapiv2/options/annotations.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package grpc.gateway.protoc_gen_openapiv2.options;
4 |
5 | option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options";
6 |
7 | import "google/protobuf/descriptor.proto";
8 | import "protoc-gen-openapiv2/options/openapiv2.proto";
9 |
10 | extend google.protobuf.FileOptions {
11 | // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
12 | //
13 | // All IDs are the same, as assigned. It is okay that they are the same, as they extend
14 | // different descriptor messages.
15 | Swagger openapiv2_swagger = 1042;
16 | }
17 | extend google.protobuf.MethodOptions {
18 | // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
19 | //
20 | // All IDs are the same, as assigned. It is okay that they are the same, as they extend
21 | // different descriptor messages.
22 | Operation openapiv2_operation = 1042;
23 | }
24 | extend google.protobuf.MessageOptions {
25 | // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
26 | //
27 | // All IDs are the same, as assigned. It is okay that they are the same, as they extend
28 | // different descriptor messages.
29 | Schema openapiv2_schema = 1042;
30 | }
31 | extend google.protobuf.ServiceOptions {
32 | // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
33 | //
34 | // All IDs are the same, as assigned. It is okay that they are the same, as they extend
35 | // different descriptor messages.
36 | Tag openapiv2_tag = 1042;
37 | }
38 | extend google.protobuf.FieldOptions {
39 | // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
40 | //
41 | // All IDs are the same, as assigned. It is okay that they are the same, as they extend
42 | // different descriptor messages.
43 | JSONSchema openapiv2_field = 1042;
44 | }
45 |
--------------------------------------------------------------------------------
/third_party/googleapis/google/type/calendar_period.proto:
--------------------------------------------------------------------------------
1 | // Copyright 2021 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | syntax = "proto3";
16 |
17 | package google.type;
18 |
19 | option go_package = "google.golang.org/genproto/googleapis/type/calendarperiod;calendarperiod";
20 | option java_multiple_files = true;
21 | option java_outer_classname = "CalendarPeriodProto";
22 | option java_package = "com.google.type";
23 | option objc_class_prefix = "GTP";
24 |
25 | // A `CalendarPeriod` represents the abstract concept of a time period that has
26 | // a canonical start. Grammatically, "the start of the current
27 | // `CalendarPeriod`." All calendar times begin at midnight UTC.
28 | enum CalendarPeriod {
29 | // Undefined period, raises an error.
30 | CALENDAR_PERIOD_UNSPECIFIED = 0;
31 |
32 | // A day.
33 | DAY = 1;
34 |
35 | // A week. Weeks begin on Monday, following
36 | // [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date).
37 | WEEK = 2;
38 |
39 | // A fortnight. The first calendar fortnight of the year begins at the start
40 | // of week 1 according to
41 | // [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date).
42 | FORTNIGHT = 3;
43 |
44 | // A month.
45 | MONTH = 4;
46 |
47 | // A quarter. Quarters start on dates 1-Jan, 1-Apr, 1-Jul, and 1-Oct of each
48 | // year.
49 | QUARTER = 5;
50 |
51 | // A half-year. Half-years start on dates 1-Jan and 1-Jul.
52 | HALF = 6;
53 |
54 | // A year.
55 | YEAR = 7;
56 | }
57 |
--------------------------------------------------------------------------------
/gen/v8platform/serialize/v1/services_ras.pb.go:
--------------------------------------------------------------------------------
1 | // Code generated by protoc-gen-go-ras. DO NOT EDIT.
2 |
3 | // This is a compile-time assertion to ensure that this generated file
4 | // is compatible with the v8platform/protoc-gen-go-ras ras it is being compiled against.
5 |
6 | package serializev1
7 |
8 | import (
9 | codec256 "github.com/v8platform/encoder/ras/codec256"
10 | io "io"
11 | )
12 |
13 | func (x *ServiceInfo) Parse(reader io.Reader, version int32) error {
14 | if x == nil {
15 | return nil
16 | }
17 | // decode x.Name opts: order:1
18 | if err := codec256.ParseString(reader, &x.Name); err != nil {
19 | return err
20 | }
21 | // decode x.Descr opts: order:2
22 | if err := codec256.ParseString(reader, &x.Descr); err != nil {
23 | return err
24 | }
25 | // decode x.MainOnly opts: order:3
26 | if err := codec256.ParseInt(reader, &x.MainOnly); err != nil {
27 | return err
28 | }
29 | // decode x.Managers opts: encoder:"uuid" order:4
30 | var size_Managers int
31 | if err := codec256.ParseSize(reader, &size_Managers); err != nil {
32 | return err
33 | }
34 | for i := 0; i < size_Managers; i++ {
35 | var val string
36 | if err := codec256.ParseUUID(reader, &val); err != nil {
37 | return err
38 | }
39 | x.Managers = append(x.Managers, val)
40 | }
41 | return nil
42 | }
43 | func (x *ServiceInfo) Formatter(writer io.Writer, version int32) error {
44 | if x == nil {
45 | return nil
46 | }
47 | // decode x.Name opts: order:1
48 | if err := codec256.FormatString(writer, x.Name); err != nil {
49 | return err
50 | }
51 | // decode x.Descr opts: order:2
52 | if err := codec256.FormatString(writer, x.Descr); err != nil {
53 | return err
54 | }
55 | // decode x.MainOnly opts: order:3
56 | if err := codec256.FormatInt(writer, x.MainOnly); err != nil {
57 | return err
58 | }
59 | // decode x.Managers opts: encoder:"uuid" order:4
60 | if err := codec256.FormatSize(writer, len(x.Managers)); err != nil {
61 | return err
62 | }
63 | for i := 0; i < len(x.Managers); i++ {
64 | if err := codec256.FormatUuid(writer, x.Managers[i]); err != nil {
65 | return err
66 | }
67 | }
68 | return nil
69 | }
70 |
--------------------------------------------------------------------------------
/third_party/googleapis/google/type/date.proto:
--------------------------------------------------------------------------------
1 | // Copyright 2021 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | syntax = "proto3";
16 |
17 | package google.type;
18 |
19 | option cc_enable_arenas = true;
20 | option go_package = "google.golang.org/genproto/googleapis/type/date;date";
21 | option java_multiple_files = true;
22 | option java_outer_classname = "DateProto";
23 | option java_package = "com.google.type";
24 | option objc_class_prefix = "GTP";
25 |
26 | // Represents a whole or partial calendar date, such as a birthday. The time of
27 | // day and time zone are either specified elsewhere or are insignificant. The
28 | // date is relative to the Gregorian Calendar. This can represent one of the
29 | // following:
30 | //
31 | // * A full date, with non-zero year, month, and day values
32 | // * A month and day value, with a zero year, such as an anniversary
33 | // * A year on its own, with zero month and day values
34 | // * A year and month value, with a zero day, such as a credit card expiration
35 | // date
36 | //
37 | // Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and
38 | // `google.protobuf.Timestamp`.
39 | message Date {
40 | // Year of the date. Must be from 1 to 9999, or 0 to specify a date without
41 | // a year.
42 | int32 year = 1;
43 |
44 | // Month of a year. Must be from 1 to 12, or 0 to specify a year without a
45 | // month and day.
46 | int32 month = 2;
47 |
48 | // Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
49 | // to specify a year by itself or a year and month where the day isn't
50 | // significant.
51 | int32 day = 3;
52 | }
53 |
--------------------------------------------------------------------------------
/use-case-ras=proxy.puml:
--------------------------------------------------------------------------------
1 | @startuml
2 | 'https://plantuml.com/sequence-diagram
3 |
4 | participant "Клиент http" as clientH #gray
5 | participant "Прокси RAS" as proxy
6 | participant "Служба RAS" as ras #99FF99
7 |
8 | clientH -> proxy: ras.api.v1.GetClustersRequest
9 | activate clientH
10 | proxy -> proxy: init connection
11 |
12 | activate proxy #DarkSalmon
13 | proxy -> ras: ras.protocol.v1.NegotiateMessage
14 | activate ras
15 | proxy -> ras: ras.protocol.v1.ConnectMessage
16 |
17 | deactivate proxy #DarkSalmon
18 | |||
19 | proxy -> ras: ras.protocol.v1.EndpointOpen
20 | activate proxy #DarkSalmon
21 | activate ras #Lightblue
22 | alt #Lightyellow Successful
23 | ras -> proxy: ras.protocol.v1.EndpointOpenAck
24 | else #Pink Failure
25 | ras -> proxy: ras.protocol.v1.EndpointFailure
26 | proxy -> clientH: HTTP CODE 505
27 | end
28 |
29 | deactivate proxy
30 | |||
31 | proxy -> ras: ras.messages.v1.AuthenticateAgentRequest
32 | activate proxy #Lightyellow
33 | proxy -> ras: ras.messages.v1.GetClustersRequest
34 |
35 | alt #Lightyellow Successful
36 | ras -> proxy: ras.messages.v1.GetClustersResponse
37 | else #Pink Failure
38 | ras -> proxy: ras.protocol.v1.EndpointFailure
39 | end
40 | |||
41 |
42 | alt #Lightyellow Successful
43 | proxy -> clientH: ras.api.v1.GetClustersResponse
44 | else #Pink Failure
45 | proxy -> clientH: CODE 505
46 | end
47 |
48 | deactivate proxy
49 | deactivate clientH
50 |
51 | |||
52 | clientH -> proxy: ras.api.v1.GetCluster
53 | activate clientH
54 | proxy -> ras: ras.messages.v1.AuthenticateAgentRequest
55 | activate proxy
56 | proxy -> ras: ras.messages.v1.ClusterAuthenticateRequest
57 | proxy -> ras: ras.messages.v1.GetClusterInfoRequest
58 | alt #Lightyellow Successful
59 | ras -> proxy: ras.messages.v1.GetClusterInfoResponse
60 | else #Pink Failure
61 | ras -> proxy: ras.protocol.v1.EndpointFailure
62 | end
63 |
64 | alt #Lightyellow Successful
65 | proxy -> clientH: v8platform.serialize.v1.ClusterInfo
66 | else #Pink Failure
67 | proxy -> clientH: CODE 505
68 | end
69 | deactivate proxy
70 |
71 | deactivate clientH
72 | ... Timeout ...
73 |
74 | proxy -> ras: ras.protocol.v1.EndpointClose
75 | deactivate ras
76 | proxy -> ras: ras.protocol.v1.DisconnectMessage
77 | deactivate ras
78 | @enduml
--------------------------------------------------------------------------------
/gen/v8platform/serialize/v1/managers_ras.pb.go:
--------------------------------------------------------------------------------
1 | // Code generated by protoc-gen-go-ras. DO NOT EDIT.
2 |
3 | // This is a compile-time assertion to ensure that this generated file
4 | // is compatible with the v8platform/protoc-gen-go-ras ras it is being compiled against.
5 |
6 | package serializev1
7 |
8 | import (
9 | codec256 "github.com/v8platform/encoder/ras/codec256"
10 | io "io"
11 | )
12 |
13 | func (x *ManagerInfo) Parse(reader io.Reader, version int32) error {
14 | if x == nil {
15 | return nil
16 | }
17 | // decode x.Uuid opts: encoder:"uuid" order:1
18 | if err := codec256.ParseUUID(reader, &x.Uuid); err != nil {
19 | return err
20 | }
21 | // decode x.Descr opts: order:2
22 | if err := codec256.ParseString(reader, &x.Descr); err != nil {
23 | return err
24 | }
25 | // decode x.Host opts: order:3
26 | if err := codec256.ParseString(reader, &x.Host); err != nil {
27 | return err
28 | }
29 | // decode x.MainManager opts: order:4
30 | if err := codec256.ParseInt(reader, &x.MainManager); err != nil {
31 | return err
32 | }
33 | // decode x.Port opts: encoder:"short" order:5
34 | if err := codec256.ParseShort(reader, &x.Port); err != nil {
35 | return err
36 | }
37 | // decode x.Pid opts: order:6
38 | if err := codec256.ParseString(reader, &x.Pid); err != nil {
39 | return err
40 | }
41 | return nil
42 | }
43 | func (x *ManagerInfo) Formatter(writer io.Writer, version int32) error {
44 | if x == nil {
45 | return nil
46 | }
47 | // decode x.Uuid opts: encoder:"uuid" order:1
48 | if err := codec256.FormatUuid(writer, x.Uuid); err != nil {
49 | return err
50 | }
51 | // decode x.Descr opts: order:2
52 | if err := codec256.FormatString(writer, x.Descr); err != nil {
53 | return err
54 | }
55 | // decode x.Host opts: order:3
56 | if err := codec256.FormatString(writer, x.Host); err != nil {
57 | return err
58 | }
59 | // decode x.MainManager opts: order:4
60 | if err := codec256.FormatInt(writer, x.MainManager); err != nil {
61 | return err
62 | }
63 | // decode x.Port opts: encoder:"short" order:5
64 | if err := codec256.FormatShort(writer, x.Port); err != nil {
65 | return err
66 | }
67 | // decode x.Pid opts: order:6
68 | if err := codec256.FormatString(writer, x.Pid); err != nil {
69 | return err
70 | }
71 | return nil
72 | }
73 |
--------------------------------------------------------------------------------
/gen/v8platform/serialize/v1/locks_ras.pb.go:
--------------------------------------------------------------------------------
1 | // Code generated by protoc-gen-go-ras. DO NOT EDIT.
2 |
3 | // This is a compile-time assertion to ensure that this generated file
4 | // is compatible with the v8platform/protoc-gen-go-ras ras it is being compiled against.
5 |
6 | package serializev1
7 |
8 | import (
9 | codec256 "github.com/v8platform/encoder/ras/codec256"
10 | timestamppb "google.golang.org/protobuf/types/known/timestamppb"
11 | io "io"
12 | )
13 |
14 | func (x *LockInfo) Parse(reader io.Reader, version int32) error {
15 | if x == nil {
16 | return nil
17 | }
18 | // decode x.ConnectionId opts: encoder:"uuid" order:1
19 | if err := codec256.ParseUUID(reader, &x.ConnectionId); err != nil {
20 | return err
21 | }
22 | // decode x.Description opts: order:2
23 | if err := codec256.ParseString(reader, &x.Description); err != nil {
24 | return err
25 | }
26 | // decode x.LockedAt opts: encoder:"time" order:3
27 | x.LockedAt = ×tamppb.Timestamp{}
28 | if err := codec256.ParseTime(reader, x.LockedAt); err != nil {
29 | return err
30 | }
31 | // decode x.ObjectId opts: encoder:"uuid" order:4
32 | if err := codec256.ParseUUID(reader, &x.ObjectId); err != nil {
33 | return err
34 | }
35 | // decode x.SessionId opts: encoder:"uuid" order:5
36 | if err := codec256.ParseUUID(reader, &x.SessionId); err != nil {
37 | return err
38 | }
39 | return nil
40 | }
41 | func (x *LockInfo) Formatter(writer io.Writer, version int32) error {
42 | if x == nil {
43 | return nil
44 | }
45 | // decode x.ConnectionId opts: encoder:"uuid" order:1
46 | if err := codec256.FormatUuid(writer, x.ConnectionId); err != nil {
47 | return err
48 | }
49 | // decode x.Description opts: order:2
50 | if err := codec256.FormatString(writer, x.Description); err != nil {
51 | return err
52 | }
53 | // decode x.LockedAt opts: encoder:"time" order:3
54 | // TODO check nil
55 | if err := codec256.FormatTime(writer, x.GetLockedAt().AsTime()); err != nil {
56 | return err
57 | }
58 | // decode x.ObjectId opts: encoder:"uuid" order:4
59 | if err := codec256.FormatUuid(writer, x.ObjectId); err != nil {
60 | return err
61 | }
62 | // decode x.SessionId opts: encoder:"uuid" order:5
63 | if err := codec256.FormatUuid(writer, x.SessionId); err != nil {
64 | return err
65 | }
66 | return nil
67 | }
68 |
--------------------------------------------------------------------------------
/gen/ras/messages/v1/services_messages_ras.pb.go:
--------------------------------------------------------------------------------
1 | // Code generated by protoc-gen-go-ras. DO NOT EDIT.
2 |
3 | // This is a compile-time assertion to ensure that this generated file
4 | // is compatible with the v8platform/protoc-gen-go-ras ras it is being compiled against.
5 |
6 | package messagesv1
7 |
8 | import (
9 | codec256 "github.com/v8platform/encoder/ras/codec256"
10 | v1 "github.com/v8platform/protos/gen/v8platform/serialize/v1"
11 | io "io"
12 | )
13 |
14 | func (x *GetClusterServicesRequest) GetMessageType() MessageType {
15 | return MessageType_GET_CLUSTER_SERVICES_REQUEST
16 | }
17 |
18 | func (x *GetClusterServicesRequest) Parse(reader io.Reader, version int32) error {
19 | if x == nil {
20 | return nil
21 | }
22 | // decode x.ClusterId opts: encoder:"uuid" order:1
23 | if err := codec256.ParseUUID(reader, &x.ClusterId); err != nil {
24 | return err
25 | }
26 | return nil
27 | }
28 | func (x *GetClusterServicesRequest) Formatter(writer io.Writer, version int32) error {
29 | if x == nil {
30 | return nil
31 | }
32 | // decode x.ClusterId opts: encoder:"uuid" order:1
33 | if err := codec256.FormatUuid(writer, x.ClusterId); err != nil {
34 | return err
35 | }
36 | return nil
37 | }
38 | func (x *GetClusterServicesResponse) GetMessageType() MessageType {
39 | return MessageType_GET_CLUSTER_SERVICES_RESPONSE
40 | }
41 |
42 | func (x *GetClusterServicesResponse) Parse(reader io.Reader, version int32) error {
43 | if x == nil {
44 | return nil
45 | }
46 | // decode x.Services opts: order:1
47 | var size_Services int
48 | if err := codec256.ParseSize(reader, &size_Services); err != nil {
49 | return err
50 | }
51 | for i := 0; i < size_Services; i++ {
52 | val := &v1.ServiceInfo{}
53 | if err := val.Parse(reader, version); err != nil {
54 | return err
55 | }
56 |
57 | x.Services = append(x.Services, val)
58 | }
59 | return nil
60 | }
61 | func (x *GetClusterServicesResponse) Formatter(writer io.Writer, version int32) error {
62 | if x == nil {
63 | return nil
64 | }
65 | // decode x.Services opts: order:1
66 | if err := codec256.FormatSize(writer, len(x.Services)); err != nil {
67 | return err
68 | }
69 | for i := 0; i < len(x.Services); i++ {
70 | if err := x.Services[i].Formatter(writer, version); err != nil {
71 | return err
72 | }
73 | }
74 | return nil
75 | }
76 |
--------------------------------------------------------------------------------
/gen/v8platform/serialize/v1/assignments_ras.pb.go:
--------------------------------------------------------------------------------
1 | // Code generated by protoc-gen-go-ras. DO NOT EDIT.
2 |
3 | // This is a compile-time assertion to ensure that this generated file
4 | // is compatible with the v8platform/protoc-gen-go-ras ras it is being compiled against.
5 |
6 | package serializev1
7 |
8 | import (
9 | codec256 "github.com/v8platform/encoder/ras/codec256"
10 | io "io"
11 | )
12 |
13 | func (x *AssignmentInfo) Parse(reader io.Reader, version int32) error {
14 | if x == nil {
15 | return nil
16 | }
17 | // decode x.Uuid opts: encoder:"uuid" order:1
18 | if err := codec256.ParseUUID(reader, &x.Uuid); err != nil {
19 | return err
20 | }
21 | // decode x.ObjectType opts: order:2
22 | if err := codec256.ParseString(reader, &x.ObjectType); err != nil {
23 | return err
24 | }
25 | // decode x.InfobaseName opts: order:3
26 | if err := codec256.ParseString(reader, &x.InfobaseName); err != nil {
27 | return err
28 | }
29 | // decode x.Type opts: order:4
30 | if err := codec256.ParseInt(reader, &x.Type); err != nil {
31 | return err
32 | }
33 | // decode x.ApplicationExt opts: order:5
34 | if err := codec256.ParseString(reader, &x.ApplicationExt); err != nil {
35 | return err
36 | }
37 | // decode x.Priority opts: order:6
38 | if err := codec256.ParseInt(reader, &x.Priority); err != nil {
39 | return err
40 | }
41 | return nil
42 | }
43 | func (x *AssignmentInfo) Formatter(writer io.Writer, version int32) error {
44 | if x == nil {
45 | return nil
46 | }
47 | // decode x.Uuid opts: encoder:"uuid" order:1
48 | if err := codec256.FormatUuid(writer, x.Uuid); err != nil {
49 | return err
50 | }
51 | // decode x.ObjectType opts: order:2
52 | if err := codec256.FormatString(writer, x.ObjectType); err != nil {
53 | return err
54 | }
55 | // decode x.InfobaseName opts: order:3
56 | if err := codec256.FormatString(writer, x.InfobaseName); err != nil {
57 | return err
58 | }
59 | // decode x.Type opts: order:4
60 | if err := codec256.FormatInt(writer, x.Type); err != nil {
61 | return err
62 | }
63 | // decode x.ApplicationExt opts: order:5
64 | if err := codec256.FormatString(writer, x.ApplicationExt); err != nil {
65 | return err
66 | }
67 | // decode x.Priority opts: order:6
68 | if err := codec256.FormatInt(writer, x.Priority); err != nil {
69 | return err
70 | }
71 | return nil
72 | }
73 |
--------------------------------------------------------------------------------
/serializeapis/v8platform/serialize/v1/infobases.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package v8platform.serialize.v1;
4 |
5 | import "google/protobuf/timestamp.proto";
6 |
7 | import "ras/encoding/ras.proto";
8 | option go_package = "github.com/v8platform/protos/gen/v8platform/serialize/v1;serializev1";
9 |
10 |
11 | message InfobaseInfo {
12 |
13 | // reserved for cluater_id
14 | reserved 1;
15 |
16 | string uuid = 2 [(ras.encoding.field) = {encoder: "uuid", order: 1}];
17 | int32 date_offset = 3 [(ras.encoding.field).order = 2];
18 | string dbms = 4 [(ras.encoding.field).order = 3];
19 | string db_name = 5 [(ras.encoding.field).order = 4];
20 | string db_pwd = 6 [(ras.encoding.field).order = 5];
21 | string db_server = 7 [(ras.encoding.field).order = 6];
22 | string db_user = 8 [(ras.encoding.field).order = 7];
23 | google.protobuf.Timestamp denied_from = 9 [(ras.encoding.field) = {encoder: "time", order: 8}];
24 | string denied_message = 10 [(ras.encoding.field).order = 9];
25 | string denied_parameter = 11 [(ras.encoding.field).order = 10];
26 | google.protobuf.Timestamp denied_to = 12 [(ras.encoding.field) = {encoder: "time", order: 11}];
27 | string descr = 13 [(ras.encoding.field).order = 12];
28 | string locale = 14 [(ras.encoding.field).order = 13];
29 | string name = 15 [(ras.encoding.field).order = 14];
30 | string permission_code = 16 [(ras.encoding.field).order = 15];
31 | bool scheduled_jobs_deny = 17 [(ras.encoding.field).order = 16];
32 | int32 security_level = 18 [(ras.encoding.field).order = 17];
33 | bool sessions_deny = 19 [(ras.encoding.field).order = 18];
34 | int32 license_distribution = 20 [(ras.encoding.field).order = 19];
35 | string external_session_manager_connection_string = 21 [(ras.encoding.field).order = 20];
36 | bool external_session_manager_required = 22 [(ras.encoding.field).order = 21];
37 | string SecurityProfileName = 23 [(ras.encoding.field).order = 22];
38 | string SafeModeSecurityProfileName = 24 [(ras.encoding.field).order = 23];
39 | // version >=9
40 | bool ReserveWorkingProcesses = 25 [(ras.encoding.field) = {order: 24, version: 9}];
41 |
42 | }
43 |
44 | message InfobaseSummaryInfo {
45 | // all versions
46 | string uuid = 2 [(ras.encoding.field) = {encoder: "uuid", order: 1}];
47 | string descr = 3 [(ras.encoding.field).order = 2];
48 | string name = 4 [(ras.encoding.field).order = 3];
49 | }
50 |
--------------------------------------------------------------------------------
/example/grpc-server/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | //
4 | // func main() {
5 | // if err := run(); err != nil {
6 | // log.Fatal(err)
7 | // }
8 | // }
9 | //
10 | // func run() error {
11 | //
12 | // var host string
13 | // flag.StringVar(&host, "server", "localhost:1545", "Адрес сервера и порт")
14 | //
15 | // flag.Parse()
16 | //
17 | // listenOn := "127.0.0.1:8080"
18 | // listener, err := net.Listen("tcp", listenOn)
19 | // if err != nil {
20 | // return fmt.Errorf("failed to listen on %s: %w", listenOn, err)
21 | // }
22 | //
23 | // srv := &rasClusterServiceServer{Host: host, client: simpleClient.NewClient(host)}
24 | // server := grpc.NewServer()
25 | // apiv1.RegisterClustersServiceServer(server, srv)
26 | // RunGW(srv)
27 | //
28 | // log.Println("Listening on", listenOn)
29 | // if err := server.Serve(listener); err != nil {
30 | // return fmt.Errorf("failed to serve gRPC server: %w", err)
31 | // }
32 | //
33 | // return nil
34 | // }
35 | //
36 | // type rasClusterServiceServer struct {
37 | // apiv1.UnimplementedClustersServiceServer
38 | // client *simpleClient.Client
39 | //
40 | // Host string
41 | // }
42 | //
43 | // func (s rasClusterServiceServer) Clusters(ctx context.Context, req *apiv1.GetClustersRequest) (*apiv1.GetClustersResponse, error) {
44 | //
45 | // err := s.client.Connect(ctx)
46 | // if err != nil {
47 | // return nil, err
48 | // }
49 | // defer s.client.Close()
50 | //
51 | // endpointService, err := s.client.Open("10.0")
52 | // if err != nil {
53 | // return nil, err
54 | // }
55 | // endpoint := endpointService.(clientv1.EndpointServiceImpl)
56 | //
57 | // clustersService := clientv1.NewClustersService(endpoint)
58 | //
59 | // resp, err := clustersService.GetClusters(&messagesv1.GetClustersRequest{})
60 | // if err != nil {
61 | // return nil, err
62 | // }
63 | //
64 | // return &apiv1.GetClustersResponse{
65 | // Items: resp.Clusters,
66 | // }, nil
67 | // }
68 | // func (rasClusterServiceServer) GetCluster(ctx context.Context, req *apiv1.GetClusterRequest) (*serializev1.ClusterInfo, error) {
69 | // return nil, status.Errorf(codes.Unimplemented, "method GetCluster not implemented")
70 | // }
71 | // func (rasClusterServiceServer) AddCluster(ctx context.Context, req *apiv1.AddClusterRequest) (*apiv1.AddClusterResponse, error) {
72 | // return nil, status.Errorf(codes.Unimplemented, "method AddCluster not implemented")
73 | // }
74 | // func (rasClusterServiceServer) DeleteCluster(ctx context.Context, req *apiv1.DeleteClusterRequest) (*emptypb.Empty, error) {
75 | // return nil, status.Errorf(codes.Unimplemented, "method DeleteCluster not implemented")
76 | // }
77 |
--------------------------------------------------------------------------------
/rasapis/ras/messages/v1/managers_messages.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package ras.messages.v1;
4 |
5 | import "ras/encoding/ras.proto";
6 | import "v8platform/serialize/v1/managers.proto";
7 | import "protoc-gen-openapiv2/options/annotations.proto";
8 |
9 | option csharp_namespace = "ras.messages.v1";
10 | option go_package = "github.com/v8platform/protos/gen/ras/messages/v1;messagesv1";
11 |
12 | message GetClusterManagersRequest {
13 | option (ras.encoding.options).message_type = "GET_CLUSTER_MANAGERS_REQUEST";
14 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
15 | json_schema: {
16 | title: "GetClusterManagersRequest";
17 | description: "Получение списка менеджеров локального кластера";
18 | required: ["cluster_id"];
19 | };
20 | };
21 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
22 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
23 | description: "Уникальный идентификатор локального кластера"
24 | format: "uuid"
25 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
26 | }
27 | ];
28 | }
29 |
30 | message GetClusterManagersResponse {
31 | option (ras.encoding.options).message_type = "GET_CLUSTER_MANAGERS_RESPONSE";
32 | repeated v8platform.serialize.v1.ManagerInfo managers = 1 [(ras.encoding.field).order = 1];
33 | }
34 |
35 | message GetClusterManagerInfoRequest {
36 | option (ras.encoding.options).message_type = "GET_CLUSTER_MANAGER_INFO_REQUEST";
37 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
38 | json_schema: {
39 | title: "GetWorkingServerInfoRequest";
40 | description: "Получение информации о менеджере локального кластера";
41 | required: ["cluster_id", "manager_id"];
42 | };
43 | };
44 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
45 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
46 | description: "Уникальный идентификатор локального кластера"
47 | format: "uuid"
48 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
49 | }
50 | ];
51 | string manager_id = 2 [(ras.encoding.field) = {order: 2, encoder: "uuid"},
52 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
53 | description: "Уникальный идентификатор менеджера локального кластера"
54 | format: "uuid"
55 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
56 | }
57 | ];
58 | }
59 |
60 | message GetClusterManagerInfoResponse {
61 | option (ras.encoding.options).message_type = "GET_CLUSTER_MANAGER_INFO_RESPONSE";
62 | v8platform.serialize.v1.ManagerInfo info = 1 [(ras.encoding.field).order = 1];
63 | }
--------------------------------------------------------------------------------
/third_party/googleapis/google/api/httpbody.proto:
--------------------------------------------------------------------------------
1 | // Copyright 2018 Google LLC.
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 | //
15 |
16 | syntax = "proto3";
17 |
18 | package google.api;
19 |
20 | import "google/protobuf/any.proto";
21 |
22 | option cc_enable_arenas = true;
23 | option go_package = "google.golang.org/genproto/googleapis/api/httpbody;httpbody";
24 | option java_multiple_files = true;
25 | option java_outer_classname = "HttpBodyProto";
26 | option java_package = "com.google.api";
27 | option objc_class_prefix = "GAPI";
28 |
29 | // Message that represents an arbitrary HTTP body. It should only be used for
30 | // payload formats that can't be represented as JSON, such as raw binary or
31 | // an HTML page.
32 | //
33 | //
34 | // This message can be used both in streaming and non-streaming API methods in
35 | // the request as well as the response.
36 | //
37 | // It can be used as a top-level request field, which is convenient if one
38 | // wants to extract parameters from either the URL or HTTP template into the
39 | // request fields and also want access to the raw HTTP body.
40 | //
41 | // Example:
42 | //
43 | // message GetResourceRequest {
44 | // // A unique request id.
45 | // string request_id = 1;
46 | //
47 | // // The raw HTTP body is bound to this field.
48 | // google.api.HttpBody http_body = 2;
49 | // }
50 | //
51 | // service ResourceService {
52 | // rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);
53 | // rpc UpdateResource(google.api.HttpBody) returns
54 | // (google.protobuf.Empty);
55 | // }
56 | //
57 | // Example with streaming methods:
58 | //
59 | // service CaldavService {
60 | // rpc GetCalendar(stream google.api.HttpBody)
61 | // returns (stream google.api.HttpBody);
62 | // rpc UpdateCalendar(stream google.api.HttpBody)
63 | // returns (stream google.api.HttpBody);
64 | // }
65 | //
66 | // Use of this type only changes how the request and response bodies are
67 | // handled, all other features will continue to work unchanged.
68 | message HttpBody {
69 | // The HTTP Content-Type header value specifying the content type of the body.
70 | string content_type = 1;
71 |
72 | // The HTTP request/response body as raw binary.
73 | bytes data = 2;
74 |
75 | // Application specific response metadata. Must be set in the first response
76 | // for streaming APIs.
77 | repeated google.protobuf.Any extensions = 3;
78 | }
--------------------------------------------------------------------------------
/third_party/googleapis/google/type/expr.proto:
--------------------------------------------------------------------------------
1 | // Copyright 2021 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | syntax = "proto3";
16 |
17 | package google.type;
18 |
19 | option go_package = "google.golang.org/genproto/googleapis/type/expr;expr";
20 | option java_multiple_files = true;
21 | option java_outer_classname = "ExprProto";
22 | option java_package = "com.google.type";
23 | option objc_class_prefix = "GTP";
24 |
25 | // Represents a textual expression in the Common Expression Language (CEL)
26 | // syntax. CEL is a C-like expression language. The syntax and semantics of CEL
27 | // are documented at https://github.com/google/cel-spec.
28 | //
29 | // Example (Comparison):
30 | //
31 | // title: "Summary size limit"
32 | // description: "Determines if a summary is less than 100 chars"
33 | // expression: "document.summary.size() < 100"
34 | //
35 | // Example (Equality):
36 | //
37 | // title: "Requestor is owner"
38 | // description: "Determines if requestor is the document owner"
39 | // expression: "document.owner == request.auth.claims.email"
40 | //
41 | // Example (Logic):
42 | //
43 | // title: "Public documents"
44 | // description: "Determine whether the document should be publicly visible"
45 | // expression: "document.type != 'private' && document.type != 'internal'"
46 | //
47 | // Example (Data Manipulation):
48 | //
49 | // title: "Notification string"
50 | // description: "Create a notification string with a timestamp."
51 | // expression: "'New message received at ' + string(document.create_time)"
52 | //
53 | // The exact variables and functions that may be referenced within an expression
54 | // are determined by the service that evaluates it. See the service
55 | // documentation for additional information.
56 | message Expr {
57 | // Textual representation of an expression in Common Expression Language
58 | // syntax.
59 | string expression = 1;
60 |
61 | // Optional. Title for the expression, i.e. a short string describing
62 | // its purpose. This can be used e.g. in UIs which allow to enter the
63 | // expression.
64 | string title = 2;
65 |
66 | // Optional. Description of the expression. This is a longer text which
67 | // describes the expression, e.g. when hovered over it in a UI.
68 | string description = 3;
69 |
70 | // Optional. String indicating the location of the expression for error
71 | // reporting, e.g. a file name and a position in the file.
72 | string location = 4;
73 | }
74 |
--------------------------------------------------------------------------------
/gen/v8platform/serialize/v1/connections_ras.pb.go:
--------------------------------------------------------------------------------
1 | // Code generated by protoc-gen-go-ras. DO NOT EDIT.
2 |
3 | // This is a compile-time assertion to ensure that this generated file
4 | // is compatible with the v8platform/protoc-gen-go-ras ras it is being compiled against.
5 |
6 | package serializev1
7 |
8 | import (
9 | codec256 "github.com/v8platform/encoder/ras/codec256"
10 | timestamppb "google.golang.org/protobuf/types/known/timestamppb"
11 | io "io"
12 | )
13 |
14 | func (x *ConnectionInfo) Parse(reader io.Reader, version int32) error {
15 | if x == nil {
16 | return nil
17 | }
18 | // decode x.Uuid opts: encoder:"uuid" order:1
19 | if err := codec256.ParseUUID(reader, &x.Uuid); err != nil {
20 | return err
21 | }
22 | // decode x.Application opts: order:2
23 | if err := codec256.ParseString(reader, &x.Application); err != nil {
24 | return err
25 | }
26 | // decode x.BlockedByLs opts: order:3
27 | if err := codec256.ParseInt(reader, &x.BlockedByLs); err != nil {
28 | return err
29 | }
30 | // decode x.ConnectedAt opts: encoder:"time" order:4
31 | x.ConnectedAt = ×tamppb.Timestamp{}
32 | if err := codec256.ParseTime(reader, x.ConnectedAt); err != nil {
33 | return err
34 | }
35 | // decode x.Id opts: order:5
36 | if err := codec256.ParseInt(reader, &x.Id); err != nil {
37 | return err
38 | }
39 | // decode x.Host opts: order:6
40 | if err := codec256.ParseString(reader, &x.Host); err != nil {
41 | return err
42 | }
43 | // decode x.InfobaseId opts: encoder:"uuid" order:7
44 | if err := codec256.ParseUUID(reader, &x.InfobaseId); err != nil {
45 | return err
46 | }
47 | // decode x.ProcessId opts: encoder:"uuid" order:8
48 | if err := codec256.ParseUUID(reader, &x.ProcessId); err != nil {
49 | return err
50 | }
51 | // decode x.SessionId opts: order:9
52 | if err := codec256.ParseInt(reader, &x.SessionId); err != nil {
53 | return err
54 | }
55 | return nil
56 | }
57 | func (x *ConnectionInfo) Formatter(writer io.Writer, version int32) error {
58 | if x == nil {
59 | return nil
60 | }
61 | // decode x.Uuid opts: encoder:"uuid" order:1
62 | if err := codec256.FormatUuid(writer, x.Uuid); err != nil {
63 | return err
64 | }
65 | // decode x.Application opts: order:2
66 | if err := codec256.FormatString(writer, x.Application); err != nil {
67 | return err
68 | }
69 | // decode x.BlockedByLs opts: order:3
70 | if err := codec256.FormatInt(writer, x.BlockedByLs); err != nil {
71 | return err
72 | }
73 | // decode x.ConnectedAt opts: encoder:"time" order:4
74 | // TODO check nil
75 | if err := codec256.FormatTime(writer, x.GetConnectedAt().AsTime()); err != nil {
76 | return err
77 | }
78 | // decode x.Id opts: order:5
79 | if err := codec256.FormatInt(writer, x.Id); err != nil {
80 | return err
81 | }
82 | // decode x.Host opts: order:6
83 | if err := codec256.FormatString(writer, x.Host); err != nil {
84 | return err
85 | }
86 | // decode x.InfobaseId opts: encoder:"uuid" order:7
87 | if err := codec256.FormatUuid(writer, x.InfobaseId); err != nil {
88 | return err
89 | }
90 | // decode x.ProcessId opts: encoder:"uuid" order:8
91 | if err := codec256.FormatUuid(writer, x.ProcessId); err != nil {
92 | return err
93 | }
94 | // decode x.SessionId opts: order:9
95 | if err := codec256.FormatInt(writer, x.SessionId); err != nil {
96 | return err
97 | }
98 | return nil
99 | }
100 |
--------------------------------------------------------------------------------
/rasapis/ras/messages/v1/auth_messages.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package ras.messages.v1;
4 |
5 | import "ras/encoding/ras.proto";
6 | import "google/protobuf/any.proto";
7 | import "protoc-gen-openapiv2/options/annotations.proto";
8 |
9 | option csharp_namespace = "ras.messages.v1";
10 | option go_package = "github.com/v8platform/protos/gen/ras/messages/v1;messagesv1";
11 |
12 | // Renamed AuthenticateAgentRequest
13 | message ServerAuthenticateRequest {
14 | option (encoding.options).message_type = "AUTHENTICATE_AGENT_REQUEST";
15 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
16 | json_schema: {
17 | title: "ServerAuthenticateRequest";
18 | description: "Авторизация администратора на сервере 1С";
19 | };
20 | };
21 | string user = 1 [(ras.encoding.field) = {order: 1},
22 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
23 | description: "Имя администратора сервера 1С"
24 | format: "string"
25 | }
26 | ];
27 | string password = 2 [(ras.encoding.field) = {order: 2},
28 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
29 | description: "Пароль администратора сервера 1С"
30 | format: "string"
31 | }
32 | ];
33 | }
34 |
35 | message ClusterAuthenticateRequest {
36 | option (encoding.options).message_type = "AUTHENTICATE_REQUEST";
37 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
38 | json_schema: {
39 | title: "ClusterAuthenticateRequest";
40 | description: "Авторизация администратора на локальном кластере сервере 1С";
41 | };
42 | };
43 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
44 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
45 | description: "Уникальный идентификатор локального кластера"
46 | format: "uuid"
47 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
48 | }
49 | ];
50 | string user = 2 [(ras.encoding.field) = {order: 2},
51 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
52 | description: "Имя администратора кластера"
53 | format: "string"
54 | }
55 | ];
56 | string password = 3 [(ras.encoding.field) = {order: 3},
57 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
58 | description: "Пароль администратора кластера"
59 | format: "string"
60 | }
61 | ];
62 | }
63 |
64 | message AuthenticateInfobaseRequest {
65 | option (encoding.options).message_type = "ADD_AUTHENTICATION_REQUEST";
66 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
67 | json_schema: {
68 | title: "ClusterAuthenticateRequest";
69 | description: "Авторизация пользователя информационной базы";
70 | };
71 | };
72 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
73 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
74 | description: "Уникальный идентификатор локального кластера"
75 | format: "uuid"
76 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
77 | }
78 | ];
79 | string user = 2 [(ras.encoding.field) = {order: 2},
80 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
81 | description: "Имя пользователя информационной базы"
82 | format: "string"
83 | }
84 | ];
85 | string password = 3 [(ras.encoding.field) = {order: 3},
86 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
87 | description: "Пароль пользователя информационной базы"
88 | format: "string"
89 | }
90 | ];
91 | }
--------------------------------------------------------------------------------
/rasapis/ras/messages/v1/clusters_messages.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package ras.messages.v1;
4 |
5 | import "ras/encoding/ras.proto";
6 | import "v8platform/serialize/v1/clusters.proto";
7 | import "protoc-gen-openapiv2/options/annotations.proto";
8 |
9 | option csharp_namespace = "ras.messages.v1";
10 | option go_package = "github.com/v8platform/protos/gen/ras/messages/v1;messagesv1";
11 |
12 | message GetClustersRequest {
13 | option (ras.encoding.options).message_type = "GET_CLUSTERS_REQUEST";
14 | option (ras.encoding.options).generate_empty = true;
15 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
16 | json_schema: {
17 | title: "GetClustersRequest";
18 | description: "Получение списка локальных кластеров";
19 | };
20 | };
21 | }
22 |
23 | message GetClustersResponse {
24 | option (ras.encoding.options).message_type = "GET_CLUSTERS_RESPONSE";
25 | repeated v8platform.serialize.v1.ClusterInfo clusters = 1 [(ras.encoding.field) = {order: 1}];
26 | }
27 |
28 | message GetClusterInfoRequest {
29 | option (ras.encoding.options).message_type = "GET_CLUSTER_INFO_REQUEST";
30 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
31 | json_schema: {
32 | title: "GetClusterInfoRequest";
33 | description: "Получение информации о локальном кластере";
34 | required: ["cluster_id"];
35 | };
36 | };
37 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
38 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
39 | description: "Уникальный идентификатор локального кластера"
40 | format: "uuid"
41 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
42 | }
43 | ];
44 | }
45 |
46 | message GetClusterInfoResponse {
47 | option (ras.encoding.options).message_type = "GET_CLUSTER_INFO_RESPONSE";
48 | v8platform.serialize.v1.ClusterInfo info = 1 [(ras.encoding.field).order = 1];
49 | }
50 |
51 | message RegClusterRequest {
52 | option (ras.encoding.options).message_type = "REG_CLUSTER_REQUEST";
53 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
54 | json_schema: {
55 | title: "RegClusterRequest";
56 | description: "Регистрация нового локального кластера на сервере 1С";
57 | };
58 | };
59 | v8platform.serialize.v1.ClusterInfo cluster_info = 1 [(ras.encoding.field).order = 1];
60 | }
61 |
62 | message RegClusterResponse {
63 | option (ras.encoding.options).message_type = "REG_CLUSTER_RESPONSE";
64 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
65 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
66 | description: "Уникальный идентификатор локального кластера"
67 | format: "uuid"
68 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
69 | }
70 | ];
71 | }
72 |
73 | message UnregClusterRequest {
74 | option (ras.encoding.options).message_type = "UNREG_CLUSTER_REQUEST";
75 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
76 | json_schema: {
77 | title: "UnregClusterRequest";
78 | description: "Удаление регистрации локального кластера на агенте";
79 | required: ["cluster_id"];
80 | };
81 | };
82 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
83 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
84 | description: "Уникальный идентификатор локального кластера"
85 | format: "uuid"
86 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
87 | }
88 | ];
89 | }
90 |
91 |
--------------------------------------------------------------------------------
/gen/ras/protocol/v1/connect_ras.pb.go:
--------------------------------------------------------------------------------
1 | // Code generated by protoc-gen-go-ras. DO NOT EDIT.
2 |
3 | // This is a compile-time assertion to ensure that this generated file
4 | // is compatible with the v8platform/protoc-gen-go-ras ras it is being compiled against.
5 |
6 | package protocolv1
7 |
8 | import (
9 | codec256 "github.com/v8platform/encoder/ras/codec256"
10 | io "io"
11 | )
12 |
13 | func (x *NegotiateMessage) GetPacketType() PacketType {
14 | return PacketType_PACKET_TYPE_NEGOTIATE
15 | }
16 |
17 | const (
18 | Magic int32 = 475223888
19 | ProtocolVersion int32 = 256
20 | ServiceName string = "v8.service.Admin.Cluster"
21 | )
22 |
23 | func NewNegotiateMessage() *NegotiateMessage {
24 | return &NegotiateMessage{
25 | Magic: Magic,
26 | Protocol: ProtocolVersion,
27 | Version: codec256.Version(),
28 | }
29 | }
30 |
31 | func (x *NegotiateMessage) Parse(reader io.Reader, version int32) error {
32 | if x == nil {
33 | return nil
34 | }
35 | // decode x.Magic opts: encoder:"int32" order:1
36 | if err := codec256.ParseInt(reader, &x.Magic); err != nil {
37 | return err
38 | }
39 | // decode x.Protocol opts: encoder:"short" order:2
40 | if err := codec256.ParseShort(reader, &x.Protocol); err != nil {
41 | return err
42 | }
43 | // decode x.Version opts: encoder:"short" order:3
44 | if err := codec256.ParseShort(reader, &x.Version); err != nil {
45 | return err
46 | }
47 | return nil
48 | }
49 | func (x *NegotiateMessage) Formatter(writer io.Writer, version int32) error {
50 | if x == nil {
51 | return nil
52 | }
53 | // decode x.Magic opts: encoder:"int32" order:1
54 | if err := codec256.FormatInt(writer, x.Magic); err != nil {
55 | return err
56 | }
57 | // decode x.Protocol opts: encoder:"short" order:2
58 | if err := codec256.FormatShort(writer, x.Protocol); err != nil {
59 | return err
60 | }
61 | // decode x.Version opts: encoder:"short" order:3
62 | if err := codec256.FormatShort(writer, x.Version); err != nil {
63 | return err
64 | }
65 | return nil
66 | }
67 | func (x *ConnectMessage) GetPacketType() PacketType {
68 | return PacketType_PACKET_TYPE_CONNECT
69 | }
70 |
71 | func (x *ConnectMessage) Parse(reader io.Reader, version int32) error {
72 | if x == nil {
73 | return nil
74 | }
75 | // decode x.Params opts: order:1
76 | // TODO parse map
77 | return nil
78 | }
79 | func (x *ConnectMessage) Formatter(writer io.Writer, version int32) error {
80 | if x == nil {
81 | return nil
82 | }
83 | // decode x.Params opts: order:1
84 | if err := codec256.FormatSize(writer, len(x.Params)); err != nil {
85 | return err
86 | }
87 | return nil
88 | }
89 | func (x *DisconnectMessage) GetPacketType() PacketType {
90 | return PacketType_PACKET_TYPE_DISCONNECT
91 | }
92 |
93 | func (x *DisconnectMessage) Parse(reader io.Reader, version int32) error {
94 | if x == nil {
95 | return nil
96 | }
97 | // decode x.Params opts: order:1
98 | // TODO parse map
99 | return nil
100 | }
101 | func (x *DisconnectMessage) Formatter(writer io.Writer, version int32) error {
102 | if x == nil {
103 | return nil
104 | }
105 | // decode x.Params opts: order:1
106 | if err := codec256.FormatSize(writer, len(x.Params)); err != nil {
107 | return err
108 | }
109 | return nil
110 | }
111 | func (x *ConnectMessageAck) GetPacketType() PacketType {
112 | return PacketType_PACKET_TYPE_CONNECT_ACK
113 | }
114 |
115 | func (x *ConnectMessageAck) Parse(reader io.Reader, version int32) error {
116 | return nil
117 | }
118 | func (x *ConnectMessageAck) Formatter(writer io.Writer, version int32) error {
119 | return nil
120 | }
121 |
--------------------------------------------------------------------------------
/gen/ras/messages/v1/auth_messages_ras.pb.go:
--------------------------------------------------------------------------------
1 | // Code generated by protoc-gen-go-ras. DO NOT EDIT.
2 |
3 | // This is a compile-time assertion to ensure that this generated file
4 | // is compatible with the v8platform/protoc-gen-go-ras ras it is being compiled against.
5 |
6 | package messagesv1
7 |
8 | import (
9 | codec256 "github.com/v8platform/encoder/ras/codec256"
10 | io "io"
11 | )
12 |
13 | func (x *ServerAuthenticateRequest) GetMessageType() MessageType {
14 | return MessageType_AUTHENTICATE_AGENT_REQUEST
15 | }
16 |
17 | func (x *ServerAuthenticateRequest) Parse(reader io.Reader, version int32) error {
18 | if x == nil {
19 | return nil
20 | }
21 | // decode x.User opts: order:1
22 | if err := codec256.ParseString(reader, &x.User); err != nil {
23 | return err
24 | }
25 | // decode x.Password opts: order:2
26 | if err := codec256.ParseString(reader, &x.Password); err != nil {
27 | return err
28 | }
29 | return nil
30 | }
31 | func (x *ServerAuthenticateRequest) Formatter(writer io.Writer, version int32) error {
32 | if x == nil {
33 | return nil
34 | }
35 | // decode x.User opts: order:1
36 | if err := codec256.FormatString(writer, x.User); err != nil {
37 | return err
38 | }
39 | // decode x.Password opts: order:2
40 | if err := codec256.FormatString(writer, x.Password); err != nil {
41 | return err
42 | }
43 | return nil
44 | }
45 | func (x *ClusterAuthenticateRequest) GetMessageType() MessageType {
46 | return MessageType_AUTHENTICATE_REQUEST
47 | }
48 |
49 | func (x *ClusterAuthenticateRequest) Parse(reader io.Reader, version int32) error {
50 | if x == nil {
51 | return nil
52 | }
53 | // decode x.ClusterId opts: encoder:"uuid" order:1
54 | if err := codec256.ParseUUID(reader, &x.ClusterId); err != nil {
55 | return err
56 | }
57 | // decode x.User opts: order:2
58 | if err := codec256.ParseString(reader, &x.User); err != nil {
59 | return err
60 | }
61 | // decode x.Password opts: order:3
62 | if err := codec256.ParseString(reader, &x.Password); err != nil {
63 | return err
64 | }
65 | return nil
66 | }
67 | func (x *ClusterAuthenticateRequest) Formatter(writer io.Writer, version int32) error {
68 | if x == nil {
69 | return nil
70 | }
71 | // decode x.ClusterId opts: encoder:"uuid" order:1
72 | if err := codec256.FormatUuid(writer, x.ClusterId); err != nil {
73 | return err
74 | }
75 | // decode x.User opts: order:2
76 | if err := codec256.FormatString(writer, x.User); err != nil {
77 | return err
78 | }
79 | // decode x.Password opts: order:3
80 | if err := codec256.FormatString(writer, x.Password); err != nil {
81 | return err
82 | }
83 | return nil
84 | }
85 | func (x *AuthenticateInfobaseRequest) GetMessageType() MessageType {
86 | return MessageType_ADD_AUTHENTICATION_REQUEST
87 | }
88 |
89 | func (x *AuthenticateInfobaseRequest) Parse(reader io.Reader, version int32) error {
90 | if x == nil {
91 | return nil
92 | }
93 | // decode x.ClusterId opts: encoder:"uuid" order:1
94 | if err := codec256.ParseUUID(reader, &x.ClusterId); err != nil {
95 | return err
96 | }
97 | // decode x.User opts: order:2
98 | if err := codec256.ParseString(reader, &x.User); err != nil {
99 | return err
100 | }
101 | // decode x.Password opts: order:3
102 | if err := codec256.ParseString(reader, &x.Password); err != nil {
103 | return err
104 | }
105 | return nil
106 | }
107 | func (x *AuthenticateInfobaseRequest) Formatter(writer io.Writer, version int32) error {
108 | if x == nil {
109 | return nil
110 | }
111 | // decode x.ClusterId opts: encoder:"uuid" order:1
112 | if err := codec256.FormatUuid(writer, x.ClusterId); err != nil {
113 | return err
114 | }
115 | // decode x.User opts: order:2
116 | if err := codec256.FormatString(writer, x.User); err != nil {
117 | return err
118 | }
119 | // decode x.Password opts: order:3
120 | if err := codec256.FormatString(writer, x.Password); err != nil {
121 | return err
122 | }
123 | return nil
124 | }
125 |
--------------------------------------------------------------------------------
/gen/v8platform/serialize/v1/licanses_ras.pb.go:
--------------------------------------------------------------------------------
1 | // Code generated by protoc-gen-go-ras. DO NOT EDIT.
2 |
3 | // This is a compile-time assertion to ensure that this generated file
4 | // is compatible with the v8platform/protoc-gen-go-ras ras it is being compiled against.
5 |
6 | package serializev1
7 |
8 | import (
9 | codec256 "github.com/v8platform/encoder/ras/codec256"
10 | io "io"
11 | )
12 |
13 | func (x *LicenseInfo) Parse(reader io.Reader, version int32) error {
14 | if x == nil {
15 | return nil
16 | }
17 | // decode x.FullName opts: order:1
18 | if err := codec256.ParseString(reader, &x.FullName); err != nil {
19 | return err
20 | }
21 | // decode x.FullPresentation opts: order:2
22 | if err := codec256.ParseString(reader, &x.FullPresentation); err != nil {
23 | return err
24 | }
25 | // decode x.IssuedByServer opts: order:3
26 | if err := codec256.ParseBool(reader, &x.IssuedByServer); err != nil {
27 | return err
28 | }
29 | // decode x.LicenseType opts: order:4
30 | if err := codec256.ParseInt(reader, &x.LicenseType); err != nil {
31 | return err
32 | }
33 | // decode x.MaxUsersAll opts: order:5
34 | if err := codec256.ParseInt(reader, &x.MaxUsersAll); err != nil {
35 | return err
36 | }
37 | // decode x.MaxUsersCur opts: order:6
38 | if err := codec256.ParseInt(reader, &x.MaxUsersCur); err != nil {
39 | return err
40 | }
41 | // decode x.Net opts: order:7
42 | if err := codec256.ParseBool(reader, &x.Net); err != nil {
43 | return err
44 | }
45 | // decode x.RmngrAddress opts: order:8
46 | if err := codec256.ParseString(reader, &x.RmngrAddress); err != nil {
47 | return err
48 | }
49 | // decode x.RmngrPid opts: order:9
50 | if err := codec256.ParseString(reader, &x.RmngrPid); err != nil {
51 | return err
52 | }
53 | // decode x.RmngrPort opts: order:10
54 | if err := codec256.ParseInt(reader, &x.RmngrPort); err != nil {
55 | return err
56 | }
57 | // decode x.Series opts: order:11
58 | if err := codec256.ParseString(reader, &x.Series); err != nil {
59 | return err
60 | }
61 | // decode x.ShortPresentation opts: order:12
62 | if err := codec256.ParseString(reader, &x.ShortPresentation); err != nil {
63 | return err
64 | }
65 | return nil
66 | }
67 | func (x *LicenseInfo) Formatter(writer io.Writer, version int32) error {
68 | if x == nil {
69 | return nil
70 | }
71 | // decode x.FullName opts: order:1
72 | if err := codec256.FormatString(writer, x.FullName); err != nil {
73 | return err
74 | }
75 | // decode x.FullPresentation opts: order:2
76 | if err := codec256.FormatString(writer, x.FullPresentation); err != nil {
77 | return err
78 | }
79 | // decode x.IssuedByServer opts: order:3
80 | if err := codec256.FormatBool(writer, x.IssuedByServer); err != nil {
81 | return err
82 | }
83 | // decode x.LicenseType opts: order:4
84 | if err := codec256.FormatInt(writer, x.LicenseType); err != nil {
85 | return err
86 | }
87 | // decode x.MaxUsersAll opts: order:5
88 | if err := codec256.FormatInt(writer, x.MaxUsersAll); err != nil {
89 | return err
90 | }
91 | // decode x.MaxUsersCur opts: order:6
92 | if err := codec256.FormatInt(writer, x.MaxUsersCur); err != nil {
93 | return err
94 | }
95 | // decode x.Net opts: order:7
96 | if err := codec256.FormatBool(writer, x.Net); err != nil {
97 | return err
98 | }
99 | // decode x.RmngrAddress opts: order:8
100 | if err := codec256.FormatString(writer, x.RmngrAddress); err != nil {
101 | return err
102 | }
103 | // decode x.RmngrPid opts: order:9
104 | if err := codec256.FormatString(writer, x.RmngrPid); err != nil {
105 | return err
106 | }
107 | // decode x.RmngrPort opts: order:10
108 | if err := codec256.FormatInt(writer, x.RmngrPort); err != nil {
109 | return err
110 | }
111 | // decode x.Series opts: order:11
112 | if err := codec256.FormatString(writer, x.Series); err != nil {
113 | return err
114 | }
115 | // decode x.ShortPresentation opts: order:12
116 | if err := codec256.FormatString(writer, x.ShortPresentation); err != nil {
117 | return err
118 | }
119 | return nil
120 | }
121 |
--------------------------------------------------------------------------------
/third_party/googleapis/google/type/quaternion.proto:
--------------------------------------------------------------------------------
1 | // Copyright 2021 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | syntax = "proto3";
16 |
17 | package google.type;
18 |
19 | option cc_enable_arenas = true;
20 | option go_package = "google.golang.org/genproto/googleapis/type/quaternion;quaternion";
21 | option java_multiple_files = true;
22 | option java_outer_classname = "QuaternionProto";
23 | option java_package = "com.google.type";
24 | option objc_class_prefix = "GTP";
25 |
26 | // A quaternion is defined as the quotient of two directed lines in a
27 | // three-dimensional space or equivalently as the quotient of two Euclidean
28 | // vectors (https://en.wikipedia.org/wiki/Quaternion).
29 | //
30 | // Quaternions are often used in calculations involving three-dimensional
31 | // rotations (https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation),
32 | // as they provide greater mathematical robustness by avoiding the gimbal lock
33 | // problems that can be encountered when using Euler angles
34 | // (https://en.wikipedia.org/wiki/Gimbal_lock).
35 | //
36 | // Quaternions are generally represented in this form:
37 | //
38 | // w + xi + yj + zk
39 | //
40 | // where x, y, z, and w are real numbers, and i, j, and k are three imaginary
41 | // numbers.
42 | //
43 | // Our naming choice `(x, y, z, w)` comes from the desire to avoid confusion for
44 | // those interested in the geometric properties of the quaternion in the 3D
45 | // Cartesian space. Other texts often use alternative names or subscripts, such
46 | // as `(a, b, c, d)`, `(1, i, j, k)`, or `(0, 1, 2, 3)`, which are perhaps
47 | // better suited for mathematical interpretations.
48 | //
49 | // To avoid any confusion, as well as to maintain compatibility with a large
50 | // number of software libraries, the quaternions represented using the protocol
51 | // buffer below *must* follow the Hamilton convention, which defines `ij = k`
52 | // (i.e. a right-handed algebra), and therefore:
53 | //
54 | // i^2 = j^2 = k^2 = ijk = −1
55 | // ij = −ji = k
56 | // jk = −kj = i
57 | // ki = −ik = j
58 | //
59 | // Please DO NOT use this to represent quaternions that follow the JPL
60 | // convention, or any of the other quaternion flavors out there.
61 | //
62 | // Definitions:
63 | //
64 | // - Quaternion norm (or magnitude): `sqrt(x^2 + y^2 + z^2 + w^2)`.
65 | // - Unit (or normalized) quaternion: a quaternion whose norm is 1.
66 | // - Pure quaternion: a quaternion whose scalar component (`w`) is 0.
67 | // - Rotation quaternion: a unit quaternion used to represent rotation.
68 | // - Orientation quaternion: a unit quaternion used to represent orientation.
69 | //
70 | // A quaternion can be normalized by dividing it by its norm. The resulting
71 | // quaternion maintains the same direction, but has a norm of 1, i.e. it moves
72 | // on the unit sphere. This is generally necessary for rotation and orientation
73 | // quaternions, to avoid rounding errors:
74 | // https://en.wikipedia.org/wiki/Rotation_formalisms_in_three_dimensions
75 | //
76 | // Note that `(x, y, z, w)` and `(-x, -y, -z, -w)` represent the same rotation,
77 | // but normalization would be even more useful, e.g. for comparison purposes, if
78 | // it would produce a unique representation. It is thus recommended that `w` be
79 | // kept positive, which can be achieved by changing all the signs when `w` is
80 | // negative.
81 | //
82 | message Quaternion {
83 | // The x component.
84 | double x = 1;
85 |
86 | // The y component.
87 | double y = 2;
88 |
89 | // The z component.
90 | double z = 3;
91 |
92 | // The scalar component.
93 | double w = 4;
94 | }
95 |
--------------------------------------------------------------------------------
/gen/ras/messages/v1/managers_messages_ras.pb.go:
--------------------------------------------------------------------------------
1 | // Code generated by protoc-gen-go-ras. DO NOT EDIT.
2 |
3 | // This is a compile-time assertion to ensure that this generated file
4 | // is compatible with the v8platform/protoc-gen-go-ras ras it is being compiled against.
5 |
6 | package messagesv1
7 |
8 | import (
9 | codec256 "github.com/v8platform/encoder/ras/codec256"
10 | v1 "github.com/v8platform/protos/gen/v8platform/serialize/v1"
11 | io "io"
12 | )
13 |
14 | func (x *GetClusterManagersRequest) GetMessageType() MessageType {
15 | return MessageType_GET_CLUSTER_MANAGERS_REQUEST
16 | }
17 |
18 | func (x *GetClusterManagersRequest) Parse(reader io.Reader, version int32) error {
19 | if x == nil {
20 | return nil
21 | }
22 | // decode x.ClusterId opts: encoder:"uuid" order:1
23 | if err := codec256.ParseUUID(reader, &x.ClusterId); err != nil {
24 | return err
25 | }
26 | return nil
27 | }
28 | func (x *GetClusterManagersRequest) Formatter(writer io.Writer, version int32) error {
29 | if x == nil {
30 | return nil
31 | }
32 | // decode x.ClusterId opts: encoder:"uuid" order:1
33 | if err := codec256.FormatUuid(writer, x.ClusterId); err != nil {
34 | return err
35 | }
36 | return nil
37 | }
38 | func (x *GetClusterManagersResponse) GetMessageType() MessageType {
39 | return MessageType_GET_CLUSTER_MANAGERS_RESPONSE
40 | }
41 |
42 | func (x *GetClusterManagersResponse) Parse(reader io.Reader, version int32) error {
43 | if x == nil {
44 | return nil
45 | }
46 | // decode x.Managers opts: order:1
47 | var size_Managers int
48 | if err := codec256.ParseSize(reader, &size_Managers); err != nil {
49 | return err
50 | }
51 | for i := 0; i < size_Managers; i++ {
52 | val := &v1.ManagerInfo{}
53 | if err := val.Parse(reader, version); err != nil {
54 | return err
55 | }
56 |
57 | x.Managers = append(x.Managers, val)
58 | }
59 | return nil
60 | }
61 | func (x *GetClusterManagersResponse) Formatter(writer io.Writer, version int32) error {
62 | if x == nil {
63 | return nil
64 | }
65 | // decode x.Managers opts: order:1
66 | if err := codec256.FormatSize(writer, len(x.Managers)); err != nil {
67 | return err
68 | }
69 | for i := 0; i < len(x.Managers); i++ {
70 | if err := x.Managers[i].Formatter(writer, version); err != nil {
71 | return err
72 | }
73 | }
74 | return nil
75 | }
76 | func (x *GetClusterManagerInfoRequest) GetMessageType() MessageType {
77 | return MessageType_GET_CLUSTER_MANAGER_INFO_REQUEST
78 | }
79 |
80 | func (x *GetClusterManagerInfoRequest) Parse(reader io.Reader, version int32) error {
81 | if x == nil {
82 | return nil
83 | }
84 | // decode x.ClusterId opts: encoder:"uuid" order:1
85 | if err := codec256.ParseUUID(reader, &x.ClusterId); err != nil {
86 | return err
87 | }
88 | // decode x.ManagerId opts: encoder:"uuid" order:2
89 | if err := codec256.ParseUUID(reader, &x.ManagerId); err != nil {
90 | return err
91 | }
92 | return nil
93 | }
94 | func (x *GetClusterManagerInfoRequest) Formatter(writer io.Writer, version int32) error {
95 | if x == nil {
96 | return nil
97 | }
98 | // decode x.ClusterId opts: encoder:"uuid" order:1
99 | if err := codec256.FormatUuid(writer, x.ClusterId); err != nil {
100 | return err
101 | }
102 | // decode x.ManagerId opts: encoder:"uuid" order:2
103 | if err := codec256.FormatUuid(writer, x.ManagerId); err != nil {
104 | return err
105 | }
106 | return nil
107 | }
108 | func (x *GetClusterManagerInfoResponse) GetMessageType() MessageType {
109 | return MessageType_GET_CLUSTER_MANAGER_INFO_RESPONSE
110 | }
111 |
112 | func (x *GetClusterManagerInfoResponse) Parse(reader io.Reader, version int32) error {
113 | if x == nil {
114 | return nil
115 | }
116 | // decode x.Info opts: order:1
117 | x.Info = &v1.ManagerInfo{}
118 | if err := x.Info.Parse(reader, version); err != nil {
119 | return err
120 | }
121 |
122 | return nil
123 | }
124 | func (x *GetClusterManagerInfoResponse) Formatter(writer io.Writer, version int32) error {
125 | if x == nil {
126 | return nil
127 | }
128 | // decode x.Info opts: order:1
129 | if err := x.Info.Formatter(writer, version); err != nil {
130 | return err
131 | }
132 | return nil
133 | }
134 |
--------------------------------------------------------------------------------
/rasapis/ras/messages/v1/working_processes_messages.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package ras.messages.v1;
4 |
5 | import "ras/encoding/ras.proto";
6 | import "v8platform/serialize/v1/processes.proto";
7 | import "protoc-gen-openapiv2/options/annotations.proto";
8 |
9 | option csharp_namespace = "ras.messages.v1";
10 | option go_package = "github.com/v8platform/protos/gen/ras/messages/v1;messagesv1";
11 |
12 | message GetWorkingProcessesRequest {
13 | option (ras.encoding.options).message_type = "GET_WORKING_PROCESSES_REQUEST";
14 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
15 | json_schema: {
16 | title: "GetWorkingProcessesRequest";
17 | description: "Получение списка рабочих процессов на локальном кластере";
18 | required: ["cluster_id"];
19 | };
20 | };
21 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
22 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
23 | description: "Уникальный идентификатор локального кластера"
24 | format: "uuid"
25 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
26 | }
27 | ];
28 | }
29 |
30 | message GetWorkingProcessesResponse {
31 | option (ras.encoding.options).message_type = "GET_WORKING_PROCESSES_RESPONSE";
32 | repeated v8platform.serialize.v1.ProcessInfo processes = 1 [(ras.encoding.field).order = 1];
33 | }
34 |
35 |
36 | message GetWorkingProcessInfoRequest {
37 | option (ras.encoding.options).message_type = "GET_WORKING_PROCESS_INFO_REQUEST";
38 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
39 | json_schema: {
40 | title: "GetWorkingServerInfoRequest";
41 | description: "Получение информации о рабочем процессе локального кластера";
42 | required: ["cluster_id", "server_id"];
43 | };
44 | };
45 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
46 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
47 | description: "Уникальный идентификатор локального кластера"
48 | format: "uuid"
49 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
50 | }
51 | ];
52 | string process_id = 2 [(ras.encoding.field) = {order: 2, encoder: "uuid"},
53 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
54 | description: "Уникальный идентификатор рабочего процесса локального кластера"
55 | format: "uuid"
56 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
57 | }
58 | ];
59 | }
60 |
61 | message GetWorkingProcessInfoResponse {
62 | option (ras.encoding.options).message_type = "GET_WORKING_PROCESS_INFO_RESPONSE";
63 | v8platform.serialize.v1.ProcessInfo info = 1 [(ras.encoding.field).order = 1];
64 | }
65 |
66 |
67 | message GetServerWorkingProcessesRequest {
68 | option (ras.encoding.options).message_type = "GET_SERVER_WORKING_PROCESSES_REQUEST";
69 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
70 | json_schema: {
71 | title: "GetServerWorkingProcessesRequest";
72 | description: "Получение списка рабочих процессов рабочего сервера на локальном кластере";
73 | required: ["cluster_id", "server_id"];
74 | };
75 | };
76 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
77 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
78 | description: "Уникальный идентификатор локального кластера"
79 | format: "uuid"
80 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
81 | }
82 | ];
83 | string server_id = 2 [(ras.encoding.field) = {order: 2, encoder: "uuid"},
84 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
85 | description: "Уникальный идентификатор рабочего сервере локального кластера"
86 | format: "uuid"
87 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
88 | }
89 | ];
90 | }
91 |
92 | message GetServerWorkingProcessesResponse {
93 | option (ras.encoding.options).message_type = "GET_SERVER_WORKING_PROCESSES_RESPONSE";
94 | v8platform.serialize.v1.ProcessInfo processes = 1 [(ras.encoding.field).order = 1];
95 | }
96 |
97 |
--------------------------------------------------------------------------------
/serializeapis/v8platform/serialize/v1/sessions.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package v8platform.serialize.v1;
4 |
5 | import "google/protobuf/timestamp.proto";
6 | import "ras/encoding/ras.proto";
7 | import "v8platform/serialize/v1/licanses.proto";
8 |
9 |
10 | option go_package = "github.com/v8platform/protos/gen/v8platform/serialize/v1;serializev1";
11 |
12 |
13 | message SessionInfo {
14 |
15 | string uuid = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"}];
16 | string app_id = 2 [(ras.encoding.field) = {order: 2}];
17 | int32 blocked_by_dbms = 3 [(ras.encoding.field) = {order: 3}];
18 | int32 blocked_by_ls = 4 [(ras.encoding.field) = {order: 4}];
19 | int64 bytes_all = 5 [(ras.encoding.field) = {order: 5}];
20 | int64 bytes_last5min = 6 [(ras.encoding.field) = {order: 6}];
21 | int32 calls_all = 7 [(ras.encoding.field) = {order: 7}];
22 | int64 calls_last5min = 8 [(ras.encoding.field) = {order: 8}];
23 | string connection_id = 9 [(ras.encoding.field) = {order: 9, encoder: "uuid"}];
24 | int64 dbms_bytes_all = 10 [(ras.encoding.field) = {order: 10}];
25 | int64 dbms_bytes_last5min = 11 [(ras.encoding.field) = {order: 11}];
26 | string db_proc_info = 12 [(ras.encoding.field) = {order: 12}];
27 | int32 db_proc_took = 13 [(ras.encoding.field) = {order: 13}];
28 | google.protobuf.Timestamp db_proc_took_at = 14 [(ras.encoding.field) = {order: 14, encoder: "time"}];
29 | int32 duration_all = 15 [(ras.encoding.field) = {order: 15}];
30 | int32 duration_all_dbms = 16 [(ras.encoding.field) = {order: 16}];
31 | int32 duration_current = 17 [(ras.encoding.field) = {order: 17}];
32 | int32 duration_current_dbms = 18 [(ras.encoding.field) = {order: 18}];
33 | int64 duration_last_5_min = 19 [(ras.encoding.field) = {order: 19}];
34 | int64 duration_last_5_min_dbms = 20 [(ras.encoding.field) = {order: 20}];
35 | string host = 21 [(ras.encoding.field) = {order: 21}];
36 | string infobase_id = 22 [(ras.encoding.field) = {order: 22, encoder: "uuid"}];
37 | google.protobuf.Timestamp last_active_at = 23 [(ras.encoding.field) = {order: 23, encoder: "time"}];
38 | bool hibernate = 24 [(ras.encoding.field) = {order: 24}];
39 | int32 passive_session_hibernate_time = 25 [(ras.encoding.field) = {order: 25}];
40 | int32 hibernate_session_terminate_time = 26 [(ras.encoding.field) = {order: 26}];
41 | repeated LicenseInfo licenses = 27 [(ras.encoding.field) = {order: 27}];
42 | string locale = 28 [(ras.encoding.field) = {order: 28}];
43 | string process_id = 29 [(ras.encoding.field) = {order: 29, encoder: "uuid"}];
44 | int32 id = 30 [(ras.encoding.field) = {order: 30}];
45 | google.protobuf.Timestamp started_at = 31 [(ras.encoding.field) = {order: 31, encoder: "time"}];
46 | string user_name = 32 [(ras.encoding.field) = {order: 32}];
47 |
48 | // version >= 4
49 | int64 memory_current = 33 [(ras.encoding.field) = {order: 33, version: 4}];
50 | int64 memory_last5min = 34 [(ras.encoding.field) = {order: 34, version: 4}];
51 | int64 memory_total = 35 [(ras.encoding.field) = {order: 35, version: 4}];
52 | int64 read_current = 36 [(ras.encoding.field) = {order: 36, version: 4}];
53 | int64 read_last5min = 37 [(ras.encoding.field) = {order: 37, version: 4}];
54 | int64 read_total = 38 [(ras.encoding.field) = {order: 38, version: 4}];
55 | int64 write_current = 39 [(ras.encoding.field) = {order: 39, version: 4}];
56 | int64 write_last5min = 40 [(ras.encoding.field) = {order: 40, version: 4}];
57 | int64 write_total = 41 [(ras.encoding.field) = {order: 41, version: 4}];
58 | // version >= 5
59 | int32 duration_current_service = 42 [(ras.encoding.field) = {order: 42, version: 5}];
60 | int64 duration_last5min_service = 43 [(ras.encoding.field) = {order: 43, version: 5}];
61 | int32 duration_all_service = 44 [(ras.encoding.field) = {order: 44, version: 5}];
62 | string current_service_name = 45 [(ras.encoding.field) = {order: 45, version: 5}];
63 |
64 | // version >= 6
65 | int64 cpu_time_current = 46 [(ras.encoding.field) = {order: 46, version: 6}];
66 | int64 cpu_time_last5min = 47 [(ras.encoding.field) = {order: 47, version: 6}];
67 | int64 cpu_time_total = 48 [(ras.encoding.field) = {order: 48, version: 6}];
68 |
69 | // version >= 7
70 | string data_separation = 49 [(ras.encoding.field) = {order: 49, version: 7}];
71 | // version >= 10
72 | string client_ip_address = 50 [(ras.encoding.field) = {order: 50, version: 10}];
73 |
74 | }
75 |
76 |
--------------------------------------------------------------------------------
/third_party/googleapis/google/rpc/status.proto:
--------------------------------------------------------------------------------
1 | // Copyright 2017 Google Inc.
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | syntax = "proto3";
16 |
17 | package google.rpc;
18 |
19 | import "google/protobuf/any.proto";
20 |
21 | option go_package = "google.golang.org/genproto/googleapis/rpc/status;status";
22 | option java_multiple_files = true;
23 | option java_outer_classname = "StatusProto";
24 | option java_package = "com.google.rpc";
25 | option objc_class_prefix = "RPC";
26 |
27 |
28 | // The `Status` type defines a logical error model that is suitable for different
29 | // programming environments, including REST APIs and RPC APIs. It is used by
30 | // [gRPC](https://github.com/grpc). The error model is designed to be:
31 | //
32 | // - Simple to use and understand for most users
33 | // - Flexible enough to meet unexpected needs
34 | //
35 | // # Overview
36 | //
37 | // The `Status` message contains three pieces of data: error code, error message,
38 | // and error details. The error code should be an enum value of
39 | // [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The
40 | // error message should be a developer-facing English message that helps
41 | // developers *understand* and *resolve* the error. If a localized user-facing
42 | // error message is needed, put the localized message in the error details or
43 | // localize it in the client. The optional error details may contain arbitrary
44 | // information about the error. There is a predefined set of error detail types
45 | // in the package `google.rpc` that can be used for common error conditions.
46 | //
47 | // # Language mapping
48 | //
49 | // The `Status` message is the logical representation of the error model, but it
50 | // is not necessarily the actual wire format. When the `Status` message is
51 | // exposed in different client libraries and different wire protocols, it can be
52 | // mapped differently. For example, it will likely be mapped to some exceptions
53 | // in Java, but more likely mapped to some error codes in C.
54 | //
55 | // # Other uses
56 | //
57 | // The error model and the `Status` message can be used in a variety of
58 | // environments, either with or without APIs, to provide a
59 | // consistent developer experience across different environments.
60 | //
61 | // Example uses of this error model include:
62 | //
63 | // - Partial errors. If a service needs to return partial errors to the client,
64 | // it may embed the `Status` in the normal response to indicate the partial
65 | // errors.
66 | //
67 | // - Workflow errors. A typical workflow has multiple steps. Each step may
68 | // have a `Status` message for error reporting.
69 | //
70 | // - Batch operations. If a client uses batch request and batch response, the
71 | // `Status` message should be used directly inside batch response, one for
72 | // each error sub-response.
73 | //
74 | // - Asynchronous operations. If an API call embeds asynchronous operation
75 | // results in its response, the status of those operations should be
76 | // represented directly using the `Status` message.
77 | //
78 | // - Logging. If some API errors are stored in logs, the message `Status` could
79 | // be used directly after any stripping needed for security/privacy reasons.
80 | message Status {
81 | // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
82 | int32 code = 1;
83 |
84 | // A developer-facing error message, which should be in English. Any
85 | // user-facing error message should be localized and sent in the
86 | // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
87 | string message = 2;
88 |
89 | // A list of messages that carry the error details. There is a common set of
90 | // message types for APIs to use.
91 | repeated google.protobuf.Any details = 3;
92 | }
93 |
--------------------------------------------------------------------------------
/third_party/googleapis/google/type/datetime.proto:
--------------------------------------------------------------------------------
1 | // Copyright 2021 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | syntax = "proto3";
16 |
17 | package google.type;
18 |
19 | import "google/protobuf/duration.proto";
20 |
21 | option cc_enable_arenas = true;
22 | option go_package = "google.golang.org/genproto/googleapis/type/datetime;datetime";
23 | option java_multiple_files = true;
24 | option java_outer_classname = "DateTimeProto";
25 | option java_package = "com.google.type";
26 | option objc_class_prefix = "GTP";
27 |
28 | // Represents civil time (or occasionally physical time).
29 | //
30 | // This type can represent a civil time in one of a few possible ways:
31 | //
32 | // * When utc_offset is set and time_zone is unset: a civil time on a calendar
33 | // day with a particular offset from UTC.
34 | // * When time_zone is set and utc_offset is unset: a civil time on a calendar
35 | // day in a particular time zone.
36 | // * When neither time_zone nor utc_offset is set: a civil time on a calendar
37 | // day in local time.
38 | //
39 | // The date is relative to the Proleptic Gregorian Calendar.
40 | //
41 | // If year is 0, the DateTime is considered not to have a specific year. month
42 | // and day must have valid, non-zero values.
43 | //
44 | // This type may also be used to represent a physical time if all the date and
45 | // time fields are set and either case of the `time_offset` oneof is set.
46 | // Consider using `Timestamp` message for physical time instead. If your use
47 | // case also would like to store the user's timezone, that can be done in
48 | // another field.
49 | //
50 | // This type is more flexible than some applications may want. Make sure to
51 | // document and validate your application's limitations.
52 | message DateTime {
53 | // Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a
54 | // datetime without a year.
55 | int32 year = 1;
56 |
57 | // Required. Month of year. Must be from 1 to 12.
58 | int32 month = 2;
59 |
60 | // Required. Day of month. Must be from 1 to 31 and valid for the year and
61 | // month.
62 | int32 day = 3;
63 |
64 | // Required. Hours of day in 24 hour format. Should be from 0 to 23. An API
65 | // may choose to allow the value "24:00:00" for scenarios like business
66 | // closing time.
67 | int32 hours = 4;
68 |
69 | // Required. Minutes of hour of day. Must be from 0 to 59.
70 | int32 minutes = 5;
71 |
72 | // Required. Seconds of minutes of the time. Must normally be from 0 to 59. An
73 | // API may allow the value 60 if it allows leap-seconds.
74 | int32 seconds = 6;
75 |
76 | // Required. Fractions of seconds in nanoseconds. Must be from 0 to
77 | // 999,999,999.
78 | int32 nanos = 7;
79 |
80 | // Optional. Specifies either the UTC offset or the time zone of the DateTime.
81 | // Choose carefully between them, considering that time zone data may change
82 | // in the future (for example, a country modifies their DST start/end dates,
83 | // and future DateTimes in the affected range had already been stored).
84 | // If omitted, the DateTime is considered to be in local time.
85 | oneof time_offset {
86 | // UTC offset. Must be whole seconds, between -18 hours and +18 hours.
87 | // For example, a UTC offset of -4:00 would be represented as
88 | // { seconds: -14400 }.
89 | google.protobuf.Duration utc_offset = 8;
90 |
91 | // Time zone.
92 | TimeZone time_zone = 9;
93 | }
94 | }
95 |
96 | // Represents a time zone from the
97 | // [IANA Time Zone Database](https://www.iana.org/time-zones).
98 | message TimeZone {
99 | // IANA Time Zone Database time zone, e.g. "America/New_York".
100 | string id = 1;
101 |
102 | // Optional. IANA Time Zone Database version number, e.g. "2019a".
103 | string version = 2;
104 | }
105 |
--------------------------------------------------------------------------------
/third_party/googleapis/google/type/decimal.proto:
--------------------------------------------------------------------------------
1 | // Copyright 2021 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | syntax = "proto3";
16 |
17 | package google.type;
18 |
19 | option cc_enable_arenas = true;
20 | option go_package = "google.golang.org/genproto/googleapis/type/decimal;decimal";
21 | option java_multiple_files = true;
22 | option java_outer_classname = "DecimalProto";
23 | option java_package = "com.google.type";
24 | option objc_class_prefix = "GTP";
25 |
26 | // A representation of a decimal value, such as 2.5. Clients may convert values
27 | // into language-native decimal formats, such as Java's [BigDecimal][] or
28 | // Python's [decimal.Decimal][].
29 | //
30 | // [BigDecimal]:
31 | // https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html
32 | // [decimal.Decimal]: https://docs.python.org/3/library/decimal.html
33 | message Decimal {
34 | // The decimal value, as a string.
35 | //
36 | // The string representation consists of an optional sign, `+` (`U+002B`)
37 | // or `-` (`U+002D`), followed by a sequence of zero or more decimal digits
38 | // ("the integer"), optionally followed by a fraction, optionally followed
39 | // by an exponent.
40 | //
41 | // The fraction consists of a decimal point followed by zero or more decimal
42 | // digits. The string must contain at least one digit in either the integer
43 | // or the fraction. The number formed by the sign, the integer and the
44 | // fraction is referred to as the significand.
45 | //
46 | // The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`)
47 | // followed by one or more decimal digits.
48 | //
49 | // Services **should** normalize decimal values before storing them by:
50 | //
51 | // - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`).
52 | // - Replacing a zero-length integer value with `0` (`.5` -> `0.5`).
53 | // - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`).
54 | // - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`).
55 | //
56 | // Services **may** perform additional normalization based on its own needs
57 | // and the internal decimal implementation selected, such as shifting the
58 | // decimal point and exponent value together (example: `2.5e-1` <-> `0.25`).
59 | // Additionally, services **may** preserve trailing zeroes in the fraction
60 | // to indicate increased precision, but are not required to do so.
61 | //
62 | // Note that only the `.` character is supported to divide the integer
63 | // and the fraction; `,` **should not** be supported regardless of locale.
64 | // Additionally, thousand separators **should not** be supported. If a
65 | // service does support them, values **must** be normalized.
66 | //
67 | // The ENBF grammar is:
68 | //
69 | // DecimalString =
70 | // [Sign] Significand [Exponent];
71 | //
72 | // Sign = '+' | '-';
73 | //
74 | // Significand =
75 | // Digits ['.'] [Digits] | [Digits] '.' Digits;
76 | //
77 | // Exponent = ('e' | 'E') [Sign] Digits;
78 | //
79 | // Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' };
80 | //
81 | // Services **should** clearly document the range of supported values, the
82 | // maximum supported precision (total number of digits), and, if applicable,
83 | // the scale (number of digits after the decimal point), as well as how it
84 | // behaves when receiving out-of-bounds values.
85 | //
86 | // Services **may** choose to accept values passed as input even when the
87 | // value has a higher precision or scale than the service supports, and
88 | // **should** round the value to fit the supported scale. Alternatively, the
89 | // service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC)
90 | // if precision would be lost.
91 | //
92 | // Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in
93 | // gRPC) if the service receives a value outside of the supported range.
94 | string value = 1;
95 | }
96 |
--------------------------------------------------------------------------------
/rasapis/ras/messages/v1/connections_messages.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package ras.messages.v1;
4 |
5 | import "ras/encoding/ras.proto";
6 | import "v8platform/serialize/v1/connections.proto";
7 | import "protoc-gen-openapiv2/options/annotations.proto";
8 |
9 | option csharp_namespace = "ras.messages.v1";
10 | option go_package = "github.com/v8platform/protos/gen/ras/messages/v1;messagesv1";
11 |
12 | // Не реализованы следующие запросы, т.к. не требуется
13 | // GET_CONNECTION_INFO_SHORT_REQUEST = 54;
14 | // GET_CONNECTION_INFO_SHORT_RESPONSE = 55;
15 | // GET_INFOBASE_CONNECTIONS_REQUEST = 56;
16 | // GET_INFOBASE_CONNECTIONS_RESPONSE = 57;
17 |
18 | message GetConnectionsRequest {
19 | option (encoding.options).message_type = "GET_CONNECTIONS_SHORT_REQUEST";
20 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
21 | json_schema: {
22 | title: "GetConnectionsRequest";
23 | description: "Получение списка соединений локального кластера";
24 | required: ["cluster_id"];
25 | };
26 | };
27 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
28 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
29 | description: "Уникальный идентификатор локального кластера"
30 | format: "uuid"
31 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
32 | }
33 | ];
34 | }
35 |
36 | message GetConnectionsResponse {
37 | option (encoding.options).message_type = "GET_CONNECTIONS_SHORT_RESPONSE";
38 | repeated v8platform.serialize.v1.ConnectionInfo connections = 1 [(ras.encoding.field) = {
39 | order: 1,
40 | }];;
41 | }
42 |
43 | message GetInfobaseConnectionsRequest {
44 | option (encoding.options).message_type = "GET_INFOBASE_CONNECTIONS_SHORT_REQUEST";
45 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
46 | json_schema: {
47 | title: "GetInfobaseConnectionsRequest";
48 | description: "Получение списка соединений информационной базы локального кластера";
49 | required: ["cluster_id", "infobase_id"];
50 | };
51 | };
52 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
53 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
54 | description: "Уникальный идентификатор локального кластера"
55 | format: "uuid"
56 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
57 | }
58 | ];
59 | string infobase_id = 2 [(ras.encoding.field) = {order: 2, encoder: "uuid"},
60 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
61 | description: "Уникальный идентификатор информационной базы кластера"
62 | format: "uuid"
63 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
64 | }
65 | ];
66 | }
67 |
68 | message GetInfobaseConnectionsResponse {
69 | option (encoding.options).message_type = "GET_INFOBASE_SESSIONS_RESPONSE";
70 | repeated v8platform.serialize.v1.ConnectionInfo connections = 1 [(ras.encoding.field).order = 1];
71 | }
72 |
73 | message DisconnectConnectionRequest {
74 | option (encoding.options).message_type = "DISCONNECT_REQUEST";
75 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
76 | json_schema: {
77 | title: "DisconnectConnectionRequest";
78 | description: "Отключение соединения на локальном кластере";
79 | required: ["cluster_id", "process_id", "connection_id"];
80 | };
81 | };
82 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
83 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
84 | description: "Уникальный идентификатор локального кластера"
85 | format: "uuid"
86 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
87 | }
88 | ];
89 | string process_id = 2 [(ras.encoding.field) = {order: 2, encoder: "uuid"},
90 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
91 | description: "Уникальный идентификатор рабочего процесса локального кластера"
92 | format: "uuid"
93 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
94 | }
95 | ];
96 | string connection_id = 3 [(ras.encoding.field) = {order: 3, encoder: "uuid"},
97 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
98 | description: "Уникальный идентификатор соединения локального кластера"
99 | format: "uuid"
100 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
101 | }
102 | ];
103 |
104 | }
--------------------------------------------------------------------------------
/gen/v8platform/serialize/v1/clusters_ras.pb.go:
--------------------------------------------------------------------------------
1 | // Code generated by protoc-gen-go-ras. DO NOT EDIT.
2 |
3 | // This is a compile-time assertion to ensure that this generated file
4 | // is compatible with the v8platform/protoc-gen-go-ras ras it is being compiled against.
5 |
6 | package serializev1
7 |
8 | import (
9 | codec256 "github.com/v8platform/encoder/ras/codec256"
10 | io "io"
11 | )
12 |
13 | func (x *ClusterInfo) Parse(reader io.Reader, version int32) error {
14 | if x == nil {
15 | return nil
16 | }
17 | // decode x.Uuid opts: encoder:"uuid" order:1
18 | if err := codec256.ParseUUID(reader, &x.Uuid); err != nil {
19 | return err
20 | }
21 | // decode x.ExpirationTimeout opts: order:2
22 | if err := codec256.ParseInt(reader, &x.ExpirationTimeout); err != nil {
23 | return err
24 | }
25 | // decode x.Host opts: order:3
26 | if err := codec256.ParseString(reader, &x.Host); err != nil {
27 | return err
28 | }
29 | // decode x.LifetimeLimit opts: order:4
30 | if err := codec256.ParseInt(reader, &x.LifetimeLimit); err != nil {
31 | return err
32 | }
33 | // decode x.Port opts: encoder:"short" order:5
34 | if err := codec256.ParseShort(reader, &x.Port); err != nil {
35 | return err
36 | }
37 | // decode x.MaxMemorySize opts: order:6
38 | if err := codec256.ParseInt(reader, &x.MaxMemorySize); err != nil {
39 | return err
40 | }
41 | // decode x.MaxMemoryTimeLimit opts: order:7
42 | if err := codec256.ParseInt(reader, &x.MaxMemoryTimeLimit); err != nil {
43 | return err
44 | }
45 | // decode x.Name opts: order:8
46 | if err := codec256.ParseString(reader, &x.Name); err != nil {
47 | return err
48 | }
49 | // decode x.SecurityLevel opts: order:9
50 | if err := codec256.ParseInt(reader, &x.SecurityLevel); err != nil {
51 | return err
52 | }
53 | // decode x.SessionFaultToleranceLevel opts: order:10
54 | if err := codec256.ParseInt(reader, &x.SessionFaultToleranceLevel); err != nil {
55 | return err
56 | }
57 | // decode x.LoadBalancingMode opts: order:11
58 | if err := codec256.ParseInt(reader, &x.LoadBalancingMode); err != nil {
59 | return err
60 | }
61 | // decode x.ErrorsCountThreshold opts: order:12
62 | if err := codec256.ParseInt(reader, &x.ErrorsCountThreshold); err != nil {
63 | return err
64 | }
65 | // decode x.KillProblemProcesses opts: order:13
66 | if err := codec256.ParseBool(reader, &x.KillProblemProcesses); err != nil {
67 | return err
68 | }
69 | if version >= 9 {
70 | // decode x.KillByMemoryWithDump opts: order:14 version:9
71 | if err := codec256.ParseBool(reader, &x.KillByMemoryWithDump); err != nil {
72 | return err
73 | }
74 | }
75 | return nil
76 | }
77 | func (x *ClusterInfo) Formatter(writer io.Writer, version int32) error {
78 | if x == nil {
79 | return nil
80 | }
81 | // decode x.Uuid opts: encoder:"uuid" order:1
82 | if err := codec256.FormatUuid(writer, x.Uuid); err != nil {
83 | return err
84 | }
85 | // decode x.ExpirationTimeout opts: order:2
86 | if err := codec256.FormatInt(writer, x.ExpirationTimeout); err != nil {
87 | return err
88 | }
89 | // decode x.Host opts: order:3
90 | if err := codec256.FormatString(writer, x.Host); err != nil {
91 | return err
92 | }
93 | // decode x.LifetimeLimit opts: order:4
94 | if err := codec256.FormatInt(writer, x.LifetimeLimit); err != nil {
95 | return err
96 | }
97 | // decode x.Port opts: encoder:"short" order:5
98 | if err := codec256.FormatShort(writer, x.Port); err != nil {
99 | return err
100 | }
101 | // decode x.MaxMemorySize opts: order:6
102 | if err := codec256.FormatInt(writer, x.MaxMemorySize); err != nil {
103 | return err
104 | }
105 | // decode x.MaxMemoryTimeLimit opts: order:7
106 | if err := codec256.FormatInt(writer, x.MaxMemoryTimeLimit); err != nil {
107 | return err
108 | }
109 | // decode x.Name opts: order:8
110 | if err := codec256.FormatString(writer, x.Name); err != nil {
111 | return err
112 | }
113 | // decode x.SecurityLevel opts: order:9
114 | if err := codec256.FormatInt(writer, x.SecurityLevel); err != nil {
115 | return err
116 | }
117 | // decode x.SessionFaultToleranceLevel opts: order:10
118 | if err := codec256.FormatInt(writer, x.SessionFaultToleranceLevel); err != nil {
119 | return err
120 | }
121 | // decode x.LoadBalancingMode opts: order:11
122 | if err := codec256.FormatInt(writer, x.LoadBalancingMode); err != nil {
123 | return err
124 | }
125 | // decode x.ErrorsCountThreshold opts: order:12
126 | if err := codec256.FormatInt(writer, x.ErrorsCountThreshold); err != nil {
127 | return err
128 | }
129 | // decode x.KillProblemProcesses opts: order:13
130 | if err := codec256.FormatBool(writer, x.KillProblemProcesses); err != nil {
131 | return err
132 | }
133 | if version >= 9 {
134 | // decode x.KillByMemoryWithDump opts: order:14 version:9
135 | if err := codec256.FormatBool(writer, x.KillByMemoryWithDump); err != nil {
136 | return err
137 | }
138 | }
139 | return nil
140 | }
141 |
--------------------------------------------------------------------------------
/rasapis/ras/protocol/v1/endpoint.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package ras.protocol.v1;
4 |
5 | import "ras/protocol/v1/param.proto";
6 | import "ras/encoding/ras.proto";
7 | import "ras/encoding/file.proto";
8 | import "ras/protocol/v1/types.proto";
9 | import "ras/protocol/v1/packet.proto";
10 | import "google/protobuf/any.proto";
11 | import "google/protobuf/type.proto";
12 | import "ras/messages/v1/types.proto";
13 | import "ras/messages/v1/clusters_messages.proto";
14 |
15 | option csharp_namespace = "ras.protocol.v1";
16 | option go_package = "github.com/v8platform/protos/gen/ras/protocol/v1;protocolv1";
17 |
18 | option (encoding.impl).interface = "EndpointMessageFormatter";
19 | option (encoding.impl).interface = "EndpointMessageParser";
20 | option (encoding.impl).interface = "EndpointImpl";
21 |
22 | message EndpointOpen {
23 | option (encoding.options).packet_type = "PACKET_TYPE_ENDPOINT_OPEN";
24 | string service = 1 [(ras.encoding.field).order = 1];
25 | string version = 3 [(ras.encoding.field) = {
26 | order: 3,
27 | encoder: "string",
28 | }];
29 | map params = 4 [(ras.encoding.field).order = 4];
30 | }
31 |
32 | message EndpointOpenAck {
33 | option (encoding.options).packet_type = "PACKET_TYPE_ENDPOINT_OPEN_ACK";
34 | string service = 1 [(ras.encoding.field).order = 1];
35 | string version = 2 [(ras.encoding.field) = {
36 | order: 2,
37 | encoder: "string",
38 | }];
39 | int32 endpoint_id = 3 [(ras.encoding.field) = {
40 | order: 3,
41 | encoder: "nullable",
42 | }];
43 | map params = 4 [(ras.encoding.field).order = 4];
44 | }
45 |
46 | message EndpointClose {
47 | option (encoding.options).packet_type = "PACKET_TYPE_ENDPOINT_CLOSE";
48 |
49 | int32 endpoint_id = 1 [(ras.encoding.field) = {
50 | order: 1,
51 | encoder: "nullable",
52 | }];
53 | }
54 |
55 | message EndpointMessage {
56 | option (encoding.options).packet_type = "PACKET_TYPE_ENDPOINT_MESSAGE";
57 | option (encoding.options).generate_endpoint_message_helpers = true;
58 | option (encoding.options).generate_endpoint_helpers = true;
59 | int32 endpoint_id = 1 [(ras.encoding.field) = {
60 | order: 1,
61 | encoder: "nullable",
62 | }];
63 | int32 format = 2 [(ras.encoding.field) = {
64 | order: 2,
65 | encoder: "short",
66 | }];
67 | EndpointDataType type = 3 [(ras.encoding.field) = {
68 | order: 3,
69 | encoder: "byte",
70 | }];
71 | oneof data {
72 | EndpointDataVoidMessage void_message = 4 [
73 | (ras.encoding.field) = {order: 4, type_field: 3}];
74 | EndpointDataMessage message = 5 [
75 | (ras.encoding.field) = {order: 4, type_field: 3}];
76 | EndpointFailureMessage failure = 6 [
77 | (ras.encoding.field) = {order: 4, type_field: 3}];
78 | };
79 | }
80 |
81 | message EndpointFailureAck {
82 | option (encoding.options).packet_type = "PACKET_TYPE_ENDPOINT_FAILURE";
83 | option (encoding.options).generate_error_fn = true;
84 | string service_id = 1 [(ras.encoding.field) = {
85 | order: 1,
86 | }];
87 | string version = 2 [(ras.encoding.field) = {
88 | order: 2,
89 | }];
90 | int32 endpoint_id = 3 [(ras.encoding.field) = {
91 | order: 3,
92 | encoder: "nullable",
93 | }];
94 | string class_cause = 4 [(ras.encoding.field) = {
95 | order: 4,
96 | }];
97 | string message = 5 [(ras.encoding.field) = {
98 | order: 5,
99 | }];
100 | repeated string trace = 6 [(ras.encoding.field) = {
101 | order: 6,
102 | }];
103 | CauseError cause = 7 [(ras.encoding.field) = {
104 | order: 7,
105 | }];
106 | }
107 |
108 | message CauseError {
109 | option (encoding.options).generate_error_fn = true;
110 | string service_id = 1 [(ras.encoding.field) = {
111 | order: 1,
112 | }];
113 | string message = 2 [(ras.encoding.field) = {
114 | order: 2,
115 | }];
116 | // int32 size = 3 [(ras.encoding.field) = {
117 | // order: 2,
118 | // encoder: "size",
119 | // }];
120 | // optional CauseError cause = 4 [(ras.encoding.field) = {
121 | // order: 4,
122 | // }];
123 | }
124 |
125 | message EndpointDataVoidMessage {
126 | option (encoding.options).endpoint_data_type = "ENDPOINT_DATA_TYPE_VOID_MESSAGE";
127 | option (encoding.options).generate_empty = true;
128 | }
129 |
130 | message EndpointDataMessage {
131 | option (encoding.options).endpoint_data_type = "ENDPOINT_DATA_TYPE_MESSAGE";
132 | ras.messages.v1.MessageType type = 1 [(ras.encoding.field) = {
133 | order: 1,
134 | encoder: "byte",
135 | }];
136 |
137 | bytes bytes = 2 [(ras.encoding.field) = {order: 2}];
138 |
139 | }
140 |
141 | message EndpointFailureMessage {
142 | option (encoding.options).endpoint_data_type = "ENDPOINT_DATA_TYPE_EXCEPTION";
143 | option (encoding.options).generate_error_fn = true;
144 | string service_id = 1 [(ras.encoding.field) = {
145 | order: 1,
146 | }];
147 | string message = 2 [(ras.encoding.field) = {
148 | order: 2,
149 | }];
150 | CauseError cause = 3 [(ras.encoding.field) = {
151 | order: 3,
152 | }];
153 | }
--------------------------------------------------------------------------------
/third_party/googleapis/google/type/phone_number.proto:
--------------------------------------------------------------------------------
1 | // Copyright 2021 Google LLC
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | syntax = "proto3";
16 |
17 | package google.type;
18 |
19 | option cc_enable_arenas = true;
20 | option go_package = "google.golang.org/genproto/googleapis/type/phone_number;phone_number";
21 | option java_multiple_files = true;
22 | option java_outer_classname = "PhoneNumberProto";
23 | option java_package = "com.google.type";
24 | option objc_class_prefix = "GTP";
25 |
26 | // An object representing a phone number, suitable as an API wire format.
27 | //
28 | // This representation:
29 | //
30 | // - should not be used for locale-specific formatting of a phone number, such
31 | // as "+1 (650) 253-0000 ext. 123"
32 | //
33 | // - is not designed for efficient storage
34 | // - may not be suitable for dialing - specialized libraries (see references)
35 | // should be used to parse the number for that purpose
36 | //
37 | // To do something meaningful with this number, such as format it for various
38 | // use-cases, convert it to an `i18n.phonenumbers.PhoneNumber` object first.
39 | //
40 | // For instance, in Java this would be:
41 | //
42 | // com.google.type.PhoneNumber wireProto =
43 | // com.google.type.PhoneNumber.newBuilder().build();
44 | // com.google.i18n.phonenumbers.Phonenumber.PhoneNumber phoneNumber =
45 | // PhoneNumberUtil.getInstance().parse(wireProto.getE164Number(), "ZZ");
46 | // if (!wireProto.getExtension().isEmpty()) {
47 | // phoneNumber.setExtension(wireProto.getExtension());
48 | // }
49 | //
50 | // Reference(s):
51 | // - https://github.com/google/libphonenumber
52 | message PhoneNumber {
53 | // An object representing a short code, which is a phone number that is
54 | // typically much shorter than regular phone numbers and can be used to
55 | // address messages in MMS and SMS systems, as well as for abbreviated dialing
56 | // (e.g. "Text 611 to see how many minutes you have remaining on your plan.").
57 | //
58 | // Short codes are restricted to a region and are not internationally
59 | // dialable, which means the same short code can exist in different regions,
60 | // with different usage and pricing, even if those regions share the same
61 | // country calling code (e.g. US and CA).
62 | message ShortCode {
63 | // Required. The BCP-47 region code of the location where calls to this
64 | // short code can be made, such as "US" and "BB".
65 | //
66 | // Reference(s):
67 | // - http://www.unicode.org/reports/tr35/#unicode_region_subtag
68 | string region_code = 1;
69 |
70 | // Required. The short code digits, without a leading plus ('+') or country
71 | // calling code, e.g. "611".
72 | string number = 2;
73 | }
74 |
75 | // Required. Either a regular number, or a short code. New fields may be
76 | // added to the oneof below in the future, so clients should ignore phone
77 | // numbers for which none of the fields they coded against are set.
78 | oneof kind {
79 | // The phone number, represented as a leading plus sign ('+'), followed by a
80 | // phone number that uses a relaxed ITU E.164 format consisting of the
81 | // country calling code (1 to 3 digits) and the subscriber number, with no
82 | // additional spaces or formatting, e.g.:
83 | // - correct: "+15552220123"
84 | // - incorrect: "+1 (555) 222-01234 x123".
85 | //
86 | // The ITU E.164 format limits the latter to 12 digits, but in practice not
87 | // all countries respect that, so we relax that restriction here.
88 | // National-only numbers are not allowed.
89 | //
90 | // References:
91 | // - https://www.itu.int/rec/T-REC-E.164-201011-I
92 | // - https://en.wikipedia.org/wiki/E.164.
93 | // - https://en.wikipedia.org/wiki/List_of_country_calling_codes
94 | string e164_number = 1;
95 |
96 | // A short code.
97 | //
98 | // Reference(s):
99 | // - https://en.wikipedia.org/wiki/Short_code
100 | ShortCode short_code = 2;
101 | }
102 |
103 | // The phone number's extension. The extension is not standardized in ITU
104 | // recommendations, except for being defined as a series of numbers with a
105 | // maximum length of 40 digits. Other than digits, some other dialing
106 | // characters such as ',' (indicating a wait) or '#' may be stored here.
107 | //
108 | // Note that no regions currently use extensions with short codes, so this
109 | // field is normally only set in conjunction with an E.164 number. It is held
110 | // separately from the E.164 number to allow for short code extensions in the
111 | // future.
112 | string extension = 3;
113 | }
114 |
--------------------------------------------------------------------------------
/rasapis/ras/messages/v1/working_servers_messages.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package ras.messages.v1;
4 |
5 | import "ras/encoding/ras.proto";
6 | import "v8platform/serialize/v1/servers.proto";
7 | import "protoc-gen-openapiv2/options/annotations.proto";
8 |
9 | option csharp_namespace = "ras.messages.v1";
10 | option go_package = "github.com/v8platform/protos/gen/ras/messages/v1;messagesv1";
11 |
12 | message GetWorkingServersRequest {
13 | option (ras.encoding.options).message_type = "GET_WORKING_SERVERS_REQUEST";
14 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
15 | json_schema: {
16 | title: "GetWorkingServersRequest";
17 | description: "Получение списка рабочих серверов на локальном кластере";
18 | required: ["cluster_id"];
19 | };
20 | };
21 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
22 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
23 | description: "Уникальный идентификатор локального кластера"
24 | format: "uuid"
25 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
26 | }
27 | ];
28 | }
29 |
30 | message GetWorkingServersResponse {
31 | option (ras.encoding.options).message_type = "GET_WORKING_SERVERS_RESPONSE";
32 | repeated v8platform.serialize.v1.ServerInfo servers = 1 [(ras.encoding.field).order = 1];
33 | }
34 |
35 | message GetWorkingServerInfoRequest {
36 | option (ras.encoding.options).message_type = "GET_WORKING_SERVER_INFO_REQUEST";
37 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
38 | json_schema: {
39 | title: "GetWorkingServerInfoRequest";
40 | description: "Получение информации о рабочем сервере локального кластера";
41 | required: ["cluster_id", "server_id"];
42 | };
43 | };
44 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
45 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
46 | description: "Уникальный идентификатор локального кластера"
47 | format: "uuid"
48 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
49 | }
50 | ];
51 | string server_id = 2 [(ras.encoding.field) = {order: 2, encoder: "uuid"},
52 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
53 | description: "Уникальный идентификатор рабочего сервере локального кластера"
54 | format: "uuid"
55 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
56 | }
57 | ];
58 | }
59 |
60 | message GetWorkingServerInfoResponse {
61 | option (ras.encoding.options).message_type = "GET_WORKING_SERVER_INFO_RESPONSE";
62 | v8platform.serialize.v1.ServerInfo info = 1 [(ras.encoding.field).order = 1];
63 | }
64 |
65 | message AddWorkingServerRequest {
66 | option (ras.encoding.options).message_type = "REG_WORKING_SERVER_REQUEST";
67 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
68 | json_schema: {
69 | title: "RegClusterResponse";
70 | description: "Добавление нового рабочего сервера на локальный кластер";
71 | required: ["cluster_id"];
72 | };
73 | };
74 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
75 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
76 | description: "Уникальный идентификатор локального кластера"
77 | format: "uuid"
78 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
79 | }
80 | ];
81 | v8platform.serialize.v1.ServerInfo info = 2 [(ras.encoding.field).order = 2];
82 | }
83 |
84 | message AddWorkingServerResponse {
85 | option (ras.encoding.options).message_type = "REG_WORKING_SERVER_RESPONSE";
86 | string server_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
87 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
88 | description: "Уникальный идентификатор рабочего сервере локального кластера"
89 | format: "uuid"
90 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
91 | }
92 | ];
93 | }
94 |
95 | // renamed UnregWorkingServerRequest
96 | message DeleteWorkingServerRequest {
97 | option (ras.encoding.options).message_type = "UNREG_WORKING_SERVER_REQUEST";
98 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
99 | json_schema: {
100 | title: "DeleteWorkingServerInfoRequest";
101 | description: "Удаление рабочего сервере из локального кластера";
102 | required: ["cluster_id", "server_id"];
103 | };
104 | };
105 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
106 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
107 | description: "Уникальный идентификатор локального кластера"
108 | format: "uuid"
109 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
110 | }
111 | ];
112 | string server_id = 2 [(ras.encoding.field) = {order: 2, encoder: "uuid"},
113 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
114 | description: "Уникальный идентификатор рабочего сервере локального кластера"
115 | format: "uuid"
116 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
117 | }
118 | ];
119 | }
120 |
--------------------------------------------------------------------------------
/rasapis/ras/messages/v1/sessions_messages.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package ras.messages.v1;
4 |
5 | import "ras/encoding/ras.proto";
6 | import "v8platform/serialize/v1/sessions.proto";
7 | import "protoc-gen-openapiv2/options/annotations.proto";
8 |
9 | option csharp_namespace = "ras.messages.v1";
10 | option go_package = "github.com/v8platform/protos/gen/ras/messages/v1;messagesv1";
11 |
12 | message GetSessionsRequest {
13 | option (encoding.options).message_type = "GET_SESSIONS_REQUEST";
14 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
15 | json_schema: {
16 | title: "GetSessionsRequest";
17 | description: "Получение списка сессий локального кластера";
18 | required: ["cluster_id"];
19 | };
20 | };
21 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
22 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
23 | description: "Уникальный идентификатор локального кластера"
24 | format: "uuid"
25 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
26 | }
27 | ];
28 | }
29 |
30 | message GetSessionsResponse {
31 | option (encoding.options).message_type = "GET_SESSIONS_RESPONSE";
32 | repeated v8platform.serialize.v1.SessionInfo sessions = 1 [(ras.encoding.field) = {
33 | order: 1,
34 | }];;
35 | }
36 |
37 | message GetSessionInfoRequest {
38 | option (encoding.options).message_type = "GET_SESSION_INFO_REQUEST";
39 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
40 | json_schema: {
41 | title: "GetSessionInfoRequest";
42 | description: "Получение информации о сессий локального кластера";
43 | required: ["cluster_id", "session_id"];
44 | };
45 | };
46 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
47 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
48 | description: "Уникальный идентификатор локального кластера"
49 | format: "uuid"
50 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
51 | }
52 | ];
53 | string session_id = 2 [(ras.encoding.field) = {order: 2, encoder: "uuid"},
54 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
55 | description: "Уникальный идентификатор сессии"
56 | format: "uuid"
57 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
58 | }
59 | ];
60 | }
61 |
62 | message GetInfobaseSessionsRequest {
63 | option (encoding.options).message_type = "GET_INFOBASE_SESSIONS_REQUEST";
64 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
65 | json_schema: {
66 | title: "GetInfobaseSessionsRequest";
67 | description: "Получение списка сессий информационной базы локального кластера";
68 | required: ["cluster_id", "infobase_id"];
69 | };
70 | };
71 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
72 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
73 | description: "Уникальный идентификатор локального кластера"
74 | format: "uuid"
75 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
76 | }
77 | ];
78 | string infobase_id = 2 [(ras.encoding.field) = {order: 2, encoder: "uuid"},
79 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
80 | description: "Уникальный идентификатор информационной базы кластера"
81 | format: "uuid"
82 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
83 | }
84 | ];
85 | }
86 |
87 | message GetInfobaseSessionsResponse {
88 | option (encoding.options).message_type = "GET_INFOBASE_SESSIONS_RESPONSE";
89 | repeated v8platform.serialize.v1.SessionInfo sessions = 1 [(ras.encoding.field).order = 1];
90 | }
91 |
92 | message GetSessionInfoResponse {
93 | option (encoding.options).message_type = "GET_SESSION_INFO_RESPONSE";
94 | v8platform.serialize.v1.SessionInfo info = 1 [(ras.encoding.field) = {
95 | order: 1,
96 | }];
97 | }
98 |
99 | message TerminateSessionRequest {
100 | option (encoding.options).message_type = "TERMINATE_SESSION_REQUEST";
101 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
102 | json_schema: {
103 | title: "TerminateSessionRequest";
104 | description: "Отключение сессии локального кластера";
105 | required: ["cluster_id", "session_id"];
106 | };
107 | };
108 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
109 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
110 | description: "Уникальный идентификатор локального кластера"
111 | format: "uuid"
112 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
113 | }
114 | ];
115 | string session_id = 2 [(ras.encoding.field) = {order: 2, encoder: "uuid"},
116 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
117 | description: "Уникальный идентификатор сессии"
118 | format: "uuid"
119 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
120 | }
121 | ];
122 | string message = 3 [(ras.encoding.field) = {order: 3},
123 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
124 | description: "Текст сообщения который будет выведен пользователю при отключении сессии"
125 | format: "string"
126 | }];
127 | }
--------------------------------------------------------------------------------
/gen/ras/messages/v1/clusters_messages_ras.pb.go:
--------------------------------------------------------------------------------
1 | // Code generated by protoc-gen-go-ras. DO NOT EDIT.
2 |
3 | // This is a compile-time assertion to ensure that this generated file
4 | // is compatible with the v8platform/protoc-gen-go-ras ras it is being compiled against.
5 |
6 | package messagesv1
7 |
8 | import (
9 | codec256 "github.com/v8platform/encoder/ras/codec256"
10 | v1 "github.com/v8platform/protos/gen/v8platform/serialize/v1"
11 | io "io"
12 | )
13 |
14 | func (x *GetClustersRequest) GetMessageType() MessageType {
15 | return MessageType_GET_CLUSTERS_REQUEST
16 | }
17 |
18 | func (x *GetClustersRequest) Parse(reader io.Reader, version int32) error {
19 | return nil
20 | }
21 | func (x *GetClustersRequest) Formatter(writer io.Writer, version int32) error {
22 | return nil
23 | }
24 | func (x *GetClustersResponse) GetMessageType() MessageType {
25 | return MessageType_GET_CLUSTERS_RESPONSE
26 | }
27 |
28 | func (x *GetClustersResponse) Parse(reader io.Reader, version int32) error {
29 | if x == nil {
30 | return nil
31 | }
32 | // decode x.Clusters opts: order:1
33 | var size_Clusters int
34 | if err := codec256.ParseSize(reader, &size_Clusters); err != nil {
35 | return err
36 | }
37 | for i := 0; i < size_Clusters; i++ {
38 | val := &v1.ClusterInfo{}
39 | if err := val.Parse(reader, version); err != nil {
40 | return err
41 | }
42 |
43 | x.Clusters = append(x.Clusters, val)
44 | }
45 | return nil
46 | }
47 | func (x *GetClustersResponse) Formatter(writer io.Writer, version int32) error {
48 | if x == nil {
49 | return nil
50 | }
51 | // decode x.Clusters opts: order:1
52 | if err := codec256.FormatSize(writer, len(x.Clusters)); err != nil {
53 | return err
54 | }
55 | for i := 0; i < len(x.Clusters); i++ {
56 | if err := x.Clusters[i].Formatter(writer, version); err != nil {
57 | return err
58 | }
59 | }
60 | return nil
61 | }
62 | func (x *GetClusterInfoRequest) GetMessageType() MessageType {
63 | return MessageType_GET_CLUSTER_INFO_REQUEST
64 | }
65 |
66 | func (x *GetClusterInfoRequest) Parse(reader io.Reader, version int32) error {
67 | if x == nil {
68 | return nil
69 | }
70 | // decode x.ClusterId opts: encoder:"uuid" order:1
71 | if err := codec256.ParseUUID(reader, &x.ClusterId); err != nil {
72 | return err
73 | }
74 | return nil
75 | }
76 | func (x *GetClusterInfoRequest) Formatter(writer io.Writer, version int32) error {
77 | if x == nil {
78 | return nil
79 | }
80 | // decode x.ClusterId opts: encoder:"uuid" order:1
81 | if err := codec256.FormatUuid(writer, x.ClusterId); err != nil {
82 | return err
83 | }
84 | return nil
85 | }
86 | func (x *GetClusterInfoResponse) GetMessageType() MessageType {
87 | return MessageType_GET_CLUSTER_INFO_RESPONSE
88 | }
89 |
90 | func (x *GetClusterInfoResponse) Parse(reader io.Reader, version int32) error {
91 | if x == nil {
92 | return nil
93 | }
94 | // decode x.Info opts: order:1
95 | x.Info = &v1.ClusterInfo{}
96 | if err := x.Info.Parse(reader, version); err != nil {
97 | return err
98 | }
99 |
100 | return nil
101 | }
102 | func (x *GetClusterInfoResponse) Formatter(writer io.Writer, version int32) error {
103 | if x == nil {
104 | return nil
105 | }
106 | // decode x.Info opts: order:1
107 | if err := x.Info.Formatter(writer, version); err != nil {
108 | return err
109 | }
110 | return nil
111 | }
112 | func (x *RegClusterRequest) GetMessageType() MessageType {
113 | return MessageType_REG_CLUSTER_REQUEST
114 | }
115 |
116 | func (x *RegClusterRequest) Parse(reader io.Reader, version int32) error {
117 | if x == nil {
118 | return nil
119 | }
120 | // decode x.ClusterInfo opts: order:1
121 | x.ClusterInfo = &v1.ClusterInfo{}
122 | if err := x.ClusterInfo.Parse(reader, version); err != nil {
123 | return err
124 | }
125 |
126 | return nil
127 | }
128 | func (x *RegClusterRequest) Formatter(writer io.Writer, version int32) error {
129 | if x == nil {
130 | return nil
131 | }
132 | // decode x.ClusterInfo opts: order:1
133 | if err := x.ClusterInfo.Formatter(writer, version); err != nil {
134 | return err
135 | }
136 | return nil
137 | }
138 | func (x *RegClusterResponse) GetMessageType() MessageType {
139 | return MessageType_REG_CLUSTER_RESPONSE
140 | }
141 |
142 | func (x *RegClusterResponse) Parse(reader io.Reader, version int32) error {
143 | if x == nil {
144 | return nil
145 | }
146 | // decode x.ClusterId opts: encoder:"uuid" order:1
147 | if err := codec256.ParseUUID(reader, &x.ClusterId); err != nil {
148 | return err
149 | }
150 | return nil
151 | }
152 | func (x *RegClusterResponse) Formatter(writer io.Writer, version int32) error {
153 | if x == nil {
154 | return nil
155 | }
156 | // decode x.ClusterId opts: encoder:"uuid" order:1
157 | if err := codec256.FormatUuid(writer, x.ClusterId); err != nil {
158 | return err
159 | }
160 | return nil
161 | }
162 | func (x *UnregClusterRequest) GetMessageType() MessageType {
163 | return MessageType_UNREG_CLUSTER_REQUEST
164 | }
165 |
166 | func (x *UnregClusterRequest) Parse(reader io.Reader, version int32) error {
167 | if x == nil {
168 | return nil
169 | }
170 | // decode x.ClusterId opts: encoder:"uuid" order:1
171 | if err := codec256.ParseUUID(reader, &x.ClusterId); err != nil {
172 | return err
173 | }
174 | return nil
175 | }
176 | func (x *UnregClusterRequest) Formatter(writer io.Writer, version int32) error {
177 | if x == nil {
178 | return nil
179 | }
180 | // decode x.ClusterId opts: encoder:"uuid" order:1
181 | if err := codec256.FormatUuid(writer, x.ClusterId); err != nil {
182 | return err
183 | }
184 | return nil
185 | }
186 |
--------------------------------------------------------------------------------
/rasapis/ras/messages/v1/types.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package ras.messages.v1;
4 |
5 | import "google/protobuf/any.proto";
6 |
7 | option csharp_namespace = "ras.messages.v1";
8 | option go_package = "github.com/v8platform/protos/gen/ras/messages/v1;messagesv1";
9 |
10 | enum MessageType {
11 | GET_AGENT_ADMINS_REQUEST = 0;
12 | GET_AGENT_ADMINS_RESPONSE = 1;
13 | GET_CLUSTER_ADMINS_REQUEST = 2;
14 | GET_CLUSTER_ADMINS_RESPONSE = 3;
15 | REG_AGENT_ADMIN_REQUEST = 4;
16 | REG_CLUSTER_ADMIN_REQUEST = 5;
17 | UNREG_AGENT_ADMIN_REQUEST = 6;
18 | UNREG_CLUSTER_ADMIN_REQUEST = 7;
19 | AUTHENTICATE_AGENT_REQUEST = 8; // Auth on agent
20 | AUTHENTICATE_REQUEST = 9; // Auth on cluster
21 | ADD_AUTHENTICATION_REQUEST = 10; // Auth on infobase
22 | GET_CLUSTERS_REQUEST = 11;
23 | GET_CLUSTERS_RESPONSE = 12;
24 | GET_CLUSTER_INFO_REQUEST = 13;
25 | GET_CLUSTER_INFO_RESPONSE = 14;
26 | REG_CLUSTER_REQUEST = 15;
27 | REG_CLUSTER_RESPONSE = 16;
28 | UNREG_CLUSTER_REQUEST = 17;
29 | GET_CLUSTER_MANAGERS_REQUEST = 18;
30 | GET_CLUSTER_MANAGERS_RESPONSE = 19;
31 | GET_CLUSTER_MANAGER_INFO_REQUEST = 20;
32 | GET_CLUSTER_MANAGER_INFO_RESPONSE = 21;
33 | GET_WORKING_SERVERS_REQUEST = 22;
34 | GET_WORKING_SERVERS_RESPONSE = 23;
35 | GET_WORKING_SERVER_INFO_REQUEST = 24;
36 | GET_WORKING_SERVER_INFO_RESPONSE = 25;
37 | REG_WORKING_SERVER_REQUEST = 26;
38 | REG_WORKING_SERVER_RESPONSE = 27;
39 | UNREG_WORKING_SERVER_REQUEST = 28;
40 | GET_WORKING_PROCESSES_REQUEST = 29;
41 | GET_WORKING_PROCESSES_RESPONSE = 30;
42 | GET_WORKING_PROCESS_INFO_REQUEST = 31;
43 | GET_WORKING_PROCESS_INFO_RESPONSE = 32;
44 | GET_SERVER_WORKING_PROCESSES_REQUEST = 33;
45 | GET_SERVER_WORKING_PROCESSES_RESPONSE = 34;
46 | GET_CLUSTER_SERVICES_REQUEST = 35;
47 | GET_CLUSTER_SERVICES_RESPONSE = 36;
48 | CREATE_INFOBASE_REQUEST = 37;
49 | CREATE_INFOBASE_RESPONSE = 38;
50 | UPDATE_INFOBASE_SHORT_REQUEST = 39;
51 | UPDATE_INFOBASE_REQUEST = 40;
52 | DROP_INFOBASE_REQUEST = 41;
53 | GET_INFOBASES_SHORT_REQUEST = 42;
54 | GET_INFOBASES_SHORT_RESPONSE = 43;
55 | GET_INFOBASES_REQUEST = 44;
56 | GET_INFOBASES_RESPONSE = 45;
57 | GET_INFOBASE_SHORT_INFO_REQUEST = 46;
58 | GET_INFOBASE_SHORT_INFO_RESPONSE = 47;
59 | GET_INFOBASE_INFO_REQUEST = 48;
60 | GET_INFOBASE_INFO_RESPONSE = 49;
61 | GET_CONNECTIONS_SHORT_REQUEST = 50;
62 | GET_CONNECTIONS_SHORT_RESPONSE = 51;
63 | GET_INFOBASE_CONNECTIONS_SHORT_REQUEST = 52;
64 | GET_INFOBASE_CONNECTIONS_SHORT_RESPONSE = 53;
65 | GET_CONNECTION_INFO_SHORT_REQUEST = 54;
66 | GET_CONNECTION_INFO_SHORT_RESPONSE = 55;
67 | GET_INFOBASE_CONNECTIONS_REQUEST = 56;
68 | GET_INFOBASE_CONNECTIONS_RESPONSE = 57;
69 | reserved 58 to 63; // Unknown messages types
70 | DISCONNECT_REQUEST = 64;
71 | GET_SESSIONS_REQUEST = 65;
72 | GET_SESSIONS_RESPONSE = 66;
73 | GET_INFOBASE_SESSIONS_REQUEST = 67;
74 | GET_INFOBASE_SESSIONS_RESPONSE = 68;
75 | GET_SESSION_INFO_REQUEST = 69;
76 | GET_SESSION_INFO_RESPONSE = 70;
77 | TERMINATE_SESSION_REQUEST = 71;
78 | GET_LOCKS_REQUEST = 72;
79 | GET_LOCKS_RESPONSE = 73;
80 | GET_INFOBASE_LOCKS_REQUEST = 74;
81 | GET_INFOBASE_LOCKS_RESPONSE = 75;
82 | GET_CONNECTION_LOCKS_REQUEST = 76;
83 | GET_CONNECTION_LOCKS_RESPONSE = 77;
84 | GET_SESSION_LOCKS_REQUEST = 78;
85 | GET_SESSION_LOCKS_RESPONSE = 79;
86 | reserved 80; // Unknown messages type
87 | APPLY_ASSIGNMENT_RULES_REQUEST = 81;
88 | REG_ASSIGNMENT_RULE_REQUEST = 82;
89 | REG_ASSIGNMENT_RULE_RESPONSE = 83;
90 | UNREG_ASSIGNMENT_RULE_REQUEST = 84;
91 | GET_ASSIGNMENT_RULES_REQUEST = 85;
92 | GET_ASSIGNMENT_RULES_RESPONSE = 86;
93 | GET_ASSIGNMENT_RULE_INFO_REQUEST = 87;
94 | GET_ASSIGNMENT_RULE_INFO_RESPONSE = 88;
95 | GET_SECURITY_PROFILES_REQUEST = 89;
96 | GET_SECURITY_PROFILES_RESPONSE = 90;
97 | CREATE_SECURITY_PROFILE_REQUEST = 91;
98 | DROP_SECURITY_PROFILE_REQUEST = 92;
99 | GET_VIRTUAL_DIRECTORIES_REQUEST = 93;
100 | GET_VIRTUAL_DIRECTORIES_RESPONSE = 94;
101 | CREATE_VIRTUAL_DIRECTORY_REQUEST = 95;
102 | DROP_VIRTUAL_DIRECTORY_REQUEST = 96;
103 | GET_COM_CLASSES_REQUEST = 97;
104 | GET_COM_CLASSES_RESPONSE = 98;
105 | CREATE_COM_CLASS_REQUEST = 99;
106 | DROP_COM_CLASS_REQUEST = 100;
107 | GET_ALLOWED_ADDINS_REQUEST = 101;
108 | GET_ALLOWED_ADDINS_RESPONSE = 102;
109 | CREATE_ALLOWED_ADDIN_REQUEST = 103;
110 | DROP_ALLOWED_ADDIN_REQUEST = 104;
111 | GET_EXTERNAL_MODULES_REQUEST = 105;
112 | GET_EXTERNAL_MODULES_RESPONSE = 106;
113 | CREATE_EXTERNAL_MODULE_REQUEST = 107;
114 | DROP_EXTERNAL_MODULE_REQUEST = 108;
115 | GET_ALLOWED_APPLICATIONS_REQUEST = 109;
116 | GET_ALLOWED_APPLICATIONS_RESPONSE = 110;
117 | CREATE_ALLOWED_APPLICATION_REQUEST = 111;
118 | DROP_ALLOWED_APPLICATION_REQUEST = 112;
119 | GET_INTERNET_RESOURCES_REQUEST = 113;
120 | GET_INTERNET_RESOURCES_RESPONSE = 114;
121 | CREATE_INTERNET_RESOURCE_REQUEST = 115;
122 | DROP_INTERNET_RESOURCE_REQUEST = 116;
123 | INTERRUPT_SESSION_CURRENT_SERVER_CALL_REQUEST = 117;
124 | GET_RESOURCE_COUNTERS_REQUEST = 118;
125 | GET_RESOURCE_COUNTERS_RESPONSE = 119;
126 | GET_RESOURCE_COUNTER_INFO_REQUEST = 120;
127 | GET_RESOURCE_COUNTER_INFO_RESPONSE = 121;
128 | REG_RESOURCE_COUNTER_REQUEST = 122;
129 | UNREG_RESOURCE_COUNTER_REQUEST = 123;
130 | GET_RESOURCE_LIMITS_REQUEST = 124;
131 | GET_RESOURCE_LIMITS_RESPONSE = 125;
132 | GET_RESOURCE_LIMIT_INFO_REQUEST = 126;
133 | GET_RESOURCE_LIMIT_INFO_RESPONSE = 127;
134 | REG_RESOURCE_LIMIT_REQUEST = 128;
135 | UNREG_RESOURCE_LIMIT_REQUEST = 129;
136 | GET_COUNTER_VALUES_REQUEST = 130;
137 | GET_COUNTER_VALUES_RESPONSE = 131;
138 | CLEAR_COUNTER_VALUE_REQUEST = 132;
139 | GET_COUNTER_ACCUMULATED_VALUES_REQUEST = 133;
140 | GET_COUNTER_ACCUMULATED_VALUES_RESPONSE = 134;
141 | GET_AGENT_VERSION_REQUEST = 135;
142 | GET_AGENT_VERSION_RESPONSE = 136;
143 | }
--------------------------------------------------------------------------------
/rasapis/ras/messages/v1/locks_messages.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package ras.messages.v1;
4 |
5 | import "ras/encoding/ras.proto";
6 | import "v8platform/serialize/v1/locks.proto";
7 | import "protoc-gen-openapiv2/options/annotations.proto";
8 |
9 | option csharp_namespace = "ras.messages.v1";
10 | option go_package = "github.com/v8platform/protos/gen/ras/messages/v1;messagesv1";
11 |
12 |
13 | message GetLocksRequest {
14 | option (encoding.options).message_type = "GET_LOCKS_REQUEST";
15 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
16 | json_schema: {
17 | title: "GetLocksRequest";
18 | description: "Получение списка блокировок локального кластера";
19 | required: ["cluster_id"];
20 | };
21 | };
22 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
23 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
24 | description: "Уникальный идентификатор локального кластера"
25 | format: "uuid"
26 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
27 | }
28 | ];
29 | }
30 |
31 | message GetLocksResponse {
32 | option (encoding.options).message_type = "GET_LOCKS_RESPONSE";
33 | repeated v8platform.serialize.v1.LockInfo locks = 1 [(ras.encoding.field) = {order: 1}];
34 | }
35 |
36 | message GetInfobaseLocksRequest {
37 | option (encoding.options).message_type = "GET_INFOBASE_LOCKS_REQUEST";
38 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
39 | json_schema: {
40 | title: "GetInfobaseConnectionsRequest";
41 | description: "Получение списка блокировок информационной базы локального кластера";
42 | required: ["cluster_id", "infobase_id"];
43 | };
44 | };
45 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
46 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
47 | description: "Уникальный идентификатор локального кластера"
48 | format: "uuid"
49 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
50 | }
51 | ];
52 | string infobase_id = 2 [(ras.encoding.field) = {order: 2, encoder: "uuid"},
53 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
54 | description: "Уникальный идентификатор информационной базы кластера"
55 | format: "uuid"
56 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
57 | }
58 | ];
59 | }
60 |
61 | message GetInfobaseLocksResponse {
62 | option (encoding.options).message_type = "GET_INFOBASE_LOCKS_RESPONSE";
63 | repeated v8platform.serialize.v1.LockInfo locks = 1 [(ras.encoding.field) = {order: 1}];
64 | }
65 |
66 |
67 | message GetConnectionLocksRequest {
68 | option (encoding.options).message_type = "GET_CONNECTION_LOCKS_REQUEST";
69 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
70 | json_schema: {
71 | title: "GetInfobaseConnectionsRequest";
72 | description: "Получение списка блокировок соединения локального кластера";
73 | required: ["cluster_id", "connection_id"];
74 | };
75 | };
76 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
77 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
78 | description: "Уникальный идентификатор локального кластера"
79 | format: "uuid"
80 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
81 | }
82 | ];
83 | string connection_id = 2 [(ras.encoding.field) = {order: 2, encoder: "uuid"},
84 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
85 | description: "Уникальный идентификатор соединения локального кластера"
86 | format: "uuid"
87 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
88 | }
89 | ];
90 | }
91 |
92 | message GetConnectionLocksResponse {
93 | option (encoding.options).message_type = "GET_CONNECTION_LOCKS_RESPONSE";
94 | repeated v8platform.serialize.v1.LockInfo locks = 1 [(ras.encoding.field) = {order: 1}];
95 | }
96 |
97 | message GetSessionLocksRequest {
98 | option (encoding.options).message_type = "GET_SESSION_LOCKS_REQUEST";
99 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
100 | json_schema: {
101 | title: "GetInfobaseConnectionsRequest";
102 | description: "Получение списка блокировок сессии информационной базы локального кластера";
103 | required: ["cluster_id", "infobase_id", "session_id"];
104 | };
105 | };
106 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
107 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
108 | description: "Уникальный идентификатор локального кластера"
109 | format: "uuid"
110 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
111 | }
112 | ];
113 | string infobase_id = 2 [(ras.encoding.field) = {order: 2, encoder: "uuid"},
114 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
115 | description: "Уникальный идентификатор информационной базы кластера"
116 | format: "uuid"
117 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
118 | }
119 | ];
120 | string session_id = 3 [(ras.encoding.field) = {order: 3, encoder: "uuid"},
121 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
122 | description: "Уникальный идентификатор сессии"
123 | format: "uuid"
124 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
125 | }
126 | ];
127 | }
128 |
129 | message GetSessionLocksResponse {
130 | option (encoding.options).message_type = "GET_SESSION_LOCKS_RESPONSE";
131 | repeated v8platform.serialize.v1.LockInfo locks = 1 [(ras.encoding.field) = {order: 1}];
132 | }
133 |
--------------------------------------------------------------------------------
/rasapis/ras/messages/v1/admin_messages.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package ras.messages.v1;
4 |
5 | //import "ras/protocol/v1/param.proto";
6 | import "ras/encoding/ras.proto";
7 | import "google/protobuf/any.proto";
8 | import "protoc-gen-openapiv2/options/annotations.proto";
9 |
10 | option csharp_namespace = "ras.messages.v1";
11 | option go_package = "github.com/v8platform/protos/gen/ras/messages/v1;messagesv1";
12 |
13 | message GetAgentVersionRequest {
14 | option (encoding.options).message_type = "GET_AGENT_VERSION_REQUEST";
15 | option (ras.encoding.options).generate_empty = true;
16 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
17 | json_schema: {
18 | title: "GetAgentVersionRequest";
19 | description: "Получение версии сервера 1С";
20 | };
21 | };
22 |
23 | }
24 | message GetAgentVersionResponse {
25 | option (encoding.options).message_type = "GET_AGENT_VERSION_RESPONSE";
26 | string version = 1 [(ras.encoding.field) = {order: 1}];
27 | }
28 |
29 | message GetClusterAdminsRequest {
30 |
31 | option (encoding.options).message_type = "GET_AGENT_VERSION_REQUEST";
32 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
33 | json_schema: {
34 | title: "GetClusterAdminsRequest";
35 | description: "Получение списка администраторов локального кластера сервера 1С";
36 | required: ["cluster_id"];
37 | };
38 | };
39 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
40 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
41 | description: "Уникальный идентификатор локального кластера"
42 | format: "uuid"
43 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
44 | }
45 | ];
46 | }
47 |
48 | message GetClusterAdminsResponse {
49 | // option (ras.encoding.endpoint_message_type) = GET_CLUSTER_ADMINS_RESPONSE;
50 | option (encoding.options).message_type = "GET_CLUSTER_ADMINS_RESPONSE";
51 | repeated AdminInfo admins = 1 [(ras.encoding.field) = {order: 1}];
52 | }
53 |
54 | message GetAgentAdminsRequest {
55 | // option (ras.encoding.endpoint_message_type) = GET_AGENT_ADMINS_REQUEST;
56 | option (encoding.options).message_type = "GET_AGENT_ADMINS_REQUEST";
57 | option (ras.encoding.options).generate_empty = true;
58 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
59 | json_schema: {
60 | title: "GetAgentAdminsRequest";
61 | description: "Получение списка администраторов сервера 1С";
62 | };
63 | };
64 | }
65 |
66 | message GetAgentAdminsResponse {
67 | option (encoding.options).message_type = "GET_AGENT_ADMINS_RESPONSE";
68 | repeated AdminInfo admins = 1 [(ras.encoding.field) = {order: 1}];
69 | }
70 | // Renamed RegClusterAdminRequest
71 | message CreateClusterAdminRequest {
72 | option (encoding.options).message_type = "REG_CLUSTER_ADMIN_REQUEST";
73 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
74 | json_schema: {
75 | title: "CreateClusterAdminRequest";
76 | description: "Добавление нового администратора локального кластера сервера 1С";
77 | required: ["cluster_id"];
78 | };
79 | };
80 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
81 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
82 | description: "Уникальный идентификатор локального кластера"
83 | format: "uuid"
84 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
85 | }
86 | ];
87 | AdminInfo admin_info = 2 [(ras.encoding.field) = {order: 1}];
88 | }
89 |
90 | // Renamed UnregClusterAdminRequest
91 | message DeleteClusterAdminRequest {
92 | option (encoding.options).message_type = "UNREG_CLUSTER_ADMIN_REQUEST";
93 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
94 | json_schema: {
95 | title: "RegClusterAdminRequest";
96 | description: "Удаление администратора локального кластера сервера 1С";
97 | required: ["cluster_id"];
98 | };
99 | };
100 | string cluster_id = 1 [(ras.encoding.field) = {order: 1, encoder: "uuid"},
101 | (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
102 | description: "Уникальный идентификатор локального кластера"
103 | format: "uuid"
104 | pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
105 | }
106 | ];
107 |
108 | string admin_name = 2 [(ras.encoding.field) = {order: 1}];
109 |
110 | }
111 | // Renamed RegAgentAdminRequest
112 | message CreateAgentAdminRequest {
113 | option (encoding.options).message_type = "REG_AGENT_ADMIN_REQUEST";
114 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
115 | json_schema: {
116 | title: "CreateAgentAdminRequest";
117 | description: "Добавление администратора сервера 1С";
118 | };
119 | };
120 | AdminInfo admin_info = 1 [(ras.encoding.field) = {order: 1}];
121 | }
122 | // Renamed UnregAgentAdminRequest
123 | message DeleteAgentAdminRequest {
124 | // option (ras.encoding.endpoint_message_type) = UNREG_AGENT_ADMIN_REQUEST;
125 | option (encoding.options).message_type = "UNREG_AGENT_ADMIN_REQUEST";
126 | option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
127 | json_schema: {
128 | title: "DeleteAgentAdminRequest";
129 | description: "Удаление администратора сервера 1С";
130 | };
131 | };
132 | string admin_name = 1 [(ras.encoding.field) = {order: 1}];
133 | }
134 |
135 | message AdminInfo {
136 | string Name = 1 [(ras.encoding.field) = {order: 1}];
137 | string description = 2 [(ras.encoding.field) = {order: 2}];
138 | string password = 3 [(ras.encoding.field) = {order: 3}];
139 | bool password_auth_allowed = 4 [(ras.encoding.field) = {order: 4}];
140 | bool sys_auth_allowed = 5 [(ras.encoding.field) = {order: 5}];
141 | string sys_user_name = 6 [(ras.encoding.field) = {order: 6}];
142 | }
143 |
--------------------------------------------------------------------------------
/gen/ras/messages/v1/connections_messages_ras.pb.go:
--------------------------------------------------------------------------------
1 | // Code generated by protoc-gen-go-ras. DO NOT EDIT.
2 |
3 | // This is a compile-time assertion to ensure that this generated file
4 | // is compatible with the v8platform/protoc-gen-go-ras ras it is being compiled against.
5 |
6 | package messagesv1
7 |
8 | import (
9 | codec256 "github.com/v8platform/encoder/ras/codec256"
10 | v1 "github.com/v8platform/protos/gen/v8platform/serialize/v1"
11 | io "io"
12 | )
13 |
14 | func (x *GetConnectionsRequest) GetMessageType() MessageType {
15 | return MessageType_GET_CONNECTIONS_SHORT_REQUEST
16 | }
17 |
18 | func (x *GetConnectionsRequest) Parse(reader io.Reader, version int32) error {
19 | if x == nil {
20 | return nil
21 | }
22 | // decode x.ClusterId opts: encoder:"uuid" order:1
23 | if err := codec256.ParseUUID(reader, &x.ClusterId); err != nil {
24 | return err
25 | }
26 | return nil
27 | }
28 | func (x *GetConnectionsRequest) Formatter(writer io.Writer, version int32) error {
29 | if x == nil {
30 | return nil
31 | }
32 | // decode x.ClusterId opts: encoder:"uuid" order:1
33 | if err := codec256.FormatUuid(writer, x.ClusterId); err != nil {
34 | return err
35 | }
36 | return nil
37 | }
38 | func (x *GetConnectionsResponse) GetMessageType() MessageType {
39 | return MessageType_GET_CONNECTIONS_SHORT_RESPONSE
40 | }
41 |
42 | func (x *GetConnectionsResponse) Parse(reader io.Reader, version int32) error {
43 | if x == nil {
44 | return nil
45 | }
46 | // decode x.Connections opts: order:1
47 | var size_Connections int
48 | if err := codec256.ParseSize(reader, &size_Connections); err != nil {
49 | return err
50 | }
51 | for i := 0; i < size_Connections; i++ {
52 | val := &v1.ConnectionInfo{}
53 | if err := val.Parse(reader, version); err != nil {
54 | return err
55 | }
56 |
57 | x.Connections = append(x.Connections, val)
58 | }
59 | return nil
60 | }
61 | func (x *GetConnectionsResponse) Formatter(writer io.Writer, version int32) error {
62 | if x == nil {
63 | return nil
64 | }
65 | // decode x.Connections opts: order:1
66 | if err := codec256.FormatSize(writer, len(x.Connections)); err != nil {
67 | return err
68 | }
69 | for i := 0; i < len(x.Connections); i++ {
70 | if err := x.Connections[i].Formatter(writer, version); err != nil {
71 | return err
72 | }
73 | }
74 | return nil
75 | }
76 | func (x *GetInfobaseConnectionsRequest) GetMessageType() MessageType {
77 | return MessageType_GET_INFOBASE_CONNECTIONS_SHORT_REQUEST
78 | }
79 |
80 | func (x *GetInfobaseConnectionsRequest) Parse(reader io.Reader, version int32) error {
81 | if x == nil {
82 | return nil
83 | }
84 | // decode x.ClusterId opts: encoder:"uuid" order:1
85 | if err := codec256.ParseUUID(reader, &x.ClusterId); err != nil {
86 | return err
87 | }
88 | // decode x.InfobaseId opts: encoder:"uuid" order:2
89 | if err := codec256.ParseUUID(reader, &x.InfobaseId); err != nil {
90 | return err
91 | }
92 | return nil
93 | }
94 | func (x *GetInfobaseConnectionsRequest) Formatter(writer io.Writer, version int32) error {
95 | if x == nil {
96 | return nil
97 | }
98 | // decode x.ClusterId opts: encoder:"uuid" order:1
99 | if err := codec256.FormatUuid(writer, x.ClusterId); err != nil {
100 | return err
101 | }
102 | // decode x.InfobaseId opts: encoder:"uuid" order:2
103 | if err := codec256.FormatUuid(writer, x.InfobaseId); err != nil {
104 | return err
105 | }
106 | return nil
107 | }
108 | func (x *GetInfobaseConnectionsResponse) GetMessageType() MessageType {
109 | return MessageType_GET_INFOBASE_SESSIONS_RESPONSE
110 | }
111 |
112 | func (x *GetInfobaseConnectionsResponse) Parse(reader io.Reader, version int32) error {
113 | if x == nil {
114 | return nil
115 | }
116 | // decode x.Connections opts: order:1
117 | var size_Connections int
118 | if err := codec256.ParseSize(reader, &size_Connections); err != nil {
119 | return err
120 | }
121 | for i := 0; i < size_Connections; i++ {
122 | val := &v1.ConnectionInfo{}
123 | if err := val.Parse(reader, version); err != nil {
124 | return err
125 | }
126 |
127 | x.Connections = append(x.Connections, val)
128 | }
129 | return nil
130 | }
131 | func (x *GetInfobaseConnectionsResponse) Formatter(writer io.Writer, version int32) error {
132 | if x == nil {
133 | return nil
134 | }
135 | // decode x.Connections opts: order:1
136 | if err := codec256.FormatSize(writer, len(x.Connections)); err != nil {
137 | return err
138 | }
139 | for i := 0; i < len(x.Connections); i++ {
140 | if err := x.Connections[i].Formatter(writer, version); err != nil {
141 | return err
142 | }
143 | }
144 | return nil
145 | }
146 | func (x *DisconnectConnectionRequest) GetMessageType() MessageType {
147 | return MessageType_DISCONNECT_REQUEST
148 | }
149 |
150 | func (x *DisconnectConnectionRequest) Parse(reader io.Reader, version int32) error {
151 | if x == nil {
152 | return nil
153 | }
154 | // decode x.ClusterId opts: encoder:"uuid" order:1
155 | if err := codec256.ParseUUID(reader, &x.ClusterId); err != nil {
156 | return err
157 | }
158 | // decode x.ProcessId opts: encoder:"uuid" order:2
159 | if err := codec256.ParseUUID(reader, &x.ProcessId); err != nil {
160 | return err
161 | }
162 | // decode x.ConnectionId opts: encoder:"uuid" order:3
163 | if err := codec256.ParseUUID(reader, &x.ConnectionId); err != nil {
164 | return err
165 | }
166 | return nil
167 | }
168 | func (x *DisconnectConnectionRequest) Formatter(writer io.Writer, version int32) error {
169 | if x == nil {
170 | return nil
171 | }
172 | // decode x.ClusterId opts: encoder:"uuid" order:1
173 | if err := codec256.FormatUuid(writer, x.ClusterId); err != nil {
174 | return err
175 | }
176 | // decode x.ProcessId opts: encoder:"uuid" order:2
177 | if err := codec256.FormatUuid(writer, x.ProcessId); err != nil {
178 | return err
179 | }
180 | // decode x.ConnectionId opts: encoder:"uuid" order:3
181 | if err := codec256.FormatUuid(writer, x.ConnectionId); err != nil {
182 | return err
183 | }
184 | return nil
185 | }
186 |
--------------------------------------------------------------------------------
/rasapis/ras/client/v1/api_service.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 |
3 | package ras.client.v1;
4 | import "google/protobuf/empty.proto";
5 | import "ras/protocol/v1/endpoint.proto";
6 | import "ras/messages/v1/clusters_messages.proto";
7 | import "ras/messages/v1/services_messages.proto";
8 | import "ras/messages/v1/managers_messages.proto";
9 | import "ras/messages/v1/working_processes_messages.proto";
10 | import "ras/messages/v1/working_servers_messages.proto";
11 | import "ras/messages/v1/auth_messages.proto";
12 | import "ras/messages/v1/connections_messages.proto";
13 | import "ras/messages/v1/infobases_messages.proto";
14 | import "ras/messages/v1/sessions_messages.proto";
15 | import "ras/messages/v1/locks_messages.proto";
16 | import "ras/messages/v1/admin_messages.proto";
17 | import "ras/client/client.proto";
18 |
19 | option go_package = "github.com/v8platform/protos/gen/ras/client/v1;clientv1";
20 |
21 | service ClustersService {
22 | option(client).is_request_service = true;
23 |
24 | rpc GetClusters(messages.v1.GetClustersRequest) returns (messages.v1.GetClustersResponse) {};
25 | rpc GetClusterInfo(messages.v1.GetClusterInfoRequest) returns (messages.v1.GetClusterInfoResponse) {};
26 | rpc RegCluster(messages.v1.RegClusterRequest) returns (messages.v1.RegClusterResponse) {};
27 | rpc UnregCluster(messages.v1.UnregClusterRequest) returns (google.protobuf.Empty) {};
28 |
29 | // Managers
30 | rpc GetManagers(messages.v1.GetClusterManagersRequest) returns (messages.v1.GetClusterManagersResponse) {};
31 | rpc GetManagerInfo(messages.v1.GetClusterManagerInfoRequest) returns (messages.v1.GetClusterManagerInfoResponse) {};
32 |
33 | // Processes
34 | rpc GetWorkingProcesses(messages.v1.GetWorkingProcessesRequest) returns (messages.v1.GetWorkingProcessesResponse) {};
35 | rpc GetWorkingProcessInfo(messages.v1.GetWorkingProcessInfoRequest) returns (messages.v1.GetWorkingProcessInfoResponse) {};
36 |
37 | // Servers
38 | rpc GetWorkingServers(messages.v1.GetWorkingServersRequest) returns (messages.v1.GetWorkingServersResponse) {};
39 | rpc GetWorkingServerInfo(messages.v1.GetWorkingServerInfoRequest) returns (messages.v1.GetWorkingServerInfoResponse) {};
40 | rpc AddWorkingServer(messages.v1.AddWorkingServerRequest) returns (messages.v1.AddWorkingServerResponse) {};
41 | rpc DeleteWorkingServer(messages.v1.DeleteWorkingServerRequest) returns (google.protobuf.Empty) {};
42 |
43 | }
44 |
45 | service InfobasesService {
46 | option(client).is_request_service = true;
47 |
48 | rpc GetInfobasesSummary(messages.v1.GetInfobasesSummaryRequest) returns (messages.v1.GetInfobasesSummaryResponse) {};
49 | rpc GetInfobases(messages.v1.GetInfobasesRequest) returns (messages.v1.GetInfobasesResponse) {};
50 | rpc GetInfobase(messages.v1.GetInfobaseInfoRequest) returns (messages.v1.GetInfobaseInfoResponse) {};
51 | rpc CreateInfobase(messages.v1.CreateInfobaseRequest) returns (messages.v1.CreateInfobaseResponse) {};
52 | rpc DropInfobase(messages.v1.DropInfobaseRequest) returns (google.protobuf.Empty){};
53 | rpc UpdateInfobase(messages.v1.UpdateInfobaseRequest) returns (google.protobuf.Empty){};
54 | rpc UpdateInfobaseSummary(messages.v1.UpdateInfobaseSummaryRequest) returns (google.protobuf.Empty){};
55 |
56 | }
57 |
58 | service SessionsService {
59 | option(client).is_request_service = true;
60 |
61 | rpc GetSessions(messages.v1.GetSessionsRequest) returns (messages.v1.GetSessionsResponse) {};
62 | rpc GetInfobaseSessions(messages.v1.GetInfobaseSessionsRequest) returns (messages.v1.GetInfobaseSessionsResponse) {};
63 |
64 | rpc GetSessionInfo(messages.v1.GetSessionInfoRequest) returns (messages.v1.GetSessionInfoResponse) {};
65 | rpc TerminateSession(messages.v1.TerminateSessionRequest) returns (google.protobuf.Empty){};
66 |
67 | }
68 |
69 | service LocksService {
70 | option(client).is_request_service = true;
71 |
72 | rpc GetLocks(messages.v1.GetLocksRequest) returns (messages.v1.GetLocksResponse) {};
73 | rpc GetInfobaseLocks(messages.v1.GetInfobaseLocksRequest) returns (messages.v1.GetInfobaseLocksResponse) {};
74 | rpc GetConnectionLocks(messages.v1.GetConnectionLocksRequest) returns (messages.v1.GetConnectionLocksResponse) {};
75 | rpc GetSessionLocks(messages.v1.GetSessionLocksRequest) returns (messages.v1.GetSessionLocksResponse) {};
76 | }
77 |
78 | service ConnectionsService {
79 | option(client).is_request_service = true;
80 |
81 | rpc GetConnections(messages.v1.GetConnectionsRequest) returns (messages.v1.GetConnectionsResponse) {};
82 | rpc GetInfobaseConnections(messages.v1.GetInfobaseConnectionsRequest) returns (messages.v1.GetInfobaseConnectionsResponse) {};
83 | rpc DisconnectConnection(messages.v1.DisconnectConnectionRequest) returns (google.protobuf.Empty) {};
84 |
85 | }
86 |
87 | service AuthService {
88 | option(client).is_request_service = true;
89 | rpc AuthenticateCluster(messages.v1.ClusterAuthenticateRequest) returns (google.protobuf.Empty) {};
90 | rpc AuthenticateInfobase(messages.v1.AuthenticateInfobaseRequest) returns (google.protobuf.Empty) {};
91 | rpc AuthenticateServer(messages.v1.ServerAuthenticateRequest) returns (google.protobuf.Empty) {};
92 | }
93 |
94 |
95 | service AdminService {
96 | option(client).is_request_service = true;
97 |
98 | rpc GetVersion(messages.v1.GetAgentVersionRequest) returns (messages.v1.GetAgentVersionResponse) {};
99 |
100 | rpc GetServerAdmins(messages.v1.GetAgentAdminsRequest) returns (messages.v1.GetAgentAdminsResponse) {};
101 | rpc GetClustersAdmins(messages.v1.GetClusterAdminsRequest) returns (messages.v1.GetClusterAdminsResponse) {};
102 |
103 | rpc CreateServerAdmin(messages.v1.CreateAgentAdminRequest) returns (google.protobuf.Empty) {};
104 | rpc CreateClusterAdmin(messages.v1.CreateClusterAdminRequest) returns (google.protobuf.Empty) {};
105 |
106 | rpc DeleteServerAdmin(messages.v1.DeleteAgentAdminRequest) returns (google.protobuf.Empty) {};
107 | rpc DeleteClusterAdmin(messages.v1.DeleteClusterAdminRequest) returns (google.protobuf.Empty) {};
108 |
109 | }
110 |
111 |
--------------------------------------------------------------------------------