Skip to content

Commit c93e250

Browse files
authored
feat: add SSE and WebSocket examples, upgrade Okapi version (#1)
1 parent 2298a5d commit c93e250

30 files changed

+3265
-692
lines changed

.env

Lines changed: 0 additions & 1 deletion
This file was deleted.

.env.example

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
JWT_SECRET=default-secret-key
2+
TLS_CA_PATH=
3+
TLS_CERT_PATH=
4+
TLS_KEY_PATH=
5+
TLS_REQUIRE_AUTH=false
6+
7+
ENABLE_DOCS=true
8+
PORT=8080
9+
TLS_PORT=8443

.github/workflows/lint.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
lint:
9+
name: Run on Ubuntu
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Clone the code
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Go
16+
uses: actions/setup-go@v5
17+
with:
18+
go-version: '~1.25'
19+
20+
- name: Run linter
21+
uses: golangci/golangci-lint-action@v7
22+
with:
23+
version: v2.8.0

.github/workflows/test.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches:
7+
- main
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Set up Go
15+
uses: actions/setup-go@v4
16+
with:
17+
go-version: '1.25.5'
18+
19+
- name: Test
20+
run: go test -v ./...

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
public
22
.DS_Store
33
/.history
4-
Makefile
4+
Makefile
5+
certs
6+
.env
7+
coverage.txt

.golangci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
version: "2"
2+
run:
3+
allow-parallel-runners: true
4+
linters:
5+
default: none
6+
enable:
7+
- copyloopvar
8+
- dupl
9+
- errcheck
10+
- ginkgolinter
11+
- goconst
12+
- gocyclo
13+
- govet
14+
- ineffassign
15+
- lll
16+
- misspell
17+
- nakedret
18+
- prealloc
19+
- revive
20+
- staticcheck
21+
- unconvert
22+
- unparam
23+
- unused
24+
settings:
25+
revive:
26+
rules:
27+
- name: comment-spacings
28+
exclusions:
29+
generated: lax
30+
rules:
31+
- linters:
32+
- dupl
33+
- lll
34+
path: /*
35+
paths:
36+
- third_party$
37+
- builtin$
38+
- examples$
39+
formatters:
40+
enable:
41+
- gofmt
42+
exclusions:
43+
generated: lax
44+
paths:
45+
- third_party$
46+
- builtin$
47+
- examples$

.idea/.gitignore

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

.idea/modules.xml

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

.idea/okapi-example.iml

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

.idea/vcs.xml

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

0 commit comments

Comments
 (0)