Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0d8e10d
!feat: Replace engine rmap with engine playmon
romshark Feb 5, 2023
a3e66c6
docs: Improve package pathscan documentation
romshark Feb 5, 2023
3b08b24
fix: Fix package union
romshark Feb 5, 2023
cb9c680
feat: Add schema support to config
romshark Feb 5, 2023
90f538c
feat: Improve config error reporting
romshark Feb 5, 2023
e5a0130
refactor: Cleanup gqlparse package API
romshark Feb 8, 2023
4cd8f44
feat: Introduce pathmatch and pathscan
romshark Feb 9, 2023
ac052f9
fix: Fix path scanner
romshark Feb 13, 2023
a171cb2
fix: Fix pathmatch test
romshark Feb 13, 2023
2ef24e5
fix: Fix variable value fetching
romshark Feb 17, 2023
f700570
fix: Wrap fragment inlines when necessary
romshark Feb 20, 2023
a638035
fix: Fix bugs and adapt to new engine interface
romshark Feb 21, 2023
2ebf67f
feat: Properly stringify placeholder tokens
romshark Feb 22, 2023
f7d0135
fix: Read GraphQL variables in engine
romshark Feb 22, 2023
d00826e
fix: Accept enum values as variable default value
romshark Feb 23, 2023
aa9081d
feat: Check types in gqlscan in schema-aware mode
romshark Mar 2, 2023
8f7e788
test: Add test
romshark Mar 2, 2023
ae336ce
test: Name individual tests
romshark Mar 2, 2023
ab3a49c
feat: Check for undefined arguments
romshark Mar 3, 2023
8d75d7e
fix: Fix isWrongType
romshark Mar 4, 2023
13e2a1c
refactor: Remove unused code
romshark Mar 4, 2023
0c0877b
ci: Fix goreleaser config
romshark Mar 4, 2023
bd017ce
refactor: Remove LVS
romshark Mar 4, 2023
5718aba
ci: Fix goreleaser configuration
romshark Mar 4, 2023
eb69360
!feat: return multiple match results in GQL API
romshark Mar 4, 2023
fdf79e3
refactor: Restructure packages
romshark Mar 4, 2023
e5e9237
feat: Add support for `max` set
romshark Mar 6, 2023
5e97546
fix: Fix max combinator
romshark Mar 9, 2023
c87bef2
refactor: Remove obsolete code
romshark Mar 9, 2023
c9392fd
refactor: Restructure engine tests
romshark Mar 10, 2023
8baa980
fix: Fix type name search for array types
romshark Mar 11, 2023
72cc365
test: Add test
romshark Mar 11, 2023
f2377ec
fix: Fix type check after fragment spread
romshark Mar 11, 2023
bac661a
test: Add tests
romshark Mar 11, 2023
0098586
fix: Upgrade GQT to v4.0.12
romshark Mar 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 6 additions & 14 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,27 @@ builds:
gobinary: garble
env:
- CGO_ENABLED=0
ldflags:
- -X 'github.com/graph-guard/ggproxy/lvs.PublicKey={{ .Env.PUB_KEY }}'
goos:
- linux
- darwin
goarch:
- 386
- amd64
- arm
- arm64
- "386"
- "amd64"
- "arm"
- "arm64"
archives:
- id: ggproxy
name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}"
replacements:
386: i386
files:
- src: assets/etc/
info:
owner: root
group: ggproxy
mode: 0664
"386": "i386"
checksum:
name_template: "{{ .ProjectName }}-{{ .Tag }}-checksums.txt"
snapshot:
name_template: "{{ .Tag }}"
release:
draft: false
replace_existing_draft: true
prerelease: true
prerelease: "true" # Don't remove the quotes, it's supposed to be a string, not a boolean.
mode: append
header: |
**[CHANGELOG.md](https://github.com/graph-guard/ggproxy/blob/ci/CHANGELOG.md#{{ .Env.COMPACT_TAG }})**
Expand Down
4 changes: 0 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
### Fix

* Fix comparison of byte slices
* Fix lvs failure on empty license
* Reset segmented array index counter
* Accept enum values
* Fix broken pipe handling
Expand Down Expand Up @@ -77,8 +76,6 @@
* Add 'null' support
* Add processing of enums
* Prepare to Beta release
* Use LVS validation and rename 'licence' to 'license'
* Add licence key environment variable
* Add support for basic auth in API server
* Add service and template statistics
* Add ggproxy GraphQL API
Expand Down Expand Up @@ -107,7 +104,6 @@

### Refactor

* Refactor LVS ([#4](https://github.com/graph-guard/ggproxy/issues/4))
* Get rid of the matcher interface
* Simplify code

Expand Down
12 changes: 0 additions & 12 deletions assets/etc/ggproxy/all-services/a.yml

This file was deleted.

20 changes: 0 additions & 20 deletions assets/etc/ggproxy/all-templates/a/example_template.gqt

This file was deleted.

25 changes: 0 additions & 25 deletions assets/etc/ggproxy/config.yml

This file was deleted.

1 change: 0 additions & 1 deletion assets/etc/ggproxy/enabled-services/a.yml

This file was deleted.

This file was deleted.

12 changes: 2 additions & 10 deletions cmd/ggproxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,12 @@ import (
"fmt"
"os"

"github.com/graph-guard/ggproxy/cli"
"github.com/graph-guard/ggproxy/lvs"
"github.com/graph-guard/ggproxy/pkg/cli"
)

func main() {
w := os.Stdout
switch c := cli.Parse(
w,
os.Args,
func(licenseToken string) error {
_, err := lvs.ValidateLicenseToken(licenseToken)
return err
},
).(type) {
switch c := cli.Parse(w, os.Args).(type) {
case cli.CommandServe:
serve(w, c)
case cli.CommandReload:
Expand Down
11 changes: 9 additions & 2 deletions cmd/ggproxy/read_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@ package main
import (
"fmt"
"io"
"os"
"path/filepath"

"github.com/graph-guard/ggproxy/config"
"github.com/graph-guard/ggproxy/pkg/config"
)

func ReadConfig(
w io.Writer,
configPath string,
) *config.Config {
conf, err := config.New(configPath)
basePath, fileName := basePathAndFileName(configPath)
conf, err := config.Read(os.DirFS(basePath), basePath, fileName)
if err != nil {
fmt.Fprintf(w, "reading config: %s\n", err)
return nil
Expand All @@ -34,3 +37,7 @@ func ReadConfig(

return conf
}

func basePathAndFileName(path string) (basePath, fileName string) {
return filepath.Base(path), path[:len(path)-len(filepath.Base(path))]
}
2 changes: 1 addition & 1 deletion cmd/ggproxy/reload_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"io"

"github.com/graph-guard/ggproxy/cli"
"github.com/graph-guard/ggproxy/pkg/cli"
)

func reload(w io.Writer, c cli.CommandReload) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/ggproxy/reload_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"io"

"github.com/graph-guard/ggproxy/cli"
"github.com/graph-guard/ggproxy/pkg/cli"
)

func reload(w io.Writer, c cli.CommandReload) {
Expand Down
4 changes: 2 additions & 2 deletions cmd/ggproxy/serve_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"sync"
"time"

"github.com/graph-guard/ggproxy/cli"
"github.com/graph-guard/ggproxy/server"
"github.com/graph-guard/ggproxy/pkg/cli"
"github.com/graph-guard/ggproxy/pkg/server"
"github.com/phuslu/log"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/ggproxy/serve_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"io"

"github.com/graph-guard/ggproxy/cli"
"github.com/graph-guard/ggproxy/pkg/cli"
)

func serve(w io.Writer, c cli.CommandServe) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/ggproxy/stop_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"io"

"github.com/graph-guard/ggproxy/cli"
"github.com/graph-guard/ggproxy/pkg/cli"
)

func stop(w io.Writer, c cli.CommandStop) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/ggproxy/stop_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"io"

"github.com/graph-guard/ggproxy/cli"
"github.com/graph-guard/ggproxy/pkg/cli"
)

func stop(w io.Writer, c cli.CommandStop) {
Expand Down
Loading