Skip to content

Commit

Permalink
generate code for authentication service
Browse files Browse the repository at this point in the history
  • Loading branch information
Kleak committed May 16, 2019
1 parent 5146708 commit 59d88c7
Showing 1 changed file with 48 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ class AuthenticationServiceClient extends Client {
'/stashall.AuthenticationService/signin',
(SigninRequest value) => value.writeToBuffer(),
(List<int> value) => new $0.Empty.fromBuffer(value));
static final _$signout = new ClientMethod<$0.Empty, $0.Empty>(
'/stashall.AuthenticationService/signout',
($0.Empty value) => value.writeToBuffer(),
(List<int> value) => new $0.Empty.fromBuffer(value));
static final _$isLogged = new ClientMethod<$0.Empty, $0.Empty>(
'/stashall.AuthenticationService/isLogged',
($0.Empty value) => value.writeToBuffer(),
(List<int> value) => new $0.Empty.fromBuffer(value));

AuthenticationServiceClient(ClientChannel channel, {CallOptions options})
: super(channel, options: options);
Expand All @@ -28,6 +36,20 @@ class AuthenticationServiceClient extends Client {
options: options);
return new ResponseFuture(call);
}

ResponseFuture<$0.Empty> signout($0.Empty request, {CallOptions options}) {
final call = $createCall(
_$signout, new $async.Stream.fromIterable([request]),
options: options);
return new ResponseFuture(call);
}

ResponseFuture<$0.Empty> isLogged($0.Empty request, {CallOptions options}) {
final call = $createCall(
_$isLogged, new $async.Stream.fromIterable([request]),
options: options);
return new ResponseFuture(call);
}
}

abstract class AuthenticationServiceBase extends Service {
Expand All @@ -41,12 +63,38 @@ abstract class AuthenticationServiceBase extends Service {
false,
(List<int> value) => new SigninRequest.fromBuffer(value),
($0.Empty value) => value.writeToBuffer()));
$addMethod(new ServiceMethod<$0.Empty, $0.Empty>(
'signout',
signout_Pre,
false,
false,
(List<int> value) => new $0.Empty.fromBuffer(value),
($0.Empty value) => value.writeToBuffer()));
$addMethod(new ServiceMethod<$0.Empty, $0.Empty>(
'isLogged',
isLogged_Pre,
false,
false,
(List<int> value) => new $0.Empty.fromBuffer(value),
($0.Empty value) => value.writeToBuffer()));
}

$async.Future<$0.Empty> signin_Pre(
ServiceCall call, $async.Future request) async {
return signin(call, await request);
}

$async.Future<$0.Empty> signout_Pre(
ServiceCall call, $async.Future request) async {
return signout(call, await request);
}

$async.Future<$0.Empty> isLogged_Pre(
ServiceCall call, $async.Future request) async {
return isLogged(call, await request);
}

$async.Future<$0.Empty> signin(ServiceCall call, SigninRequest request);
$async.Future<$0.Empty> signout(ServiceCall call, $0.Empty request);
$async.Future<$0.Empty> isLogged(ServiceCall call, $0.Empty request);
}

0 comments on commit 59d88c7

Please sign in to comment.