mock

package
v0.8.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorizer

type Authorizer struct {
	// contains filtered or unexported fields
}

func New

func New(t *testing.T, expectedRequest *authorizer.IsRequest, decision *authorizer.Decision) *Authorizer

func (*Authorizer) DecisionTree

func (c *Authorizer) DecisionTree(
	ctx context.Context,
	in *authorizer.DecisionTreeRequest,
	opts ...grpc.CallOption,
) (*authorizer.DecisionTreeResponse, error)

func (*Authorizer) Is

func (c *Authorizer) Is(
	ctx context.Context,
	in *authorizer.IsRequest,
	opts ...grpc.CallOption,
) (*authorizer.IsResponse, error)

func (*Authorizer) Query

func (c *Authorizer) Query(
	ctx context.Context,
	in *authorizer.QueryRequest,
	opts ...grpc.CallOption,
) (*authorizer.QueryResponse, error)

type ServerStream

type ServerStream struct {
	Ctx context.Context
}

Mock grpc.ServerStream.

func (*ServerStream) Context

func (s *ServerStream) Context() context.Context

func (*ServerStream) RecvMsg

func (s *ServerStream) RecvMsg(m interface{}) error

func (*ServerStream) SendHeader

func (s *ServerStream) SendHeader(metadata.MD) error

func (*ServerStream) SendMsg

func (s *ServerStream) SendMsg(m interface{}) error

func (*ServerStream) SetHeader

func (s *ServerStream) SetHeader(metadata.MD) error

func (*ServerStream) SetTrailer

func (s *ServerStream) SetTrailer(metadata.MD)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL