Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/codecov/codecov-ac…
Browse files Browse the repository at this point in the history
…tion-5.0.7
  • Loading branch information
duedares-rvj authored Nov 28, 2024
2 parents 53efa94 + a74730f commit 4f0d02c
Show file tree
Hide file tree
Showing 35 changed files with 456 additions and 450 deletions.
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ require (
github.com/PuerkitoBio/rehttp v1.4.0
github.com/google/uuid v1.6.0
github.com/joho/godotenv v1.5.1
github.com/lestrrat-go/jwx/v2 v2.1.2
github.com/stretchr/testify v1.9.0
github.com/lestrrat-go/jwx/v2 v2.1.3
github.com/stretchr/testify v1.10.0
go.devnw.com/structs v1.0.0
golang.org/x/oauth2 v0.23.0
golang.org/x/oauth2 v0.24.0
gopkg.in/dnaeon/go-vcr.v3 v3.2.0
)

Expand All @@ -25,8 +25,8 @@ require (
github.com/lestrrat-go/option v1.0.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/segmentio/asm v1.2.0 // indirect
golang.org/x/crypto v0.28.0 // indirect
golang.org/x/crypto v0.29.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/sys v0.27.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
20 changes: 10 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ github.com/lestrrat-go/httprc v1.0.6 h1:qgmgIRhpvBqexMJjA/PmwSvhNk679oqD1RbovdCG
github.com/lestrrat-go/httprc v1.0.6/go.mod h1:mwwz3JMTPBjHUkkDv/IGJ39aALInZLrhBp0X7KGUZlo=
github.com/lestrrat-go/iter v1.0.2 h1:gMXo1q4c2pHmC3dn8LzRhJfP1ceCbgSiT9lUydIzltI=
github.com/lestrrat-go/iter v1.0.2/go.mod h1:Momfcq3AnRlRjI5b5O8/G5/BvpzrhoFTZcn06fEOPt4=
github.com/lestrrat-go/jwx/v2 v2.1.2 h1:6poete4MPsO8+LAEVhpdrNI4Xp2xdiafgl2RD89moBc=
github.com/lestrrat-go/jwx/v2 v2.1.2/go.mod h1:pO+Gz9whn7MPdbsqSJzG8TlEpMZCwQDXnFJ+zsUVh8Y=
github.com/lestrrat-go/jwx/v2 v2.1.3 h1:Ud4lb2QuxRClYAmRleF50KrbKIoM1TddXgBrneT5/Jo=
github.com/lestrrat-go/jwx/v2 v2.1.3/go.mod h1:q6uFgbgZfEmQrfJfrCo90QcQOcXFMfbI/fO0NqRtvZo=
github.com/lestrrat-go/option v1.0.1 h1:oAzP2fvZGQKWkvHa1/SAcFolBEca1oN+mQ7eooNBEYU=
github.com/lestrrat-go/option v1.0.1/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand All @@ -38,21 +38,21 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
go.devnw.com/structs v1.0.0 h1:FFkBoBOkapCdxFEIkpOZRmMOMr9b9hxjKTD3bJYl9lk=
go.devnw.com/structs v1.0.0/go.mod h1:wHBkdQpNeazdQHszJ2sxwVEpd8zGTEsKkeywDLGbrmg=
golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw=
golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U=
golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ=
golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg=
golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs=
golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE=
golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s=
golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
Expand Down
3 changes: 3 additions & 0 deletions management/log_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ type LogStream struct {
// "eventgrid", "datadog", "splunk", "sumo", "mixpanel", "segment.
Type *string `json:"type,omitempty"`

// True for priority log streams, false for non-priority
IsPriority *bool `json:"isPriority,omitempty"`

// The status of the log-stream. Can be one of "active", "paused", or "suspended".
Status *string `json:"status,omitempty"`

Expand Down
35 changes: 21 additions & 14 deletions management/log_stream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ var logStreamTestCases = []logStreamTestCase{
{
name: "AmazonEventBridge LogStream",
logStream: LogStream{
Name: auth0.Stringf("Test-LogStream-%d", time.Now().Unix()),
Type: auth0.String(LogStreamTypeAmazonEventBridge),
Name: auth0.Stringf("Test-LogStream-%d", time.Now().Unix()),
Type: auth0.String(LogStreamTypeAmazonEventBridge),
IsPriority: auth0.Bool(true),
Sink: &LogStreamSinkAmazonEventBridge{
AccountID: auth0.String("999999999999"),
Region: auth0.String("us-west-2"),
Expand All @@ -39,8 +40,9 @@ var logStreamTestCases = []logStreamTestCase{
{
name: "HTTP LogStream",
logStream: LogStream{
Name: auth0.Stringf("Test-LogStream-%d", time.Now().Unix()),
Type: auth0.String(LogStreamTypeHTTP),
Name: auth0.Stringf("Test-LogStream-%d", time.Now().Unix()),
Type: auth0.String(LogStreamTypeHTTP),
IsPriority: auth0.Bool(false),
Sink: &LogStreamSinkHTTP{
Endpoint: auth0.String("https://example.com/logs"),
Authorization: auth0.String("Bearer f2368bbe77074527a37be2fdd5b92bad"),
Expand All @@ -52,8 +54,9 @@ var logStreamTestCases = []logStreamTestCase{
{
name: "DataDog LogStream",
logStream: LogStream{
Name: auth0.Stringf("Test-LogStream-%d", time.Now().Unix()),
Type: auth0.String(LogStreamTypeDatadog),
Name: auth0.Stringf("Test-LogStream-%d", time.Now().Unix()),
Type: auth0.String(LogStreamTypeDatadog),
IsPriority: auth0.Bool(true),
Sink: &LogStreamSinkDatadog{
APIKey: auth0.String("121233123455"),
Region: auth0.String("us"),
Expand All @@ -63,8 +66,9 @@ var logStreamTestCases = []logStreamTestCase{
{
name: "Segment LogStream",
logStream: LogStream{
Name: auth0.Stringf("Test-LogStream-%d", time.Now().Unix()),
Type: auth0.String(LogStreamTypeSegment),
Name: auth0.Stringf("Test-LogStream-%d", time.Now().Unix()),
Type: auth0.String(LogStreamTypeSegment),
IsPriority: auth0.Bool(true),
Sink: &LogStreamSinkSegment{
WriteKey: auth0.String("121233123455"),
},
Expand All @@ -73,8 +77,9 @@ var logStreamTestCases = []logStreamTestCase{
{
name: "Splunk LogStream",
logStream: LogStream{
Name: auth0.Stringf("Test-LogStream-%d", time.Now().Unix()),
Type: auth0.String(LogStreamTypeSplunk),
Name: auth0.Stringf("Test-LogStream-%d", time.Now().Unix()),
Type: auth0.String(LogStreamTypeSplunk),
IsPriority: auth0.Bool(true),
Sink: &LogStreamSinkSplunk{
Domain: auth0.String("demo.splunk.com"),
Port: auth0.String("8080"),
Expand All @@ -86,8 +91,9 @@ var logStreamTestCases = []logStreamTestCase{
{
name: "Sumo LogStream",
logStream: LogStream{
Name: auth0.Stringf("Test-LogStream-%d", time.Now().Unix()),
Type: auth0.String(LogStreamTypeSumo),
Name: auth0.Stringf("Test-LogStream-%d", time.Now().Unix()),
Type: auth0.String(LogStreamTypeSumo),
IsPriority: auth0.Bool(true),
Sink: &LogStreamSinkSumo{
SourceAddress: auth0.String("https://example.com"),
},
Expand All @@ -96,8 +102,9 @@ var logStreamTestCases = []logStreamTestCase{
{
name: "Mixpanel LogStream",
logStream: LogStream{
Name: auth0.Stringf("Test-LogStream-%d", time.Now().Unix()),
Type: auth0.String(LogStreamTypeMixpanel),
Name: auth0.Stringf("Test-LogStream-%d", time.Now().Unix()),
Type: auth0.String(LogStreamTypeMixpanel),
IsPriority: auth0.Bool(false),
Sink: &LogStreamSinkMixpanel{
Region: auth0.String("us"),
ProjectID: auth0.String("123456789"),
Expand Down
8 changes: 8 additions & 0 deletions management/management.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions management/management.gen_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ interactions:
proto: HTTP/1.1
proto_major: 1
proto_minor: 1
content_length: 121
content_length: 139
transfer_encoding: []
trailer: {}
host: go-auth0-dev.eu.auth0.com
remote_addr: ""
request_uri: ""
body: |
{"name":"Test-LogStream-1674668511","type":"eventbridge","sink":{"awsAccountId":"999999999999","awsRegion":"us-west-2"}}
{"name":"Test-LogStream-1732609495","type":"eventbridge","isPriority":true,"sink":{"awsAccountId":"999999999999","awsRegion":"us-west-2"}}
form: {}
headers:
Content-Type:
- application/json
User-Agent:
- Go-Auth0-SDK/latest
- Go-Auth0/1.11.2
url: https://go-auth0-dev.eu.auth0.com/api/v2/log-streams
method: POST
response:
Expand All @@ -30,13 +30,13 @@ interactions:
trailer: {}
content_length: -1
uncompressed: true
body: '{"id":"lst_0000000000011620","name":"Test-LogStream-1674668511","type":"eventbridge","status":"active","sink":{"awsAccountId":"999999999999","awsRegion":"us-west-2","awsPartnerEventSource":"aws.partner/auth0.com/go-auth0-dev.eu.auth0.com-ad17dd8c-ece0-4f9e-983f-798b38768005/auth0.logs"}}'
body: '{"id":"lst_0000000000002059","name":"Test-LogStream-1732609495","type":"eventbridge","status":"active","sink":{"awsAccountId":"999999999999","awsRegion":"us-west-2","awsPartnerEventSource":"aws.partner/auth0.com/go-auth0-dev.eu.auth0.com-879cfb72-351f-4e66-82a7-2b570ce6e963/auth0.logs"},"filters":[{"type":"category","name":"security"}],"isPriority":true}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 200 OK
code: 200
duration: 846.665417ms
duration: 1.388066916s
- id: 1
request:
proto: HTTP/1.1
Expand All @@ -54,8 +54,8 @@ interactions:
Content-Type:
- application/json
User-Agent:
- Go-Auth0-SDK/latest
url: https://go-auth0-dev.eu.auth0.com/api/v2/log-streams/lst_0000000000011620
- Go-Auth0/1.11.2
url: https://go-auth0-dev.eu.auth0.com/api/v2/log-streams/lst_0000000000002059
method: DELETE
response:
proto: HTTP/2.0
Expand All @@ -71,4 +71,4 @@ interactions:
- application/json; charset=utf-8
status: 204 No Content
code: 204
duration: 762.066916ms
duration: 446.801125ms
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ interactions:
proto: HTTP/1.1
proto_major: 1
proto_minor: 1
content_length: 115
content_length: 133
transfer_encoding: []
trailer: {}
host: go-auth0-dev.eu.auth0.com
remote_addr: ""
request_uri: ""
body: |
{"name":"Test-LogStream-1674668511","type":"datadog","sink":{"datadogRegion":"us","datadogApiKey":"121233123455"}}
{"name":"Test-LogStream-1732609495","type":"datadog","isPriority":true,"sink":{"datadogRegion":"us","datadogApiKey":"121233123455"}}
form: {}
headers:
Content-Type:
- application/json
User-Agent:
- Go-Auth0-SDK/latest
- Go-Auth0/1.11.2
url: https://go-auth0-dev.eu.auth0.com/api/v2/log-streams
method: POST
response:
Expand All @@ -30,13 +30,13 @@ interactions:
trailer: {}
content_length: -1
uncompressed: true
body: '{"id":"lst_0000000000011622","name":"Test-LogStream-1674668511","type":"datadog","status":"active","sink":{"datadogApiKey":"121233123455","datadogRegion":"us"}}'
body: '{"id":"lst_0000000000002061","name":"Test-LogStream-1732609495","type":"datadog","status":"active","sink":{"datadogApiKey":"121233123455","datadogRegion":"us"},"filters":[{"type":"category","name":"security"}],"isPriority":true}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 200 OK
code: 200
duration: 132.212416ms
duration: 417.121583ms
- id: 1
request:
proto: HTTP/1.1
Expand All @@ -54,8 +54,8 @@ interactions:
Content-Type:
- application/json
User-Agent:
- Go-Auth0-SDK/latest
url: https://go-auth0-dev.eu.auth0.com/api/v2/log-streams/lst_0000000000011622
- Go-Auth0/1.11.2
url: https://go-auth0-dev.eu.auth0.com/api/v2/log-streams/lst_0000000000002061
method: DELETE
response:
proto: HTTP/2.0
Expand All @@ -71,4 +71,4 @@ interactions:
- application/json; charset=utf-8
status: 204 No Content
code: 204
duration: 100.031167ms
duration: 384.841708ms
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ interactions:
proto: HTTP/1.1
proto_major: 1
proto_minor: 1
content_length: 233
content_length: 252
transfer_encoding: []
trailer: {}
host: go-auth0-dev.eu.auth0.com
remote_addr: ""
request_uri: ""
body: |
{"name":"Test-LogStream-1674668511","type":"http","sink":{"httpContentFormat":"JSONLINES","httpContentType":"application/json","httpEndpoint":"https://example.com/logs","httpAuthorization":"Bearer f2368bbe77074527a37be2fdd5b92bad"}}
{"name":"Test-LogStream-1732609495","type":"http","isPriority":false,"sink":{"httpContentFormat":"JSONLINES","httpContentType":"application/json","httpEndpoint":"https://example.com/logs","httpAuthorization":"Bearer f2368bbe77074527a37be2fdd5b92bad"}}
form: {}
headers:
Content-Type:
- application/json
User-Agent:
- Go-Auth0-SDK/latest
- Go-Auth0/1.11.2
url: https://go-auth0-dev.eu.auth0.com/api/v2/log-streams
method: POST
response:
Expand All @@ -30,13 +30,13 @@ interactions:
trailer: {}
content_length: -1
uncompressed: true
body: '{"id":"lst_0000000000011621","name":"Test-LogStream-1674668511","type":"http","status":"active","sink":{"httpAuthorization":"Bearer f2368bbe77074527a37be2fdd5b92bad","httpContentFormat":"JSONLINES","httpContentType":"application/json","httpEndpoint":"https://example.com/logs"}}'
body: '{"id":"lst_0000000000002060","name":"Test-LogStream-1732609495","type":"http","status":"active","sink":{"httpAuthorization":"Bearer f2368bbe77074527a37be2fdd5b92bad","httpContentFormat":"JSONLINES","httpContentType":"application/json","httpEndpoint":"https://example.com/logs"},"isPriority":false}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 200 OK
code: 200
duration: 200.115291ms
duration: 440.237875ms
- id: 1
request:
proto: HTTP/1.1
Expand All @@ -54,8 +54,8 @@ interactions:
Content-Type:
- application/json
User-Agent:
- Go-Auth0-SDK/latest
url: https://go-auth0-dev.eu.auth0.com/api/v2/log-streams/lst_0000000000011621
- Go-Auth0/1.11.2
url: https://go-auth0-dev.eu.auth0.com/api/v2/log-streams/lst_0000000000002060
method: DELETE
response:
proto: HTTP/2.0
Expand All @@ -71,4 +71,4 @@ interactions:
- application/json; charset=utf-8
status: 204 No Content
code: 204
duration: 139.570416ms
duration: 360.544ms
Loading

0 comments on commit 4f0d02c

Please sign in to comment.