Skip to content

Commit aee5bf3

Browse files
authored
feat: update Go SDK to accept auth session interface (#1488)
This change alters the Go SDK client struct to accept an interface instead of the AuthSession. The interface allows for custom implementations of the RTL package, but since the existing AuthSession fulfills the new interface (its based on the Do method from the current AuthSession after all) this change will be completely transparent to those who are currently using the current AuthSession.
1 parent c004f23 commit aee5bf3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/sdk-codegen/src/go.gen.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,11 +371,15 @@ import (
371371
"time"
372372
)
373373

374+
type authSessionDoer interface {
375+
Do(result interface{}, method, ver, path string, reqPars map[string]interface{}, body interface{}, options *rtl.ApiSettings) error
376+
}
377+
374378
type LookerSDK struct {
375-
session *rtl.AuthSession
379+
session authSessionDoer
376380
}
377381

378-
func NewLookerSDK(session *rtl.AuthSession) *LookerSDK {
382+
func NewLookerSDK(session authSessionDoer) *LookerSDK {
379383
return &LookerSDK{
380384
session: session,
381385
}

0 commit comments

Comments
 (0)