.
├── artman_dogs.yaml
├── dogs.proto
├── dogs_gapic.yaml
├── dogs_server.js
├── dogs_service.yaml
└── generate-and-run.sh
So you want to write a partial helper, eh?
Hand-written code adds all kinds of functionality on top of generated GAPIC client libraries!
Let's look at the most common type of hand-written extension:
>>
Helper Methods added to service object which wraps call to 1 rpc method <<
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# | |
# Copyright 2018 Google LLC | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# https://www.apache.org/licenses/LICENSE-2.0 | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# | |
# Copyright 2018 Google LLC | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# https://www.apache.org/licenses/LICENSE-2.0 | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type: manifest/samples | |
schema_version: 3 | |
base: &common | |
env: 'java' | |
bin: 'echo mvn exec:java -q -D{sample} -Dexec.args=@args' | |
chdir: '{@manifest_dir}/../..' | |
basepath: '.' | |
samples: | |
- <<: *common | |
path: '{basepath}/src/main/java/com/google/cloud/examples/speech/v1/SpeechTranscribeAsyncWordTimeOffsetsGcs.java' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type: manifest/samples | |
schema_version: 3 | |
base: &common | |
env: 'java' | |
chdir: '{@manifest_dir}/../..' | |
basepath: '/tmp' | |
samples: | |
- <<: *common | |
path: '{basepath}/echo-me' | |
sample: 'first' |