Documentation ¶
Index ¶
- Constants
- Variables
- type AuthService
- type Impl
- type Mock
- type MockImpl
- func (m *MockImpl) Enable()
- func (m *MockImpl) IsEnabled() bool
- func (m *MockImpl) Recording() []string
- func (m *MockImpl) Reset()
- func (m *MockImpl) SetupResponse(idToken string, acToken string, response UserInfoResponse)
- func (m *MockImpl) SimulateGetError(err error)
- func (m *MockImpl) UserInfo(ctx context.Context) (UserInfoResponse, error)
- type UserInfoResponse
Constants ¶
View Source
const TraceIdHeader = "X-Request-Id" // repeat for circular ref avoidance
Variables ¶
View Source
var ( DownstreamError = errors.New("downstream unavailable - see log for details") )
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService interface { IsEnabled() bool UserInfo(ctx context.Context) (UserInfoResponse, error) }
func Get ¶
func Get() AuthService
func New ¶
func New() (AuthService, error)
type Mock ¶
type Mock interface { AuthService Reset() Enable() Recording() []string SimulateGetError(err error) SetupResponse(idToken string, acToken string, response UserInfoResponse) }
func CreateMock ¶
func CreateMock() Mock
type MockImpl ¶
type MockImpl struct {
// contains filtered or unexported fields
}
func (*MockImpl) SetupResponse ¶
func (m *MockImpl) SetupResponse(idToken string, acToken string, response UserInfoResponse)
func (*MockImpl) SimulateGetError ¶
Click to show internal directories.
Click to hide internal directories.