Skip to content

Commit c7a823b

Browse files
- Build test.
1 parent 500363a commit c7a823b

File tree

5 files changed

+268
-3
lines changed

5 files changed

+268
-3
lines changed

.vscode/launch.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@
167167
"EXEC aws.transfer.servers.stop_server @region = 'ap-southeast-2' @@json='{ \"ServerId\": \"s-0000000001\" }' ;",
168168
"exec aws.ec2.instances.instances_Stop @region = 'ap-southeast-2', @InstanceId = 'id-001' ;",
169169
"begin; insert into googleadmin.directory.users(data__primaryEmail) values ('[email protected]'); rollback;",
170+
"show methods in local_openssl.keys.rsa;",
171+
"insert into local_openssl.keys.rsa(config_file, key_out_file, cert_out_file, days) select '${workspaceFolder}/test/server/mtls/openssl.cnf', '${workspaceFolder}/test/tmp/manual_key.pem', '${workspaceFolder}/test/tmp/manuial_cert.pem', 90;",
170172
],
171173
"default": "show providers;"
172174
},

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ require (
1919
github.com/spf13/cobra v1.4.0
2020
github.com/spf13/pflag v1.0.5
2121
github.com/spf13/viper v1.10.1
22-
github.com/stackql/any-sdk v0.1.2-alpha09
22+
github.com/stackql/any-sdk v0.1.2-alpha12
2323
github.com/stackql/go-suffix-map v0.0.1-alpha01
2424
github.com/stackql/psql-wire v0.1.1-alpha07
2525
github.com/stackql/stackql-parser v0.0.14-alpha05

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
482482
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
483483
github.com/spf13/viper v1.10.1 h1:nuJZuYpG7gTj/XqiUwg8bA0cp1+M2mC3J4g5luUYBKk=
484484
github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU=
485-
github.com/stackql/any-sdk v0.1.2-alpha09 h1:3pWcZRAK/amlXIETUy34E+41shNNcRc/NrSswlyDaUg=
486-
github.com/stackql/any-sdk v0.1.2-alpha09/go.mod h1:4jYKpPoX2GWEK+qBnlGLvr8SUfndiYwHMIkg1dn9tFM=
485+
github.com/stackql/any-sdk v0.1.2-alpha12 h1:VtC9tpU7Pwo/tMkv0SqVxrIwdfmQZGXCApij1729oXo=
486+
github.com/stackql/any-sdk v0.1.2-alpha12/go.mod h1:4jYKpPoX2GWEK+qBnlGLvr8SUfndiYwHMIkg1dn9tFM=
487487
github.com/stackql/go-suffix-map v0.0.1-alpha01 h1:TDUDS8bySu41Oo9p0eniUeCm43mnRM6zFEd6j6VUaz8=
488488
github.com/stackql/go-suffix-map v0.0.1-alpha01/go.mod h1:QAi+SKukOyf4dBtWy8UMy+hsXXV+yyEE4vmBkji2V7g=
489489
github.com/stackql/psql-wire v0.1.1-alpha07 h1:LQWVUlx4Bougk6dztDNG5tmXxpIVeeTSsInTj801xCs=
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
id: local_openssl
2+
name: local_openssl
3+
version: v0.1.0
4+
protocolType: local_templated
5+
providerServices:
6+
keys:
7+
description: Key management through openssl.
8+
id: keys:v0.1.0
9+
name: keys
10+
preferred: true
11+
service:
12+
$ref: local_openssl/v0.1.0/services/keys.yaml
13+
title: openssl Key Management
14+
version: v0.1.0
15+
openapi: 3.0.3
Lines changed: 248 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,248 @@
1+
info:
2+
version: 0.1.0
3+
title: Contrived Service for a Contrived Provider
4+
contact:
5+
name: Support
6+
url: https://support.contrivedservice.contrivedprovider.com/contact
7+
paths:
8+
/repos/{owner}/{repo}/pages:
9+
get:
10+
summary: Get a Pages site
11+
servers:
12+
- url: '{protocol}://{origin:^(?:[^\:/]+(?:\:[0-9]+)?|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+(?:\:[0-9]+)?)$}/'
13+
variables:
14+
protocol:
15+
default: https
16+
enum:
17+
- https
18+
- http
19+
origin:
20+
default: pages.contrivedservice.contrivedprovider.com
21+
operationId: contrivedservice/get-pages
22+
parameters:
23+
- $ref: '#/components/parameters/owner'
24+
- $ref: '#/components/parameters/repo'
25+
responses:
26+
'200':
27+
description: Response
28+
content:
29+
application/json:
30+
schema:
31+
$ref: '#/components/schemas/page'
32+
'404':
33+
$ref: '#/components/responses/not_found'
34+
components:
35+
schemas:
36+
basic-error:
37+
title: Basic Error
38+
description: Basic Error
39+
type: object
40+
properties:
41+
message:
42+
type: string
43+
documentation_url:
44+
type: string
45+
url:
46+
type: string
47+
status:
48+
type: string
49+
page:
50+
type: object
51+
properties:
52+
url:
53+
type: string
54+
description: The API address for accessing this Page resource.
55+
format: uri
56+
example: https://api.github.com/repos/github/hello-world/pages
57+
status:
58+
type: string
59+
enum:
60+
- built
61+
- building
62+
- errored
63+
nullable: true
64+
cname:
65+
description: The Pages site's custom domain
66+
example: example.com
67+
type: string
68+
nullable: true
69+
protected_domain_state:
70+
type: string
71+
description: The state if the domain is verified
72+
example: pending
73+
nullable: true
74+
enum:
75+
- pending
76+
- verified
77+
- unverified
78+
pending_domain_unverified_at:
79+
type: string
80+
description: The timestamp when a pending domain becomes unverified.
81+
nullable: true
82+
format: date-time
83+
custom_404:
84+
type: boolean
85+
description: Whether the Page has a custom 404 page.
86+
example: false
87+
default: false
88+
html_url:
89+
type: string
90+
description: The web address the Page can be accessed from.
91+
format: uri
92+
example: https://example.com
93+
source:
94+
$ref: '#/components/schemas/pages-source-hash'
95+
public:
96+
type: boolean
97+
description: Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site.
98+
example: true
99+
https_certificate:
100+
$ref: '#/components/schemas/pages-https-certificate'
101+
https_enforced:
102+
type: boolean
103+
description: Whether https is enabled on the domain
104+
example: true
105+
required:
106+
- url
107+
- status
108+
- cname
109+
- custom_404
110+
- public
111+
pages-source-hash:
112+
title: Pages Source Hash
113+
type: object
114+
properties:
115+
branch:
116+
type: string
117+
path:
118+
type: string
119+
required:
120+
- branch
121+
- path
122+
pages-https-certificate:
123+
title: Pages Https Certificate
124+
type: object
125+
properties:
126+
state:
127+
type: string
128+
enum:
129+
- new
130+
- authorization_created
131+
- authorization_pending
132+
- authorized
133+
- authorization_revoked
134+
- issued
135+
- uploaded
136+
- approved
137+
- errored
138+
- bad_authz
139+
- destroy_pending
140+
- dns_changed
141+
example: approved
142+
description:
143+
type: string
144+
example: Certificate is approved
145+
domains:
146+
type: array
147+
items:
148+
type: string
149+
description: Array of the domain set and its alternate name (if it is configured)
150+
example:
151+
- example.com
152+
- www.example.com
153+
expires_at:
154+
type: string
155+
format: date
156+
required:
157+
- state
158+
- description
159+
- domains
160+
parameters:
161+
owner:
162+
name: owner
163+
in: path
164+
required: true
165+
schema:
166+
type: string
167+
repo:
168+
name: repo
169+
in: path
170+
required: true
171+
schema:
172+
type: string
173+
responses:
174+
not_found:
175+
description: Resource not found
176+
content:
177+
application/json:
178+
schema:
179+
$ref: '#/components/schemas/basic-error'
180+
securitySchemes: {}
181+
callbacks: {}
182+
requestBodies: {}
183+
resources:
184+
rsa:
185+
id: openssl_local.keys.rsa
186+
name: rsa
187+
title: rsa
188+
methods:
189+
create_key_pair:
190+
summary: Create a new RSA key pair.
191+
description: |
192+
Create a new RSA key pair.
193+
Classical usage:
194+
openssl req -x509 -keyout test/server/mtls/credentials/pg_server_key.pem -out test/server/mtls/credentials/pg_server_cert.pem -config test/server/mtls/openssl.cnf -days 365
195+
operation:
196+
inline:
197+
- '{{ or .parameters.executable "openssl" }}'
198+
- req
199+
- -x509
200+
- -keyout
201+
- '{{ .parameters.key_out_file }}'
202+
- -out
203+
- '{{ .parameters.cert_out_file }}'
204+
- -config
205+
- '{{ .parameters.config_file }}'
206+
- -days
207+
- '{{ or .parameters.days 365 }}'
208+
parameters:
209+
key_out_file:
210+
in: inline
211+
required: true
212+
schema:
213+
type: string
214+
cert_out_file:
215+
in: inline
216+
required: true
217+
schema:
218+
type: string
219+
config_file:
220+
in: inline
221+
required: true
222+
schema:
223+
type: string
224+
days:
225+
in: inline
226+
required: false
227+
schema:
228+
type: integer
229+
default: 365
230+
executable:
231+
in: inline
232+
required: false
233+
schema:
234+
type: string
235+
default: openssl
236+
response:
237+
mediaType: application/json
238+
openAPIDocKey: '200'
239+
sqlVerbs:
240+
select:
241+
- $ref: '#/components/x-stackQL-resources/rsa/methods/create_key_pair'
242+
insert:
243+
- $ref: '#/components/x-stackQL-resources/rsa/methods/create_key_pair'
244+
update: []
245+
delete: []
246+
openapi: 3.0.3
247+
servers:
248+
- url: https://contrivedservice.contrivedprovider.com

0 commit comments

Comments
 (0)