Skip to content

Commit 6b5951d

Browse files
authored
[#49]: feature: API refactoring
2 parents 8f4c6ad + c74c5c5 commit 6b5951d

File tree

77 files changed

+67257
-86
lines changed

Some content is hidden

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

77 files changed

+67257
-86
lines changed

.editorconfig

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = false
9+
max_line_length = 120
10+
tab_width = 4
11+
ij_continuation_indent_size = 8
12+
ij_formatter_off_tag = @formatter:off
13+
ij_formatter_on_tag = @formatter:on
14+
ij_formatter_tags_enabled = true
15+
ij_smart_tabs = false
16+
ij_visual_guides = none
17+
ij_wrap_on_typing = false
18+
19+
[*.proto]
20+
tab_width = 2
21+
indent_size = 2
22+
indent_style = tab
23+
insert_final_newline = true
24+
ij_continuation_indent_size = 4
25+
ij_protobuf_keep_blank_lines_in_code = 2
26+
ij_protobuf_keep_indents_on_empty_lines = false
27+
ij_protobuf_keep_line_breaks = true
28+
ij_protobuf_space_after_comma = true
29+
ij_protobuf_space_before_comma = false
30+
ij_protobuf_spaces_around_assignment_operators = true
31+
ij_protobuf_spaces_within_braces = false
32+
ij_protobuf_spaces_within_brackets = false
33+
34+
[{*.go,*.go2}]
35+
indent_style = tab
36+
ij_continuation_indent_size = 4
37+
ij_go_GROUP_CURRENT_PROJECT_IMPORTS = false
38+
ij_go_add_leading_space_to_comments = false
39+
ij_go_add_parentheses_for_single_import = true
40+
ij_go_call_parameters_new_line_after_left_paren = true
41+
ij_go_call_parameters_right_paren_on_new_line = true
42+
ij_go_call_parameters_wrap = off
43+
ij_go_fill_paragraph_width = 80
44+
ij_go_group_stdlib_imports = true
45+
ij_go_import_sorting = goimports
46+
ij_go_keep_indents_on_empty_lines = false
47+
ij_go_local_group_mode = project
48+
ij_go_move_all_imports_in_one_declaration = true
49+
ij_go_move_all_stdlib_imports_in_one_group = true
50+
ij_go_remove_redundant_import_aliases = false
51+
ij_go_run_go_fmt_on_reformat = true
52+
ij_go_use_back_quotes_for_imports = false
53+
ij_go_wrap_comp_lit = off
54+
ij_go_wrap_comp_lit_newline_after_lbrace = true
55+
ij_go_wrap_comp_lit_newline_before_rbrace = true
56+
ij_go_wrap_func_params = off
57+
ij_go_wrap_func_params_newline_after_lparen = true
58+
ij_go_wrap_func_params_newline_before_rparen = true
59+
ij_go_wrap_func_result = off
60+
ij_go_wrap_func_result_newline_after_lparen = true
61+
ij_go_wrap_func_result_newline_before_rparen = true
62+
63+
[{*.pb,*.textproto}]
64+
indent_size = 2
65+
tab_width = 2
66+
ij_continuation_indent_size = 4
67+
ij_prototext_keep_blank_lines_in_code = 2
68+
ij_prototext_keep_indents_on_empty_lines = false
69+
ij_prototext_keep_line_breaks = true
70+
ij_prototext_space_after_colon = true
71+
ij_prototext_space_after_comma = true
72+
ij_prototext_space_before_colon = false
73+
ij_prototext_space_before_comma = false
74+
ij_prototext_spaces_within_braces = true
75+
ij_prototext_spaces_within_brackets = false

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ updates:
2222
- package-ecosystem: "github-actions"
2323
directory: "/"
2424
schedule:
25-
interval: weekly
25+
interval: daily
2626
reviewers:
2727
- "rustatian"
2828
assignees:

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@
1414
# Dependency directories (remove the comment below to include it)
1515
# vendor/
1616
.idea
17-
build

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "third_party/api"]
2+
path = third_party/api
3+
url = https://github.com/temporalio/api

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Disable cgo by default.
2+
CGO_ENABLED ?= 0
3+
4+
GOBIN := $(if $(shell go env GOBIN),$(shell go env GOBIN),$(GOPATH)/bin)
5+
PATH := $(GOBIN):$(PATH)
6+
7+
generate:
8+
buf generate
9+
install:
10+
@go install github.com/bufbuild/buf/cmd/buf@latest

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</a>
88
</p>
99
<p align="center">
10-
<a href="https://packagist.org/packages/spiral/roadrunner"><img src="https://poser.pugx.org/spiral/roadrunner/version"></a>
10+
<a href="https://packagist.org/packages/roadrunner-server/roadrunner"><img src="https://poser.pugx.org/roadrunner-server/roadrunner/version"></a>
1111
<a href="https://pkg.go.dev/github.com/roadrunner-server/api/v4?tab=doc"><img src="https://godoc.org/github.com/roadrunner-server/api/v4?status.svg"></a>
1212
<a href="https://github.com/roadrunner-server/api/actions"><img src="https://github.com/roadrunner-server/api/workflows/Linters/badge.svg" alt=""></a>
1313
<a href="https://goreportcard.com/report/github.com/roadrunner-server/api"><img src="https://goreportcard.com/badge/github.com/roadrunner-server/api"></a>
@@ -16,23 +16,25 @@
1616

1717
# RoadRunner API
1818

19-
## ALL protobuf API located here: [Buf](https://buf.build/roadrunner-server/api)
2019
To install and use generated packages:
2120
```bash
22-
go get go.buf.build/protocolbuffers/go/roadrunner-server/api
21+
go get github.com/roadrunner-server/api/v4/build/<API_NAME>/v1
2322
```
2423

2524
The Proto API is used for external integrations, mostly for RPC or as internal communications. For example:
2625
```go
2726
package foo
2827

2928
import (
30-
jobsv1 "go.buf.build/protocolbuffers/go/roadrunner-server/api"
29+
jobsv1 "github.com/roadrunner-server/api/v4/build/jobs/v1"
3130
)
3231

3332
func Push(in *jobsv1.PushRequest, out *jobsv1.Empty) error {
3433
return nil
3534
}
3635
```
37-
38-
- You can also navigate to the [`DOCS`](https://buf.build/roadrunner-server/api/docs) tab to inspect the full API.
36+
37+
# Building API
38+
39+
- Install buf: `go install github.com/bufbuild/buf/cmd/buf@latest`.
40+
- In the repository root run: `buf generate --debug`

buf.gen.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
version: v1
22

33
plugins:
4-
- name: go
4+
- plugin: buf.build/protocolbuffers/go:v1.31.0
55
opt:
66
- paths=source_relative
77
out: build
88

9-
- name: go-grpc
9+
- plugin: buf.build/grpc/go:v1.3.0
1010
out: build
1111
opt:
12-
- paths=source_relative
13-
- require_unimplemented_servers=false
12+
- paths=source_relative
13+
- require_unimplemented_servers=false

buf.lock

Lines changed: 0 additions & 7 deletions
This file was deleted.

buf.work.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
version: v1
2+
directories:
3+
- proto
4+
- third_party/api

0 commit comments

Comments
 (0)