22
33// Original file comments:
44//
5- // Copyright (C) 2017 Dgraph Labs, Inc. and Contributors
6- //
7- // Licensed under the Apache License, Version 2.0 (the "License");
8- // you may not use this file except in compliance with the License.
9- // You may obtain a copy of the License at
10- //
11- // http://www.apache.org/licenses/LICENSE-2.0
12- //
13- // Unless required by applicable law or agreed to in writing, software
14- // distributed under the License is distributed on an "AS IS" BASIS,
15- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16- // See the License for the specific language governing permissions and
17- // limitations under the License.
5+ // SPDX-FileCopyrightText: © Hypermode Inc. <[email protected] > 6+ // SPDX-License-Identifier: Apache-2.0
187//
198// Style guide for Protocol Buffer 3.
209// Use PascalCase (camelCase with an initial capital) for message names – for example,
2110// SongServerRequest. Use snake_case (underscore_separated_names) for field names – for
2211// example, song_name.
2312//
24- " use strict"
25- var grpc = require ( " @grpc/grpc-js" )
26- var api_pb = require ( " ./api_pb.js" )
13+ ' use strict' ;
14+ var grpc = require ( ' @grpc/grpc-js' ) ;
15+ var api_pb = require ( ' ./api_pb.js' ) ;
2716
2817function serialize_api_Check ( arg ) {
2918 if ( ! ( arg instanceof api_pb . Check ) ) {
30- throw new Error ( " Expected argument of type api.Check" )
19+ throw new Error ( ' Expected argument of type api.Check' ) ;
3120 }
32- return Buffer . from ( arg . serializeBinary ( ) )
21+ return Buffer . from ( arg . serializeBinary ( ) ) ;
3322}
3423
3524function deserialize_api_Check ( buffer_arg ) {
36- return api_pb . Check . deserializeBinary ( new Uint8Array ( buffer_arg ) )
25+ return api_pb . Check . deserializeBinary ( new Uint8Array ( buffer_arg ) ) ;
3726}
3827
3928function serialize_api_LoginRequest ( arg ) {
4029 if ( ! ( arg instanceof api_pb . LoginRequest ) ) {
41- throw new Error ( " Expected argument of type api.LoginRequest" )
30+ throw new Error ( ' Expected argument of type api.LoginRequest' ) ;
4231 }
43- return Buffer . from ( arg . serializeBinary ( ) )
32+ return Buffer . from ( arg . serializeBinary ( ) ) ;
4433}
4534
4635function deserialize_api_LoginRequest ( buffer_arg ) {
47- return api_pb . LoginRequest . deserializeBinary ( new Uint8Array ( buffer_arg ) )
36+ return api_pb . LoginRequest . deserializeBinary ( new Uint8Array ( buffer_arg ) ) ;
4837}
4938
5039function serialize_api_Operation ( arg ) {
5140 if ( ! ( arg instanceof api_pb . Operation ) ) {
52- throw new Error ( " Expected argument of type api.Operation" )
41+ throw new Error ( ' Expected argument of type api.Operation' ) ;
5342 }
54- return Buffer . from ( arg . serializeBinary ( ) )
43+ return Buffer . from ( arg . serializeBinary ( ) ) ;
5544}
5645
5746function deserialize_api_Operation ( buffer_arg ) {
58- return api_pb . Operation . deserializeBinary ( new Uint8Array ( buffer_arg ) )
47+ return api_pb . Operation . deserializeBinary ( new Uint8Array ( buffer_arg ) ) ;
5948}
6049
6150function serialize_api_Payload ( arg ) {
6251 if ( ! ( arg instanceof api_pb . Payload ) ) {
63- throw new Error ( " Expected argument of type api.Payload" )
52+ throw new Error ( ' Expected argument of type api.Payload' ) ;
6453 }
65- return Buffer . from ( arg . serializeBinary ( ) )
54+ return Buffer . from ( arg . serializeBinary ( ) ) ;
6655}
6756
6857function deserialize_api_Payload ( buffer_arg ) {
69- return api_pb . Payload . deserializeBinary ( new Uint8Array ( buffer_arg ) )
58+ return api_pb . Payload . deserializeBinary ( new Uint8Array ( buffer_arg ) ) ;
7059}
7160
7261function serialize_api_Request ( arg ) {
7362 if ( ! ( arg instanceof api_pb . Request ) ) {
74- throw new Error ( " Expected argument of type api.Request" )
63+ throw new Error ( ' Expected argument of type api.Request' ) ;
7564 }
76- return Buffer . from ( arg . serializeBinary ( ) )
65+ return Buffer . from ( arg . serializeBinary ( ) ) ;
7766}
7867
7968function deserialize_api_Request ( buffer_arg ) {
80- return api_pb . Request . deserializeBinary ( new Uint8Array ( buffer_arg ) )
69+ return api_pb . Request . deserializeBinary ( new Uint8Array ( buffer_arg ) ) ;
8170}
8271
8372function serialize_api_Response ( arg ) {
8473 if ( ! ( arg instanceof api_pb . Response ) ) {
85- throw new Error ( " Expected argument of type api.Response" )
74+ throw new Error ( ' Expected argument of type api.Response' ) ;
8675 }
87- return Buffer . from ( arg . serializeBinary ( ) )
76+ return Buffer . from ( arg . serializeBinary ( ) ) ;
8877}
8978
9079function deserialize_api_Response ( buffer_arg ) {
91- return api_pb . Response . deserializeBinary ( new Uint8Array ( buffer_arg ) )
80+ return api_pb . Response . deserializeBinary ( new Uint8Array ( buffer_arg ) ) ;
9281}
9382
9483function serialize_api_TxnContext ( arg ) {
9584 if ( ! ( arg instanceof api_pb . TxnContext ) ) {
96- throw new Error ( " Expected argument of type api.TxnContext" )
85+ throw new Error ( ' Expected argument of type api.TxnContext' ) ;
9786 }
98- return Buffer . from ( arg . serializeBinary ( ) )
87+ return Buffer . from ( arg . serializeBinary ( ) ) ;
9988}
10089
10190function deserialize_api_TxnContext ( buffer_arg ) {
102- return api_pb . TxnContext . deserializeBinary ( new Uint8Array ( buffer_arg ) )
91+ return api_pb . TxnContext . deserializeBinary ( new Uint8Array ( buffer_arg ) ) ;
10392}
10493
10594function serialize_api_Version ( arg ) {
10695 if ( ! ( arg instanceof api_pb . Version ) ) {
107- throw new Error ( " Expected argument of type api.Version" )
96+ throw new Error ( ' Expected argument of type api.Version' ) ;
10897 }
109- return Buffer . from ( arg . serializeBinary ( ) )
98+ return Buffer . from ( arg . serializeBinary ( ) ) ;
11099}
111100
112101function deserialize_api_Version ( buffer_arg ) {
113- return api_pb . Version . deserializeBinary ( new Uint8Array ( buffer_arg ) )
102+ return api_pb . Version . deserializeBinary ( new Uint8Array ( buffer_arg ) ) ;
114103}
115104
105+
116106// Graph response.
117- var DgraphService = ( exports . DgraphService = {
107+ var DgraphService = exports . DgraphService = {
118108 login : {
119- path : " /api.Dgraph/Login" ,
109+ path : ' /api.Dgraph/Login' ,
120110 requestStream : false ,
121111 responseStream : false ,
122112 requestType : api_pb . LoginRequest ,
@@ -127,7 +117,7 @@ var DgraphService = (exports.DgraphService = {
127117 responseDeserialize : deserialize_api_Response ,
128118 } ,
129119 query : {
130- path : " /api.Dgraph/Query" ,
120+ path : ' /api.Dgraph/Query' ,
131121 requestStream : false ,
132122 responseStream : false ,
133123 requestType : api_pb . Request ,
@@ -138,7 +128,7 @@ var DgraphService = (exports.DgraphService = {
138128 responseDeserialize : deserialize_api_Response ,
139129 } ,
140130 alter : {
141- path : " /api.Dgraph/Alter" ,
131+ path : ' /api.Dgraph/Alter' ,
142132 requestStream : false ,
143133 responseStream : false ,
144134 requestType : api_pb . Operation ,
@@ -149,7 +139,7 @@ var DgraphService = (exports.DgraphService = {
149139 responseDeserialize : deserialize_api_Payload ,
150140 } ,
151141 commitOrAbort : {
152- path : " /api.Dgraph/CommitOrAbort" ,
142+ path : ' /api.Dgraph/CommitOrAbort' ,
153143 requestStream : false ,
154144 responseStream : false ,
155145 requestType : api_pb . TxnContext ,
@@ -160,7 +150,7 @@ var DgraphService = (exports.DgraphService = {
160150 responseDeserialize : deserialize_api_TxnContext ,
161151 } ,
162152 checkVersion : {
163- path : " /api.Dgraph/CheckVersion" ,
153+ path : ' /api.Dgraph/CheckVersion' ,
164154 requestStream : false ,
165155 responseStream : false ,
166156 requestType : api_pb . Check ,
@@ -170,6 +160,6 @@ var DgraphService = (exports.DgraphService = {
170160 responseSerialize : serialize_api_Version ,
171161 responseDeserialize : deserialize_api_Version ,
172162 } ,
173- } )
163+ } ;
174164
175- exports . DgraphClient = grpc . makeGenericClientConstructor ( DgraphService )
165+ exports . DgraphClient = grpc . makeGenericClientConstructor ( DgraphService ) ;
0 commit comments