Skip to content

Commit 068e98e

Browse files
Initial generated libs/docs/config
1 parent 4832bd4 commit 068e98e

File tree

82 files changed

+16594
-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.

82 files changed

+16594
-0
lines changed

config.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Server configurations
2+
server:
3+
enabled: true # enable the GRPC/HTTP/websocket server
4+
grpc_addr: 127.0.0.1:8881 #IP:port for GRPC
5+
http_addr: 127.0.0.1:8882 #IP:port for HTTP/websocket
6+
# Redis DB configurations
7+
sqlite3:
8+
username: admin
9+
password: supersecretpassword # this will get moved to environment variable or generated dynamically
10+
###### DO NOT EDIT THE BELOW SECTION#####
11+
# Services
12+
service_list:
13+
- service_type: federate
14+
active: true
15+
custom_record_number: 100000
16+
additional_service_data:
17+
- service_type: vpn
18+
active: true
19+
custom_record_number: 200000
20+
additional_service_data:
21+
- service_type: message
22+
active: true
23+
custom_record_number: 400000
24+
additional_service_data:
25+
- service_type: socket
26+
active: true
27+
custom_record_number: 500000
28+
additional_service_data:
29+
- service_type: sign
30+
active: true
31+
custom_record_number: 800000
32+
additional_service_data:
33+
###### DO NOT EDIT THE ABOVE SECTION#####
34+
35+
# Lightning
36+
lightning:
37+
lnd_node:
38+
ip: 127.0.0.1 #IP of your LND node
39+
port: 10001 #GRPC port of your LND node
40+
pub_key: asdfasdfasdf #get your LND pubkey with "lncli getinfo"
41+
tls_cert: /path/to/tls.cert
42+
admin_macaroon: /path/to/admin.macaroon
43+
federate:
44+
ttl: 31560000 #Federation auto delete in seconds
45+
imp_id: YOUR_IMP_ID #plain text string of your IMP node name
46+
vpn:
47+
price: 100 #per hour
48+
server_ip: 127.0.0.1 #public IP of your VPN server
49+
server_port: 51820 #port you want to listen on
50+
subnet: 10.0.0.0/24 #subnet you want to give to your clients. .1 == your server IP.
51+
server_pub_key: asdfasdfasdf #get this from your WG public key file
52+
allowed_ips: 0.0.0.0/0 #what subnets clients can reach. Default is entire world.
53+
binary_path: /usr/bin/wg #where your installed the "wg" command.
54+
dns: 8.8.8.8 #set your preferred DNS server here.
55+
socket:
56+
server_ip: 1.1.1.1 #public IP of your socket server

docs/custom_markdown.tmpl

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# Protocol Documentation
2+
<a name="top"></a>
3+
4+
<!--
5+
## Table of Contents
6+
{{range .Files}}
7+
{{$file_name := .Name}}- [{{.Name}}](#{{.Name}})
8+
{{- if .Messages }}
9+
{{range .Messages}} - [{{.LongName}}](#{{.FullName}})
10+
{{end}}
11+
{{- end -}}
12+
{{- if .Enums }}
13+
{{range .Enums}} - [{{.LongName}}](#{{.FullName}})
14+
{{end}}
15+
{{- end -}}
16+
{{- if .Extensions }}
17+
{{range .Extensions}} - [File-level Extensions](#{{$file_name}}-extensions)
18+
{{end}}
19+
{{- end -}}
20+
{{- if .Services }}
21+
{{range .Services}} - [{{.Name}}](#{{.FullName}})
22+
{{end}}
23+
{{- end -}}
24+
{{end}}
25+
- [Scalar Value Types](#scalar-value-types)
26+
27+
{{range .Files}}
28+
{{$file_name := .Name}}
29+
<a name="{{.Name}}"></a>
30+
<p align="right"><a href="#top">Top</a></p>
31+
32+
-->
33+
34+
## {{.Name}}
35+
{{.Description}}
36+
37+
38+
{{range .Services}}{{ $service := . }}
39+
<a name="{{.FullName}}"></a>
40+
41+
### {{.Name}}
42+
{{.Description}}
43+
44+
| Method Name | Request Type | Response Type | Description |
45+
| ----------- | ------------ | ------------- | ------------|
46+
{{range .Methods -}}
47+
| {{.Name}} | {{.RequestLongType}}{{if .RequestStreaming}} stream{{end}} | {{.ResponseLongType}}{{if .ResponseStreaming}} stream{{end}} | {{nobr .Description}} |
48+
{{end}}
49+
50+
51+
{{- if $service.MethodsWithOption "google.api.http" }}
52+
53+
#### HTTP bindings
54+
55+
| Method Name | Method | Pattern |
56+
| ----------- | ------ | ------- |
57+
{{- range $service.MethodsWithOption "google.api.http" }}{{ $method := . }}
58+
{{- range (.Option "google.api.http").Rules }}
59+
| `{{ $method.Name }}` | `{{ .Method }}` | `{{ .Pattern }}`
60+
{{- end -}}
61+
{{- end -}}
62+
{{ end -}}
63+
64+
65+
66+
{{end}} <!-- end services -->
67+
68+
69+
{{range .Messages}}
70+
<a name="{{.FullName}}"></a>
71+
72+
### {{.LongName}}
73+
{{.Description}}
74+
75+
{{if .HasFields}}
76+
| Field | Type | Label | Description |
77+
| ----- | ---- | ----- | ----------- |
78+
{{range .Fields -}}
79+
| {{.Name}} | {{.LongType}} | {{.Label}} | {{if (index .Options "deprecated"|default false)}}**Deprecated.** {{end}}{{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}} |
80+
{{end}}
81+
{{end}}
82+
83+
{{if .HasExtensions}}
84+
| Extension | Type | Base | Number | Description |
85+
| --------- | ---- | ---- | ------ | ----------- |
86+
{{range .Extensions -}}
87+
| {{.Name}} | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}} |
88+
{{end}}
89+
{{end}}
90+
91+
{{end}} <!-- end messages -->
92+
93+
{{range .Enums}}
94+
<a name="{{.FullName}}"></a>
95+
96+
### {{.LongName}}
97+
{{.Description}}
98+
99+
| Name | Number | Description |
100+
| ---- | ------ | ----------- |
101+
{{range .Values -}}
102+
| {{.Name}} | {{.Number}} | {{nobr .Description}} |
103+
{{end}}
104+
105+
{{end}} <!-- end enums -->
106+
107+
{{if .HasExtensions}}
108+
<a name="{{$file_name}}-extensions"></a>
109+
110+
### File-level Extensions
111+
| Extension | Type | Base | Number | Description |
112+
| --------- | ---- | ---- | ------ | ----------- |
113+
{{range .Extensions -}}
114+
| {{.Name}} | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{nobr .Description}}{{if .DefaultValue}} Default: `{{.DefaultValue}}`{{end}} |
115+
{{end}}
116+
{{end}} <!-- end HasExtensions -->
117+
118+
{{ end -}}
119+
120+
121+
## Scalar Value Types
122+
123+
| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
124+
| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- |
125+
{{range .Scalars -}}
126+
| <a name="{{.ProtoType}}" /> {{.ProtoType}} | {{.Notes}} | {{.CppType}} | {{.JavaType}} | {{.PythonType}} | {{.GoType}} | {{.CSharp}} | {{.PhpType}} | {{.RubyType}} |
127+
{{end}}

docs/federate.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Protocol Documentation
2+
<a name="top"></a>
3+
4+
<!--
5+
## Table of Contents
6+
7+
- [proto/imp/api/federate/federate.proto](#proto/imp/api/federate/federate.proto)
8+
- [LeaveFederationRequest](#federate.LeaveFederationRequest)
9+
- [LeaveFederationResponse](#federate.LeaveFederationResponse)
10+
- [RequestFederateRequest](#federate.RequestFederateRequest)
11+
- [RequestFederateResponse](#federate.RequestFederateResponse)
12+
13+
- [Federate](#federate.Federate)
14+
15+
- [Scalar Value Types](#scalar-value-types)
16+
17+
18+
19+
<a name="proto/imp/api/federate/federate.proto"></a>
20+
<p align="right"><a href="#top">Top</a></p>
21+
22+
-->
23+
24+
## proto/imp/api/federate/federate.proto
25+
Allows for p2p federation between Impervious nodes
26+
27+
28+
29+
<a name="federate.Federate"></a>
30+
31+
### Federate
32+
33+
34+
| Method Name | Request Type | Response Type | Description |
35+
| ----------- | ------------ | ------------- | ------------|
36+
| RequestFederate | RequestFederateRequest | RequestFederateResponse | RequestFederation performs the federation request to a specific peer. |
37+
| LeaveFederation | LeaveFederationRequest | LeaveFederationResponse | LeaveFederation performs the removal of a federated peer (upon message receipt). |
38+
39+
40+
#### HTTP bindings
41+
42+
| Method Name | Method | Pattern |
43+
| ----------- | ------ | ------- |
44+
| `RequestFederate` | `POST` | `/v1/federate/request`
45+
| `LeaveFederation` | `POST` | `/v1/federate/leave` <!-- end services -->
46+
47+
48+
49+
<a name="federate.LeaveFederationRequest"></a>
50+
51+
### LeaveFederationRequest
52+
Represents a request to leave a federation from a far end node
53+
54+
55+
| Field | Type | Label | Description |
56+
| ----- | ---- | ----- | ----------- |
57+
| pubkey | string | | The public key of the far end LND node running IMP |
58+
59+
60+
61+
62+
63+
64+
<a name="federate.LeaveFederationResponse"></a>
65+
66+
### LeaveFederationResponse
67+
Represents a response back from a Leave Federation Request
68+
69+
70+
| Field | Type | Label | Description |
71+
| ----- | ---- | ----- | ----------- |
72+
| id | string | | returned message ID |
73+
74+
75+
76+
77+
78+
79+
<a name="federate.RequestFederateRequest"></a>
80+
81+
### RequestFederateRequest
82+
Represents a request to federate with a far end node
83+
84+
85+
| Field | Type | Label | Description |
86+
| ----- | ---- | ----- | ----------- |
87+
| pubkey | string | | The public key of the far end LND node running IMP |
88+
89+
90+
91+
92+
93+
94+
<a name="federate.RequestFederateResponse"></a>
95+
96+
### RequestFederateResponse
97+
Represents a response back from a Federation Request
98+
99+
100+
| Field | Type | Label | Description |
101+
| ----- | ---- | ----- | ----------- |
102+
| id | string | | returned message ID |
103+
104+
105+
106+
107+
108+
<!-- end messages -->
109+
110+
<!-- end enums -->
111+
112+
<!-- end HasExtensions -->
113+
114+
## Scalar Value Types
115+
116+
| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
117+
| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- |
118+
| <a name="double" /> double | | double | double | float | float64 | double | float | Float |
119+
| <a name="float" /> float | | float | float | float | float32 | float | float | Float |
120+
| <a name="int32" /> int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
121+
| <a name="int64" /> int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
122+
| <a name="uint32" /> uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
123+
| <a name="uint64" /> uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
124+
| <a name="sint32" /> sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
125+
| <a name="sint64" /> sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum |
126+
| <a name="fixed32" /> fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) |
127+
| <a name="fixed64" /> fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum |
128+
| <a name="sfixed32" /> sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
129+
| <a name="sfixed64" /> sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
130+
| <a name="bool" /> bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass |
131+
| <a name="string" /> string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
132+
| <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |

0 commit comments

Comments
 (0)