Skip to content

Commit 38dcd3e

Browse files
AUTO: Sync ScalarDL docs in Japanese to docs site repo (#869)
Co-authored-by: josh-wong <[email protected]>
1 parent ac0912f commit 38dcd3e

File tree

96 files changed

+8997
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+8997
-0
lines changed

i18n/versioned_docs/ja-jp/docusaurus-plugin-content-docs/current/applications/simple-bank-account/README.mdx

Lines changed: 285 additions & 0 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
buildscript {
2+
repositories {
3+
mavenCentral()
4+
}
5+
dependencies {
6+
classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.5.RELEASE")
7+
}
8+
}
9+
10+
plugins {
11+
id 'java'
12+
id 'application'
13+
id 'idea'
14+
id "org.springframework.boot" version "2.1.1.RELEASE"
15+
id "io.spring.dependency-management" version "1.0.6.RELEASE"
16+
}
17+
18+
bootJar {
19+
baseName = 'gs-rest-service'
20+
version = '0.1.0'
21+
}
22+
23+
repositories {
24+
mavenCentral()
25+
}
26+
27+
sourceCompatibility = 1.8
28+
targetCompatibility = 1.8
29+
group = 'com.scalar.application.simple-bank-account'
30+
version = '0.1'
31+
32+
dependencies {
33+
compile('org.springframework.boot:spring-boot-starter-web') {
34+
exclude module: 'logback-classic'
35+
}
36+
compile group: 'com.scalar-labs', name: 'scalardl-java-client-sdk', version: '2.0.4'
37+
testCompile 'org.springframework.boot:spring-boot-starter-test'
38+
testCompile group: 'junit', name: 'junit', version: '4.12'
39+
testCompile 'org.assertj:assertj-core:3.9.1'
40+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
-----BEGIN EC PRIVATE KEY-----
2+
MHcCAQEEIFwQjU2tmTbVWDEwcwJGT9IPrEE317pg2xpScqdcE/LSoAoGCCqGSM49
3+
AwEHoUQDQgAEvXTODt47J53wtR0XI0auVUD51gG7DlRHJ2ZAKeKlOi70F7FEKN84
4+
ag+BhP+KbzlSTpijDcprsQpky5GguTV07Q==
5+
-----END EC PRIVATE KEY-----
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
-----BEGIN CERTIFICATE-----
2+
MIICZDCCAgqgAwIBAgIUZflapxR4pNwA+ZDYSvNOmukkb/MwCgYIKoZIzj0EAwIw
3+
bzELMAkGA1UEBhMCSlAxDjAMBgNVBAgTBVRva3lvMQ4wDAYDVQQHEwVUb2t5bzEf
4+
MB0GA1UEChMWU2FtcGxlIEludGVybWVkaWF0ZSBDQTEfMB0GA1UEAxMWU2FtcGxl
5+
IEludGVybWVkaWF0ZSBDQTAeFw0xOTAxMjEwNjIzMDBaFw0yMjAxMjAwNjIzMDBa
6+
MB0xCzAJBgNVBAYTAmpwMQ4wDAYDVQQHEwV0b2t5bzBZMBMGByqGSM49AgEGCCqG
7+
SM49AwEHA0IABL10zg7eOyed8LUdFyNGrlVA+dYBuw5URydmQCnipTou9BexRCjf
8+
OGoPgYT/im85Uk6Yow3Ka7EKZMuRoLk1dO2jgdUwgdIwDgYDVR0PAQH/BAQDAgWg
9+
MBMGA1UdJQQMMAoGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFBoa
10+
q5c0VYxPh0D23dRUOBf7mB/kMB8GA1UdIwQYMBaAFApqL9sG4IYXy3tSZ7cR/t9t
11+
ExUTMDEGCCsGAQUFBwEBBCUwIzAhBggrBgEFBQcwAYYVaHR0cDovL2xvY2FsaG9z
12+
dDo4ODg5MCoGA1UdHwQjMCEwH6AdoBuGGWh0dHA6Ly9sb2NhbGhvc3Q6ODg4OC9j
13+
cmwwCgYIKoZIzj0EAwIDSAAwRQIhAIxFkRCPt17AO21xeV+4JMFnUg32wqBxs4Wa
14+
O26DtC1fAiB456Q+JJk+fpNIQ+nICAzKqUfoaQhzrgwQiBUpxiHfYQ==
15+
-----END CERTIFICATE-----
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Optional. A hostname or an IP address of the server. Use localhost by default if not specified.
2+
# It assuems that there is a single endpoint that is given by DNS or a load balancer.
3+
scalar.dl.client.server.host=localhost
4+
5+
# Optional. A port number of the server. Use 50051 by default if not specified.
6+
scalar.dl.client.server.port=50051
7+
8+
# Optional. A port number of the server for privileged services. Use 50052 by default if not specified.
9+
#scalar.dl.client.server.privileged_port=50052
10+
11+
# Required. The holder ID of a certificate.
12+
# It must be configured for each private key and unique in the system.
13+
scalar.dl.client.cert_holder_id=user1
14+
15+
# Optional. The version of the certificate. Use 1 by default if not specified.
16+
# Use another bigger integer if you need to change your private key.
17+
#scalar.dl.client.cert_version=1
18+
19+
# Required. The path of the certificate file.
20+
scalar.dl.client.cert_path=./conf/client.pem
21+
22+
# Required. The path of a corresponding private key file to the certificate.
23+
# Exceptionally it can be empty in some requests to privileged services
24+
# such as registerCertificate and registerFunction since they don't need a signature.
25+
scalar.dl.client.private_key_path=./conf/client-key.pem
26+
27+
# Optional. A flag to enable TLS communication. False by default.
28+
scalar.dl.client.tls.enabled=false
29+
30+
# Optional. A custom CA root certificate for TLS communication.
31+
# If the issuing certificate authority is known to the client, it can be empty.
32+
#scalar.dl.client.tls.ca_root_cert_path=/path/to/ca-root-cert
33+
34+
# Optional. An authorization credential. (e.g. authorization: Bearer token)
35+
# If this is given, clients will add "authorization: <credential>" http/2 header.
36+
#scalar.dl.client.authorization.credential=credential
37+
38+
# Experimental. Proxy server
39+
#scalar.dl.client.proxy.server=localhost:10051
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[[contracts]]
2+
contract-id = "account-history"
3+
contract-binary-name = "com.scalar.application.bankaccount.contract.AccountHistory"
4+
contract-class-file = "build/classes/java/main/com/scalar/application/bankaccount/contract/AccountHistory.class"
5+
6+
[[contracts]]
7+
contract-id = "create-account"
8+
contract-binary-name = "com.scalar.application.bankaccount.contract.CreateAccount"
9+
contract-class-file = "build/classes/java/main/com/scalar/application/bankaccount/contract/CreateAccount.class"
10+
11+
[[contracts]]
12+
contract-id = "deposit"
13+
contract-binary-name = "com.scalar.application.bankaccount.contract.Deposit"
14+
contract-class-file = "build/classes/java/main/com/scalar/application/bankaccount/contract/Deposit.class"
15+
16+
[[contracts]]
17+
contract-id = "transfer"
18+
contract-binary-name = "com.scalar.application.bankaccount.contract.Transfer"
19+
contract-class-file = "build/classes/java/main/com/scalar/application/bankaccount/contract/Transfer.class"
20+
21+
[[contracts]]
22+
contract-id = "withdraw"
23+
contract-binary-name = "com.scalar.application.bankaccount.contract.Withdraw"
24+
contract-class-file = "build/classes/java/main/com/scalar/application/bankaccount/contract/Withdraw.class"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
tags:
3+
- Community
4+
- Enterprise
5+
displayed_sidebar: docsJapanese
6+
---
7+
8+
# API エンドポイントの数
9+
10+
import TranslationBanner from '/src/components/_translation-ja-jp.mdx';
11+
12+
<TranslationBanner />
13+
14+
## `GET v1/accounts`
15+
16+
- **まだ実装されていません。**
17+
- 口座とその残高のリストを JSON 配列として返します。
18+
19+
```
20+
[
21+
{
22+
"account": <id>,
23+
"balance": <balance>
24+
},
25+
...
26+
]
27+
```
28+
29+
## `GET v1/accounts/{id}?start=<num>&end=<num>&order=<asc or desc>&limit=<num>`
30+
31+
- 指定されたアカウント履歴を JSON 配列として返します。
32+
- 成功した場合は `200 OK` を返します。
33+
34+
```
35+
[
36+
{
37+
"account": <id>,
38+
"balance": <balance>,
39+
"age": <age>
40+
},
41+
...
42+
]
43+
```
44+
45+
## `PUT v1/accounts/{id}`
46+
47+
- id=`{id}`で指定したアカウントを作成します。
48+
- 成功した場合は `200 OK` を返します。
49+
- アカウントがすでに存在する場合は、 `403 Bad Request` を返します。
50+
51+
## `POST v1/accounts/{id}/deposit?amount=<amount>`
52+
53+
- 指定された口座に入金します。
54+
- 成功した場合は `200 OK` を返します。
55+
56+
## `POST v1/accounts/{id}/withdraw?amount=<amount>`
57+
58+
- 指定口座からの出金。
59+
- 成功した場合は `200 OK` を返します。
60+
- 金額がアカウントの残高を超える場合は、 `403 Bad Request` を返します。
61+
62+
## `POST v1/transfers?from=<id>&to=<id>&amount=<amount>`
63+
64+
- ある口座から別の口座に資金を移動します。
65+
- 成功した場合は `200 OK` を返します。
66+
- 金額が送信元アカウントの残高を超える場合、 `403 Bad Request` を返します。
67+
68+
## アカウントを削除する
69+
70+
これを行う方法はありません。
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<mxfile modified="2019-02-21T00:39:48.631Z" host="www.draw.io" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.39 Safari/537.36" etag="flmNA0-_RSElM-VVv3_f" version="10.2.4" type="device"><diagram id="njyqHXsP6wJm8mdvroqs" name="Page-1">7VptU+I6FP41fIShrW3ho6Kuzrr3OuKO3vsttrHNGJpuGgTur78JTV+TQkGK7Lg6o+QkTZvneXLOyaE9azJbfqMgDn8QH+KeOfSXPeuyZ5rG0B7xf8KySi2uJQ0BRb4cVBim6D+YXSmtc+TDpDKQEYIZiqtGj0QR9FjFBigli+qwV4Krd41BABXD1ANYtT4hn4WpdWS6hf0GoiDM7mw447RnBrLBciVJCHyyKJmsq541oYSw9NNsOYFYgJfhkl533dCbPxiFEWtzwdP0wVqM2O0ztW7/nT4s4nAO+vJh3wGeywXLh2WrDAFK5pEPxSTDnnWxCBGD0xh4onfBOee2kM0wbxn84yuJ2DWYISzovoH4HTLkAd7hgyRcT7IehTCeEEzo+g7W9VD8crt8GEgZXDau0six46KDZAYZXfEh8gJzKOGWehvL5qIgzzqTtrBEXE4TkIIJ8qkLTPkHCesOEBuHhrgEXkQieBjczqqwnWlgMzWwWZ3BZv4WsFmjU8PNUnC7ANGbgh1fMqsClDBK3mANIg1qAKMg4k0MX8UMAj6+xfG5NM+Q74ubaPmoMtboLA5AjF3lxVZ50XqBrlg5U1j5C7IFoZwYBwsYXyj/FLB88V+IKmu8lSvnmFxlqUeJrPP726MQ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S1bUeuQ7umJ+gSmM/Ve5Sz/zyqsxfDK+oy9lTpLVp6k6yQaRcNWBVGhaLAUnzw+rf8SwUn87XUv+8WbzznQ4v3py3rv4H</diagram></mxfile>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
#!/usr/bin/env sh
2+
3+
##############################################################################
4+
##
5+
## Gradle start up script for UN*X
6+
##
7+
##############################################################################
8+
9+
# Attempt to set APP_HOME
10+
# Resolve links: $0 may be a link
11+
PRG="$0"
12+
# Need this for relative symlinks.
13+
while [ -h "$PRG" ] ; do
14+
ls=`ls -ld "$PRG"`
15+
link=`expr "$ls" : '.*-> \(.*\)$'`
16+
if expr "$link" : '/.*' > /dev/null; then
17+
PRG="$link"
18+
else
19+
PRG=`dirname "$PRG"`"/$link"
20+
fi
21+
done
22+
SAVED="`pwd`"
23+
cd "`dirname \"$PRG\"`/" >/dev/null
24+
APP_HOME="`pwd -P`"
25+
cd "$SAVED" >/dev/null
26+
27+
APP_NAME="Gradle"
28+
APP_BASE_NAME=`basename "$0"`
29+
30+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31+
DEFAULT_JVM_OPTS=""
32+
33+
# Use the maximum available, or set MAX_FD != -1 to use that value.
34+
MAX_FD="maximum"
35+
36+
warn () {
37+
echo "$*"
38+
}
39+
40+
die () {
41+
echo
42+
echo "$*"
43+
echo
44+
exit 1
45+
}
46+
47+
# OS specific support (must be 'true' or 'false').
48+
cygwin=false
49+
msys=false
50+
darwin=false
51+
nonstop=false
52+
case "`uname`" in
53+
CYGWIN* )
54+
cygwin=true
55+
;;
56+
Darwin* )
57+
darwin=true
58+
;;
59+
MINGW* )
60+
msys=true
61+
;;
62+
NONSTOP* )
63+
nonstop=true
64+
;;
65+
esac
66+
67+
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68+
69+
# Determine the Java command to use to start the JVM.
70+
if [ -n "$JAVA_HOME" ] ; then
71+
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72+
# IBM's JDK on AIX uses strange locations for the executables
73+
JAVACMD="$JAVA_HOME/jre/sh/java"
74+
else
75+
JAVACMD="$JAVA_HOME/bin/java"
76+
fi
77+
if [ ! -x "$JAVACMD" ] ; then
78+
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79+
80+
Please set the JAVA_HOME variable in your environment to match the
81+
location of your Java installation."
82+
fi
83+
else
84+
JAVACMD="java"
85+
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86+
87+
Please set the JAVA_HOME variable in your environment to match the
88+
location of your Java installation."
89+
fi
90+
91+
# Increase the maximum file descriptors if we can.
92+
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93+
MAX_FD_LIMIT=`ulimit -H -n`
94+
if [ $? -eq 0 ] ; then
95+
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96+
MAX_FD="$MAX_FD_LIMIT"
97+
fi
98+
ulimit -n $MAX_FD
99+
if [ $? -ne 0 ] ; then
100+
warn "Could not set maximum file descriptor limit: $MAX_FD"
101+
fi
102+
else
103+
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104+
fi
105+
fi
106+
107+
# For Darwin, add options to specify how the application appears in the dock
108+
if $darwin; then
109+
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110+
fi
111+
112+
# For Cygwin, switch paths to Windows format before running java
113+
if $cygwin ; then
114+
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115+
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116+
JAVACMD=`cygpath --unix "$JAVACMD"`
117+
118+
# We build the pattern for arguments to be converted via cygpath
119+
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120+
SEP=""
121+
for dir in $ROOTDIRSRAW ; do
122+
ROOTDIRS="$ROOTDIRS$SEP$dir"
123+
SEP="|"
124+
done
125+
OURCYGPATTERN="(^($ROOTDIRS))"
126+
# Add a user-defined pattern to the cygpath arguments
127+
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128+
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129+
fi
130+
# Now convert the arguments - kludge to limit ourselves to /bin/sh
131+
i=0
132+
for arg in "$@" ; do
133+
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134+
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135+
136+
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137+
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138+
else
139+
eval `echo args$i`="\"$arg\""
140+
fi
141+
i=$((i+1))
142+
done
143+
case $i in
144+
(0) set -- ;;
145+
(1) set -- "$args0" ;;
146+
(2) set -- "$args0" "$args1" ;;
147+
(3) set -- "$args0" "$args1" "$args2" ;;
148+
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149+
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150+
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151+
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152+
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153+
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154+
esac
155+
fi
156+
157+
# Escape application args
158+
save () {
159+
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160+
echo " "
161+
}
162+
APP_ARGS=$(save "$@")
163+
164+
# Collect all arguments for the java command, following the shell quoting and substitution rules
165+
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166+
167+
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168+
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169+
cd "$(dirname "$0")"
170+
fi
171+
172+
exec "$JAVACMD" "$@"

0 commit comments

Comments
 (0)