@kumori.systems/components-apisix 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/kumori.systems/components/apisix/@0.0.1/README.adoc +130 -0
  2. package/kumori.systems/components/apisix/@0.0.1/assets/images/routing_diagram.png +0 -0
  3. package/kumori.systems/components/apisix/@0.0.1/componentref.cue +26 -0
  4. package/kumori.systems/components/apisix/@0.0.1/cue.mod/module.cue +1 -0
  5. package/kumori.systems/components/apisix/@0.0.1/kmodule.cue +30 -0
  6. package/kumori.systems/components/apisix/@0.0.1/manifest.cue +159 -0
  7. package/kumori.systems/components/apisix/@0.0.1/openid-connect.cue +587 -0
  8. package/kumori.systems/components/apisix/@0.0.1/serviceref.cue +26 -0
  9. package/kumori.systems/components/apisix/@0.0.1/settings/apisix_settings.cue +33 -0
  10. package/kumori.systems/components/apisix/@0.0.1/settings/entrypoint.cue +38 -0
  11. package/kumori.systems/components/apisix/@0.0.1/settings/types/connections.cue +131 -0
  12. package/kumori.systems/components/apisix/@0.0.1/settings/types/consumer.cue +6 -0
  13. package/kumori.systems/components/apisix/@0.0.1/settings/types/globalrule.cue +6 -0
  14. package/kumori.systems/components/apisix/@0.0.1/settings/types/healthcheck.cue +39 -0
  15. package/kumori.systems/components/apisix/@0.0.1/settings/types/plugin.cue +20 -0
  16. package/kumori.systems/components/apisix/@0.0.1/settings/types/pluginmetadata.cue +6 -0
  17. package/kumori.systems/components/apisix/@0.0.1/settings/types/route.cue +34 -0
  18. package/kumori.systems/components/apisix/@0.0.1/settings/types/service.cue +6 -0
  19. package/kumori.systems/components/apisix/@0.0.1/settings/types/ssl.cue +11 -0
  20. package/kumori.systems/components/apisix/@0.0.1/settings/types/streamroute.cue +6 -0
  21. package/kumori.systems/components/apisix/@0.0.1/settings/types/upstream.cue +35 -0
  22. package/kumori.systems/components/apisix/@0.0.1/settings/types/utils.cue +11 -0
  23. package/package.json +1 -0
@@ -0,0 +1,131 @@
1
+ // package types
2
+
3
+ // // Validation
4
+ // #Upstream: {
5
+ // id: int
6
+ // type: string
7
+ // nodes: {...}
8
+ // }
9
+
10
+ // #Route: {
11
+ // uri: string
12
+ // upstream_id?: int
13
+ // plugins?: {...}
14
+ // service_id?: int
15
+ // }
16
+
17
+ // #Service: {
18
+ // id: int
19
+ // upstream_id: int
20
+ // }
21
+
22
+ // #Consumer: {
23
+ // username: string
24
+ // plugins: {...}
25
+ // }
26
+ // // END Validation
27
+
28
+
29
+ // // ROUTE + UPSTREAM
30
+ // #ApisixRouteUpstream: {
31
+
32
+ // routes: [...#Route] | *[
33
+ // {
34
+ // uri: string | *"/ip"
35
+ // upstream_id: int | *1
36
+ // }
37
+ // ]
38
+
39
+ // upstreams: [...#Upstream] | *[
40
+ // {
41
+ // id: int | *1
42
+ // nodes: "0.httpbin:80": int | *1
43
+ // type: string | *"roundrobin"
44
+ // }
45
+ // ]
46
+ // }
47
+
48
+
49
+ // // MULTIPLE ROUTES + UPSTREAMS
50
+ // #ApisixMultipleRoutes: {
51
+
52
+ // routes: [...#Route] | *[
53
+ // {
54
+ // uri: string | *"/ip"
55
+ // upstream_id: int | *1
56
+ // },
57
+ // {
58
+ // uri: string | *"/get"
59
+ // upstream_id: int | *1
60
+ // }
61
+ // ]
62
+
63
+ // upstreams: [...#Upstream] | *[
64
+ // {
65
+ // id: int | *1
66
+ // nodes: "0.httpbin:80": int | *1
67
+ // type: string | *"roundrobin"
68
+ // }
69
+ // ]
70
+ // }
71
+
72
+
73
+ // // ROUTE + UPSTREAM + SERVICE
74
+ // #ApisixRouteUpstreamService: {
75
+
76
+ // routes: [...#Route] | *[
77
+ // {
78
+ // uri: string | *"/get"
79
+ // service_id: int | *1
80
+ // }
81
+ // ]
82
+
83
+ // services: [...#Service] | *[
84
+ // {
85
+ // id: int | *1
86
+ // upstream_id: int | *2
87
+ // }
88
+ // ]
89
+
90
+ // upstreams: [...#Upstream] | *[
91
+ // {
92
+ // id: int | *2
93
+ // nodes: "0.httpbin:80": int | *1
94
+ // type: string | *"roundrobin"
95
+ // }
96
+ // ]
97
+ // }
98
+
99
+
100
+ // // ROUTES + UPSTREAMS + CONSUMERS
101
+ // #ApisixRouteUpstreamConsumer: {
102
+
103
+ // routes: [...#Route] | *[
104
+ // {
105
+ // uri: string | *"/get"
106
+ // upstream_id: int | *1
107
+ // plugins: {
108
+ // "key-auth": {}
109
+ // }
110
+ // }
111
+ // ]
112
+
113
+ // upstreams: [...#Upstream] | *[
114
+ // {
115
+ // id: int | *1
116
+ // nodes: "0.httpbin:80": int | *1
117
+ // type: string | *"roundrobin"
118
+ // }
119
+ // ]
120
+
121
+ // consumers: [...#Consumer] | *[
122
+ // {
123
+ // username: string | *"exampleuser"
124
+ // plugins: {
125
+ // "key-auth": {
126
+ // key: string | *"example-key"
127
+ // }
128
+ // }
129
+ // }
130
+ // ]
131
+ // }
@@ -0,0 +1,6 @@
1
+ package types
2
+
3
+ #Consumers: [...#Consumer]
4
+
5
+ // TODO: Complete definition
6
+ #Consumer: {...}
@@ -0,0 +1,6 @@
1
+ package types
2
+
3
+ #GlobalRules: [...{
4
+ id: number
5
+ plugins: [...#Plugin]
6
+ }]
@@ -0,0 +1,39 @@
1
+ package types
2
+
3
+ #HealtChecks: {
4
+ active?: {
5
+ type?: "http" | "https" | "tcp"
6
+ timeout?: int
7
+ concurrency?: int
8
+ http_path?: string
9
+ host?: string
10
+ port?: uint16
11
+ https_verify_certificate?: bool
12
+ req_headers?: [...string]
13
+ healthy?: {
14
+ interval?: int & >=1
15
+ http_statuses?: #HttpStatusCodes
16
+ successes?: uint8
17
+ }
18
+ unhealthy?: {
19
+ interval?: int & >=1
20
+ http_statuses?: #HttpStatusCodes
21
+ http_failures?: uint8
22
+ tcp_failures?: uint8
23
+ timeouts?: uint8
24
+ }
25
+ }
26
+ passive?: {
27
+ type?: *"http" | "https" | "tcp"
28
+ healthy?: {
29
+ http_statuses?: #HttpStatusCodes
30
+ successes?: uint8
31
+ }
32
+ unhealthy?: {
33
+ http_statuses?: #HttpStatusCodes
34
+ tcp_failures?: uint8
35
+ timeouts?: uint8
36
+ http_failures?: uint8
37
+ }
38
+ }
39
+ }
@@ -0,0 +1,20 @@
1
+ package types
2
+
3
+ // List of plugins to load
4
+ #Plugins: [...{
5
+ name: string
6
+ stream?: bool
7
+ }]
8
+
9
+ #PluginConfigs: [...{
10
+ id: number
11
+ plugins: [...#Plugin]
12
+ }]
13
+ // #PluginConfigs: [...{
14
+ // id: number
15
+ // desc?: string
16
+ // plugins: [string]: #Plugin
17
+ // }]
18
+
19
+ // TODO: Complete definition. Define the plugins from the docs
20
+ #Plugin: {...}
@@ -0,0 +1,6 @@
1
+ package types
2
+
3
+ #PluginsMetadata: [...#PluginMetadata]
4
+
5
+ // TODO: Complete definition
6
+ #PluginMetadata: {...}
@@ -0,0 +1,34 @@
1
+ package types
2
+
3
+ #Routes: [...#Route]
4
+
5
+ #Route: {
6
+ name?: string
7
+ desc?: string
8
+ uri?: #Uri
9
+ uris?: [...#Uri]
10
+ host?: #Host
11
+ hosts?: [...#Host]
12
+ remote_addr?: #RemoteAddr
13
+ remote_addrs?: [...#RemoteAddr]
14
+ methods?: [..."GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "CONNECT" | "OPTIONS" | "TRACE" | "PATCH"]
15
+ priority?: int
16
+ vars?: [...#Var]
17
+ filter_func?: string
18
+ plugins?: [string]: #Plugin
19
+ script?: [...#Script]
20
+ upstream?: #Upstream
21
+ upstream_id?: number
22
+ service_id?: number
23
+ plugin_config_id?: number
24
+ labels?: {...}
25
+ timeout?: #Timeout
26
+ enable_websocket?: bool
27
+ status?: 0 | 1
28
+ }
29
+
30
+ #Uri: string
31
+ #Host: string
32
+ #RemoteAddr: string
33
+ #Var: [string, string, string]
34
+ #Script: string
@@ -0,0 +1,6 @@
1
+ package types
2
+
3
+ #Services: [...#Service]
4
+
5
+ // TODO: Complete definition
6
+ #Service: {...}
@@ -0,0 +1,11 @@
1
+ package types
2
+
3
+ #Ssls: [...#Ssl]
4
+
5
+ #Ssl: {
6
+ cert: string
7
+ key: string
8
+ snis: [...#SNI]
9
+ }
10
+
11
+ #SNI: string
@@ -0,0 +1,6 @@
1
+ package types
2
+
3
+ #StreamRoutes: [...#StreamRoute]
4
+
5
+ // TODO: Complete definition
6
+ #StreamRoute: {...}
@@ -0,0 +1,35 @@
1
+ package types
2
+
3
+ #Upstreams: [...{
4
+ id: number
5
+ #Upstream
6
+ }]
7
+
8
+ #Upstream: {
9
+ type?: "roundrobin" | "ewma" | "least_conn" | "chash"
10
+ nodes: [string]: number
11
+ service_name?: string
12
+ discovery_type?: string
13
+ hash_on?: string
14
+ key?: string
15
+ checks?: #HealtChecks
16
+ retries?: int
17
+ retry_timeout?: int
18
+ timeout?: #Timeout
19
+ name?: string
20
+ desc?: string
21
+ pass_host?: "pass" | "node" | "rewrite"
22
+ upstream_host?: string
23
+ scheme?: #Scheme
24
+ labels?: {...}
25
+ tls?: {
26
+ client_cert?: string
27
+ client_key?: string
28
+ client_cert_id?: string
29
+ }
30
+ keepalive_pool?: {
31
+ size?: string
32
+ idle_timeout?: string
33
+ requests?: string
34
+ }
35
+ }
@@ -0,0 +1,11 @@
1
+ package types
2
+
3
+ #Timeout: {
4
+ connect: number
5
+ send: number
6
+ read: number
7
+ }
8
+
9
+ #Scheme: "http" | "https" | "grpc" | "grpcs" | "tcp" | "udp" | "tls"
10
+
11
+ #HttpStatusCodes: [...number & >=200 & <=599]
package/package.json ADDED
@@ -0,0 +1 @@
1
+ {"name":"@kumori.systems/components-apisix","files":["kumori.systems/components/apisix/@0.0.1"],"version":"0.0.1","keywords":["kpaas-module"],"kumori":{"domain":"kumori.systems","module":"components/apisix","cue":"0.4.2","version":[0,0,1],"dependencies":{"kumori.systems/kumori":{"target":"kumori.systems/kumori/@1.1.6","query":"1.1.6"},"kumori.systems/builtins/inbound":{"target":"kumori.systems/builtins/inbound/@1.3.0","query":"1.3.0"}},"sums":{"kumori.systems/kumori/@1.1.6":"jsXEYdYtlen2UgwDYbUCGWULqQIigC6HmkexXkyp/Mo=","kumori.systems/builtins/inbound/@1.3.0":"F3nipPPUCZ4YpsAh+Xnh9t8W1Tu98eX6SHRVM3BbRYs="},"spec":[1,0],"sum":"FaWirlbMnX9N0HuQHcQsr7P28vtad13OLvmriPaycgU="}}