mock

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 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) Compile

func (c *Authorizer) Compile(
	ctx context.Context,
	in *authorizer.CompileRequest,
	opts ...grpc.CallOption,
) (*authorizer.CompileResponse, error)

func (*Authorizer) DecisionTree

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

func (*Authorizer) GetPolicy

func (c *Authorizer) GetPolicy(
	ctx context.Context,
	in *authorizer.GetPolicyRequest,
	opts ...grpc.CallOption,
) (*authorizer.GetPolicyResponse, error)

func (*Authorizer) Info

func (c *Authorizer) Info(
	ctx context.Context,
	in *authorizer.InfoRequest,
	opts ...grpc.CallOption,
) (*authorizer.InfoResponse, error)

func (*Authorizer) Is

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

func (*Authorizer) ListPolicies

func (c *Authorizer) ListPolicies(
	ctx context.Context,
	in *authorizer.ListPoliciesRequest,
	opts ...grpc.CallOption,
) (*authorizer.ListPoliciesResponse, 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