Skip to content

Commit

Permalink
go mod tidy, scrap yeet, clean up config file, bump quickstart, tf co…
Browse files Browse the repository at this point in the history
…nfig templates, etc (#510)
  • Loading branch information
jakthom authored Apr 15, 2023
1 parent b20a36e commit 6455af6
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 66 deletions.
4 changes: 3 additions & 1 deletion deploy/terraform/aws/lambda/config.yml.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ middleware:
maxAge: 86400
requestLogger:
enabled: false
yeet:
auth:
enabled: false
tokens:
- ""

inputs:
snowplow:
Expand Down
4 changes: 3 additions & 1 deletion deploy/terraform/gcp/cloud_run/config.yml.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ middleware:
maxAge: 86400
requestLogger:
enabled: false
yeet:
auth:
enabled: false
tokens:
- ""

inputs:
snowplow:
Expand Down
2 changes: 0 additions & 2 deletions examples/devel/buz/simple.conf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ middleware:
- YnV6OmJ1enp6enp6eg== # basic
- eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJidXoiLCJpYXQiOjE2ODE1MDg4MTMsImV4cCI6MTcxMzA0NDgxMywiYXVkIjoiYnV6LmRldiIsInN1YiI6ImJ1ekBidXouZGV2Iiwic3lzdGVtIjoiYnV6Iiwicm9sZSI6ImJ1eiIsInRvcGljIjoiYnV6In0.6I1iRZeYlw_lNWQr1EMJf3VcEMoWd9kPtmxIUMvUST0 # jwt
- buzkKLfwI2bgKSAO6maJVol51rUsmM3bkdHzfZ5EgNyo9tyHPlU3zfA9Qacj7KVi # fake api key
yeet:
enabled: false

inputs:
snowplow:
Expand Down
4 changes: 3 additions & 1 deletion examples/quickstart/buz/quickstart.conf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ middleware:
maxAge: 86400
requestLogger:
enabled: false
yeet:
auth:
enabled: false
tokens:
- "YnV6OmJ1enp6enp6eg=="

inputs:
snowplow:
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ require (
github.com/aws/aws-sdk-go-v2/service/s3 v1.24.1
github.com/coocood/freecache v1.2.0
github.com/elastic/go-elasticsearch/v8 v8.1.0
github.com/gin-contrib/pprof v1.4.0
github.com/gin-contrib/timeout v0.0.3
github.com/gin-gonic/gin v1.8.1
github.com/go-sql-driver/mysql v1.6.0
github.com/google/uuid v1.3.0
github.com/jeremywohl/flatten/v2 v2.0.0-20211013061545-07e4a09fb8e4
github.com/minio/minio-go/v7 v7.0.34
github.com/nats-io/nats.go v1.15.0
github.com/qri-io/jsonschema v0.2.1
Expand Down Expand Up @@ -62,7 +62,6 @@ require (
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/elastic/elastic-transport-go/v8 v8.1.0 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/gin-contrib/pprof v1.4.0 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
Expand Down
8 changes: 0 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,6 @@ github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm
github.com/gin-contrib/timeout v0.0.3 h1:ysZQ7kChgqlzBkuLgwTTDjTPP2uqdI68XxRyqIFK68g=
github.com/gin-contrib/timeout v0.0.3/go.mod h1:F3fjkmFc4I1QdF7MyVwtO6ZkPueBckNoiOVpU73HGgU=
github.com/gin-gonic/gin v1.7.2/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY=
github.com/gin-gonic/gin v1.7.7 h1:3DoBmSbJbZAWqXJC3SLjAPfutPJJRN1U5pALB7EeTTs=
github.com/gin-gonic/gin v1.7.7/go.mod h1:axIBovoeJpVj8S3BwE0uPMTeReE4+AfFtqpqaZ1qq1U=
github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8=
github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
Expand Down Expand Up @@ -368,8 +366,6 @@ github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/U
github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg=
github.com/jcmturner/gokrb5/v8 v8.4.2/go.mod h1:sb+Xq/fTY5yktf/VxLsE3wlfPqQjp0aWNYyvBVK62bc=
github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc=
github.com/jeremywohl/flatten/v2 v2.0.0-20211013061545-07e4a09fb8e4 h1:eA9wi6ZzpIRobvXkn/S2Lyw1hr2pc71zxzOPl7Xjs4w=
github.com/jeremywohl/flatten/v2 v2.0.0-20211013061545-07e4a09fb8e4/go.mod h1:s9g9Dfls+aEgucKXKW+i8MRZuLXT2MrD/WjYpMnWfOw=
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
Expand Down Expand Up @@ -552,11 +548,8 @@ github.com/twmb/franz-go/pkg/kmsg v0.0.0-20220301200403-ffaee5b878c6/go.mod h1:S
github.com/twmb/go-rbtree v1.0.0 h1:KxN7dXJ8XaZ4cvmHV1qqXTshxX3EBvX/toG5+UR49Mg=
github.com/twmb/go-rbtree v1.0.0/go.mod h1:UlIAI8gu3KRPkXSobZnmJfVwCJgEhD/liWzT5ppzIyc=
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
github.com/ugorji/go v1.2.6/go.mod h1:anCg0y61KIhDlPZmnH+so+RQbysYVyDko0IMgJv0Nn0=
github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M=
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
github.com/ugorji/go/codec v1.2.6 h1:7kbGefxLoDBuYXOms4yD7223OpNMMPNPZxXk5TvFcyQ=
github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxWFFpvxTw=
github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0=
github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY=
github.com/ulule/limiter/v3 v3.9.0 h1:ebASTkd6QNNUGhuDrWqImMpsg9GtItgNgxF3nKao58Q=
Expand Down Expand Up @@ -1033,7 +1026,6 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
Expand Down
5 changes: 0 additions & 5 deletions pkg/config/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ type Middleware struct {
Cors `json:"cors"`
RequestLogger `json:"requestLogger"`
Auth `json:"auth"`
Yeet `json:"yeet"`
}

type Timeout struct {
Expand Down Expand Up @@ -56,7 +55,3 @@ type Auth struct {
Enabled bool `json:"enabled"`
Tokens []string `json:"-"`
}

type Yeet struct {
Enabled bool `json:"enabled"`
}
22 changes: 0 additions & 22 deletions pkg/middleware/yeet.go

This file was deleted.

9 changes: 0 additions & 9 deletions pkg/middleware/yeet_test.go

This file was deleted.

55 changes: 40 additions & 15 deletions schemas/io.silverton/buz/internal/config/app/v1.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@
"default": "test.silverton.io",
"description": "The collector domain"
},
"enableConfigRoute" : {
"enableConfigRoute": {
"type": "boolean",
"default": false,
"description": "Whether or not to enable the config route"
},
"serverless" : {
"serverless": {
"type": "boolean",
"default": false,
"description": "Whether or not to run buz in serverless mode"
Expand Down Expand Up @@ -189,7 +189,10 @@
}
},
"additionalProperties": false,
"required": ["cookie", "fallback"]
"required": [
"cookie",
"fallback"
]
},
"cors": {
"type": "object",
Expand Down Expand Up @@ -262,14 +265,24 @@
"enabled"
]
},
"yeet": {
"auth": {
"type": "object",
"description": "Yeet configuration",
"description": "Auth middleware configuration",
"properties": {
"enabled": {
"type": "boolean",
"default": "false",
"description": "Whether or not to activate the yeet middleware"
"default": "true",
"description": "Whether or not to activate auth middleware"
},
"tokens": {
"type": "array",
"default": [
"YnV6OmJ1enp6enp6eg=="
],
"description": "A list of tokens to allow via auth middleware",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
Expand All @@ -284,7 +297,7 @@
"identity",
"cors",
"requestLogger",
"yeet"
"auth"
]
},
"inputs": {
Expand Down Expand Up @@ -324,7 +337,7 @@
"type": "string",
"default": "/plw/r",
"description": "The path by which to process redirect-based events"
}
}
},
"additionalProperties": false,
"required": [
Expand Down Expand Up @@ -459,7 +472,10 @@
}
},
"additionalProperties": false,
"required": ["enabled", "path"]
"required": [
"enabled",
"path"
]
}
},
"additionalProperties": false,
Expand Down Expand Up @@ -739,7 +755,7 @@
},
"additionalProperties": false,
"required": [
"enabled",
"enabled",
"path"
]
},
Expand Down Expand Up @@ -879,7 +895,10 @@
"type": "string",
"description": "The region",
"default": "standard",
"enum": ["standard", "eu"]
"enum": [
"standard",
"eu"
]
},
"defaultOutput": {
"type": "string",
Expand Down Expand Up @@ -915,23 +934,29 @@
"const": "kafka"
}
},
"required": ["brokers"]
"required": [
"brokers"
]
},
{
"properties": {
"type": {
"const": "redpanda"
}
},
"required": ["brokers"]
"required": [
"brokers"
]
},
{
"properties": {
"type": {
"const": "pubsub"
}
},
"required": ["project"]
"required": [
"project"
]
},
{
"properties": {
Expand Down

0 comments on commit 6455af6

Please sign in to comment.