Documentation ¶
Index ¶
- Constants
- func ContextWithJWT(ctx context.Context, jwtStr string) context.Context
- func StartOpa(ctx context.Context, t *testing.T, done chan struct{}) opa_client.Clienter
- type MockOpaClienter
- func (m MockOpaClienter) Address() string
- func (m MockOpaClienter) CustomQuery(ctx context.Context, document string, reqData, resp interface{}) error
- func (m MockOpaClienter) CustomQueryBytes(ctx context.Context, document string, reqData interface{}) ([]byte, error)
- func (m MockOpaClienter) CustomQueryStream(ctx context.Context, document string, postReqBody []byte, ...) error
- func (m MockOpaClienter) Health() error
- func (m MockOpaClienter) Query(ctx context.Context, reqData, resp interface{}) error
- func (m MockOpaClienter) String() string
- type TestCaseIndexContextKeyType
- type TestCaseNameContextKeyType
- type TestingTContextKeyType
Constants ¶
View Source
const TestCaseIndexContextKey = TestCaseIndexContextKeyType("TestCaseIndex")
View Source
const TestCaseNameContextKey = TestCaseNameContextKeyType("TestCaseName")
View Source
const TestingTContextKey = TestingTContextKeyType("*testing.T")
Variables ¶
This section is empty.
Functions ¶
func ContextWithJWT ¶ added in v2.1.0
ContextWithJWT adds JWT as authorization-bearer token to context, returning the new context. From https://github.com/grpc-ecosystem/go-grpc-middleware/blob/master/auth/metadata_test.go
Types ¶
type MockOpaClienter ¶ added in v2.1.0
MockOpaClienter mocks the opa_client.Clienter interface
func (MockOpaClienter) Address ¶ added in v2.1.0
func (m MockOpaClienter) Address() string
func (MockOpaClienter) CustomQuery ¶ added in v2.1.0
func (m MockOpaClienter) CustomQuery(ctx context.Context, document string, reqData, resp interface{}) error
func (MockOpaClienter) CustomQueryBytes ¶ added in v2.1.0
func (MockOpaClienter) CustomQueryStream ¶ added in v2.1.0
func (m MockOpaClienter) CustomQueryStream(ctx context.Context, document string, postReqBody []byte, respRdrFn opa_client.StreamReaderFn) error
func (MockOpaClienter) Health ¶ added in v2.1.0
func (m MockOpaClienter) Health() error
func (MockOpaClienter) Query ¶ added in v2.1.0
func (m MockOpaClienter) Query(ctx context.Context, reqData, resp interface{}) error
func (MockOpaClienter) String ¶ added in v2.1.0
func (m MockOpaClienter) String() string
type TestCaseIndexContextKeyType ¶
type TestCaseIndexContextKeyType string
type TestCaseNameContextKeyType ¶
type TestCaseNameContextKeyType string
type TestingTContextKeyType ¶
type TestingTContextKeyType string
Click to show internal directories.
Click to hide internal directories.