server

package
v0.0.0-...-d3dae30 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: Apache-2.0 Imports: 48 Imported by: 0

Documentation

Overview

Package server is a generated GoMock package.

Index

Constants

View Source
const (
	// GraphqlCaller_Call_FullMethodName is the full name of the method [graphqlCaller.Call].
	GraphqlCaller_Call_FullMethodName = "github.com/go-kod/grpc-gateway/internal/server/GraphqlCaller.Call"
	// GraphqlReflection_ListPackages_FullMethodName is the full name of the method [graphqlReflection.ListPackages].
	GraphqlReflection_ListPackages_FullMethodName = "github.com/go-kod/grpc-gateway/internal/server/GraphqlReflection.ListPackages"
	// GraphqlQueryer_Query_FullMethodName is the full name of the method [graphqlQueryer.Query].
	GraphqlQueryer_Query_FullMethodName = "github.com/go-kod/grpc-gateway/internal/server/GraphqlQueryer.Query"
	// HttpUpstreamInvoker_Invoke_FullMethodName is the full name of the method [httpUpstreamInvoker.Invoke].
	HttpUpstreamInvoker_Invoke_FullMethodName = "github.com/go-kod/grpc-gateway/internal/server/HttpUpstreamInvoker.Invoke"
	// HttpUpstream_Register_FullMethodName is the full name of the method [httpUpstream.Register].
	HttpUpstream_Register_FullMethodName = "github.com/go-kod/grpc-gateway/internal/server/HttpUpstream.Register"
)

Full method names for components.

Variables

View Source
var ErrTLSHandshakeFailed = errors.New("TLS handshake failed")
View Source
var Hash64 = hash64Pool{
	// contains filtered or unexported fields
}

Functions

func NewQueryPlanCacher

func NewQueryPlanCacher() *queryPlanCacher

Types

type Gateway

type Gateway interface {
	// BuildServer is implemented by [server.BuildServer]
	BuildServer() (http.Handler, error)
	// BuildHTTPServer is implemented by [server.BuildHTTPServer]
	BuildHTTPServer() (http.Handler, error)
}

Gateway is implemented by server, which can be mocked with NewMockGateway.

type GraphqlCaller

type GraphqlCaller interface {
	// Call is implemented by [graphqlCaller.Call]
	Call(ctx context.Context, rpc protoreflect.MethodDescriptor, message proto.Message) (proto.Message, error)
}

GraphqlCaller is implemented by [graphqlCaller], which can be mocked with NewMockGraphqlCaller.

type GraphqlCallerRegistry

type GraphqlCallerRegistry interface {
	// FindMethodByName is implemented by [graphqlCallerRegistry.FindMethodByName]
	FindMethodByName(op ast.Operation, name string) protoreflect.MethodDescriptor
	// GraphQLSchema is implemented by [graphqlCallerRegistry.GraphQLSchema]
	GraphQLSchema() *ast.Schema
	// Marshal is implemented by [graphqlCallerRegistry.Marshal]
	Marshal(proto proto.Message, field *ast.Field) (interface{}, error)
	// Unmarshal is implemented by [graphqlCallerRegistry.Unmarshal]
	Unmarshal(desc protoreflect.MessageDescriptor, field *ast.Field, vars map[string]interface{}) (proto.Message, error)
	// GetCallerStub is implemented by [graphqlCallerRegistry.GetCallerStub]
	GetCallerStub(service string) *grpcdynamic.Stub
}

GraphqlCallerRegistry is implemented by [graphqlCallerRegistry], which can be mocked with NewMockGraphqlCallerRegistry.

type GraphqlQueryer

type GraphqlQueryer interface {
	// Query is implemented by [graphqlQueryer.Query]
	Query(ctx context.Context, input *graphql.QueryInput, result interface{}) error
}

GraphqlQueryer is implemented by [graphqlQueryer], which can be mocked with NewMockGraphqlQueryer.

type GraphqlReflection

type GraphqlReflection interface {
	// ListPackages is implemented by [graphqlReflection.ListPackages]
	ListPackages(ctx context.Context, cc grpc.ClientConnInterface) ([]protoreflect.FileDescriptor, error)
}

GraphqlReflection is implemented by [graphqlReflection], which can be mocked with NewMockGraphqlReflection.

type HttpUpstream

type HttpUpstream interface {
	// Register is implemented by [httpUpstream.Register]
	Register(ctx context.Context, router *http.ServeMux)
}

HttpUpstream is implemented by [httpUpstream], which can be mocked with NewMockHttpUpstream.

type HttpUpstreamInvoker

type HttpUpstreamInvoker interface {
	// Invoke is implemented by [httpUpstreamInvoker.Invoke]
	Invoke(ctx context.Context, rw http.ResponseWriter, r *http.Request, upstream upstreamInfo, rpcPath string, pathNames []string)
}

HttpUpstreamInvoker is implemented by [httpUpstreamInvoker], which can be mocked with NewMockHttpUpstreamInvoker.

type MockGateway

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

MockGateway is a mock of Gateway interface.

func NewMockGateway

func NewMockGateway(ctrl *gomock.Controller) *MockGateway

NewMockGateway creates a new mock instance.

func (*MockGateway) BuildHTTPServer

func (m *MockGateway) BuildHTTPServer() (http.Handler, error)

BuildHTTPServer mocks base method.

func (*MockGateway) BuildServer

func (m *MockGateway) BuildServer() (http.Handler, error)

BuildServer mocks base method.

func (*MockGateway) EXPECT

func (m *MockGateway) EXPECT() *MockGatewayMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

type MockGatewayBuildHTTPServerCall

type MockGatewayBuildHTTPServerCall struct {
	*gomock.Call
}

MockGatewayBuildHTTPServerCall wrap *gomock.Call

func (*MockGatewayBuildHTTPServerCall) Do

Do rewrite *gomock.Call.Do

func (*MockGatewayBuildHTTPServerCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockGatewayBuildHTTPServerCall) Return

Return rewrite *gomock.Call.Return

type MockGatewayBuildServerCall

type MockGatewayBuildServerCall struct {
	*gomock.Call
}

MockGatewayBuildServerCall wrap *gomock.Call

func (*MockGatewayBuildServerCall) Do

Do rewrite *gomock.Call.Do

func (*MockGatewayBuildServerCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockGatewayBuildServerCall) Return

Return rewrite *gomock.Call.Return

type MockGatewayMockRecorder

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

MockGatewayMockRecorder is the mock recorder for MockGateway.

func (*MockGatewayMockRecorder) BuildHTTPServer

BuildHTTPServer indicates an expected call of BuildHTTPServer.

func (*MockGatewayMockRecorder) BuildServer

BuildServer indicates an expected call of BuildServer.

type MockGraphqlCaller

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

MockGraphqlCaller is a mock of GraphqlCaller interface.

func NewMockGraphqlCaller

func NewMockGraphqlCaller(ctrl *gomock.Controller) *MockGraphqlCaller

NewMockGraphqlCaller creates a new mock instance.

func (*MockGraphqlCaller) Call

Call mocks base method.

func (*MockGraphqlCaller) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockGraphqlCallerCallCall

type MockGraphqlCallerCallCall struct {
	*gomock.Call
}

MockGraphqlCallerCallCall wrap *gomock.Call

func (*MockGraphqlCallerCallCall) Do

Do rewrite *gomock.Call.Do

func (*MockGraphqlCallerCallCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockGraphqlCallerCallCall) Return

Return rewrite *gomock.Call.Return

type MockGraphqlCallerMockRecorder

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

MockGraphqlCallerMockRecorder is the mock recorder for MockGraphqlCaller.

func (*MockGraphqlCallerMockRecorder) Call

func (mr *MockGraphqlCallerMockRecorder) Call(ctx, rpc, message any) *MockGraphqlCallerCallCall

Call indicates an expected call of Call.

type MockGraphqlCallerRegistry

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

MockGraphqlCallerRegistry is a mock of GraphqlCallerRegistry interface.

func NewMockGraphqlCallerRegistry

func NewMockGraphqlCallerRegistry(ctrl *gomock.Controller) *MockGraphqlCallerRegistry

NewMockGraphqlCallerRegistry creates a new mock instance.

func (*MockGraphqlCallerRegistry) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockGraphqlCallerRegistry) FindMethodByName

FindMethodByName mocks base method.

func (*MockGraphqlCallerRegistry) GetCallerStub

func (m *MockGraphqlCallerRegistry) GetCallerStub(service string) *grpcdynamic.Stub

GetCallerStub mocks base method.

func (*MockGraphqlCallerRegistry) GraphQLSchema

func (m *MockGraphqlCallerRegistry) GraphQLSchema() *ast.Schema

GraphQLSchema mocks base method.

func (*MockGraphqlCallerRegistry) Marshal

func (m *MockGraphqlCallerRegistry) Marshal(proto proto.Message, field *ast.Field) (any, error)

Marshal mocks base method.

func (*MockGraphqlCallerRegistry) Unmarshal

Unmarshal mocks base method.

type MockGraphqlCallerRegistryFindMethodByNameCall

type MockGraphqlCallerRegistryFindMethodByNameCall struct {
	*gomock.Call
}

MockGraphqlCallerRegistryFindMethodByNameCall wrap *gomock.Call

func (*MockGraphqlCallerRegistryFindMethodByNameCall) Do

Do rewrite *gomock.Call.Do

func (*MockGraphqlCallerRegistryFindMethodByNameCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockGraphqlCallerRegistryFindMethodByNameCall) Return

Return rewrite *gomock.Call.Return

type MockGraphqlCallerRegistryGetCallerStubCall

type MockGraphqlCallerRegistryGetCallerStubCall struct {
	*gomock.Call
}

MockGraphqlCallerRegistryGetCallerStubCall wrap *gomock.Call

func (*MockGraphqlCallerRegistryGetCallerStubCall) Do

Do rewrite *gomock.Call.Do

func (*MockGraphqlCallerRegistryGetCallerStubCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockGraphqlCallerRegistryGetCallerStubCall) Return

Return rewrite *gomock.Call.Return

type MockGraphqlCallerRegistryGraphQLSchemaCall

type MockGraphqlCallerRegistryGraphQLSchemaCall struct {
	*gomock.Call
}

MockGraphqlCallerRegistryGraphQLSchemaCall wrap *gomock.Call

func (*MockGraphqlCallerRegistryGraphQLSchemaCall) Do

Do rewrite *gomock.Call.Do

func (*MockGraphqlCallerRegistryGraphQLSchemaCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockGraphqlCallerRegistryGraphQLSchemaCall) Return

Return rewrite *gomock.Call.Return

type MockGraphqlCallerRegistryMarshalCall

type MockGraphqlCallerRegistryMarshalCall struct {
	*gomock.Call
}

MockGraphqlCallerRegistryMarshalCall wrap *gomock.Call

func (*MockGraphqlCallerRegistryMarshalCall) Do

Do rewrite *gomock.Call.Do

func (*MockGraphqlCallerRegistryMarshalCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockGraphqlCallerRegistryMarshalCall) Return

Return rewrite *gomock.Call.Return

type MockGraphqlCallerRegistryMockRecorder

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

MockGraphqlCallerRegistryMockRecorder is the mock recorder for MockGraphqlCallerRegistry.

func (*MockGraphqlCallerRegistryMockRecorder) FindMethodByName

FindMethodByName indicates an expected call of FindMethodByName.

func (*MockGraphqlCallerRegistryMockRecorder) GetCallerStub

GetCallerStub indicates an expected call of GetCallerStub.

func (*MockGraphqlCallerRegistryMockRecorder) GraphQLSchema

GraphQLSchema indicates an expected call of GraphQLSchema.

func (*MockGraphqlCallerRegistryMockRecorder) Marshal

Marshal indicates an expected call of Marshal.

func (*MockGraphqlCallerRegistryMockRecorder) Unmarshal

Unmarshal indicates an expected call of Unmarshal.

type MockGraphqlCallerRegistryUnmarshalCall

type MockGraphqlCallerRegistryUnmarshalCall struct {
	*gomock.Call
}

MockGraphqlCallerRegistryUnmarshalCall wrap *gomock.Call

func (*MockGraphqlCallerRegistryUnmarshalCall) Do

Do rewrite *gomock.Call.Do

func (*MockGraphqlCallerRegistryUnmarshalCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockGraphqlCallerRegistryUnmarshalCall) Return

Return rewrite *gomock.Call.Return

type MockGraphqlQueryer

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

MockGraphqlQueryer is a mock of GraphqlQueryer interface.

func NewMockGraphqlQueryer

func NewMockGraphqlQueryer(ctrl *gomock.Controller) *MockGraphqlQueryer

NewMockGraphqlQueryer creates a new mock instance.

func (*MockGraphqlQueryer) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockGraphqlQueryer) Query

func (m *MockGraphqlQueryer) Query(ctx context.Context, input *graphql.QueryInput, result any) error

Query mocks base method.

type MockGraphqlQueryerMockRecorder

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

MockGraphqlQueryerMockRecorder is the mock recorder for MockGraphqlQueryer.

func (*MockGraphqlQueryerMockRecorder) Query

func (mr *MockGraphqlQueryerMockRecorder) Query(ctx, input, result any) *MockGraphqlQueryerQueryCall

Query indicates an expected call of Query.

type MockGraphqlQueryerQueryCall

type MockGraphqlQueryerQueryCall struct {
	*gomock.Call
}

MockGraphqlQueryerQueryCall wrap *gomock.Call

func (*MockGraphqlQueryerQueryCall) Do

Do rewrite *gomock.Call.Do

func (*MockGraphqlQueryerQueryCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockGraphqlQueryerQueryCall) Return

Return rewrite *gomock.Call.Return

type MockGraphqlReflection

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

MockGraphqlReflection is a mock of GraphqlReflection interface.

func NewMockGraphqlReflection

func NewMockGraphqlReflection(ctrl *gomock.Controller) *MockGraphqlReflection

NewMockGraphqlReflection creates a new mock instance.

func (*MockGraphqlReflection) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockGraphqlReflection) ListPackages

ListPackages mocks base method.

type MockGraphqlReflectionListPackagesCall

type MockGraphqlReflectionListPackagesCall struct {
	*gomock.Call
}

MockGraphqlReflectionListPackagesCall wrap *gomock.Call

func (*MockGraphqlReflectionListPackagesCall) Do

Do rewrite *gomock.Call.Do

func (*MockGraphqlReflectionListPackagesCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockGraphqlReflectionListPackagesCall) Return

Return rewrite *gomock.Call.Return

type MockGraphqlReflectionMockRecorder

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

MockGraphqlReflectionMockRecorder is the mock recorder for MockGraphqlReflection.

func (*MockGraphqlReflectionMockRecorder) ListPackages

ListPackages indicates an expected call of ListPackages.

type MockHttpUpstream

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

MockHttpUpstream is a mock of HttpUpstream interface.

func NewMockHttpUpstream

func NewMockHttpUpstream(ctrl *gomock.Controller) *MockHttpUpstream

NewMockHttpUpstream creates a new mock instance.

func (*MockHttpUpstream) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockHttpUpstream) Register

func (m *MockHttpUpstream) Register(ctx context.Context, router *http.ServeMux)

Register mocks base method.

type MockHttpUpstreamInvoker

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

MockHttpUpstreamInvoker is a mock of HttpUpstreamInvoker interface.

func NewMockHttpUpstreamInvoker

func NewMockHttpUpstreamInvoker(ctrl *gomock.Controller) *MockHttpUpstreamInvoker

NewMockHttpUpstreamInvoker creates a new mock instance.

func (*MockHttpUpstreamInvoker) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockHttpUpstreamInvoker) Invoke

func (m *MockHttpUpstreamInvoker) Invoke(ctx context.Context, rw http.ResponseWriter, r *http.Request, upstream upstreamInfo, rpcPath string, pathNames []string)

Invoke mocks base method.

type MockHttpUpstreamInvokerInvokeCall

type MockHttpUpstreamInvokerInvokeCall struct {
	*gomock.Call
}

MockHttpUpstreamInvokerInvokeCall wrap *gomock.Call

func (*MockHttpUpstreamInvokerInvokeCall) Do

Do rewrite *gomock.Call.Do

func (*MockHttpUpstreamInvokerInvokeCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockHttpUpstreamInvokerInvokeCall) Return

Return rewrite *gomock.Call.Return

type MockHttpUpstreamInvokerMockRecorder

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

MockHttpUpstreamInvokerMockRecorder is the mock recorder for MockHttpUpstreamInvoker.

func (*MockHttpUpstreamInvokerMockRecorder) Invoke

func (mr *MockHttpUpstreamInvokerMockRecorder) Invoke(ctx, rw, r, upstream, rpcPath, pathNames any) *MockHttpUpstreamInvokerInvokeCall

Invoke indicates an expected call of Invoke.

type MockHttpUpstreamMockRecorder

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

MockHttpUpstreamMockRecorder is the mock recorder for MockHttpUpstream.

func (*MockHttpUpstreamMockRecorder) Register

Register indicates an expected call of Register.

type MockHttpUpstreamRegisterCall

type MockHttpUpstreamRegisterCall struct {
	*gomock.Call
}

MockHttpUpstreamRegisterCall wrap *gomock.Call

func (*MockHttpUpstreamRegisterCall) Do

Do rewrite *gomock.Call.Do

func (*MockHttpUpstreamRegisterCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockHttpUpstreamRegisterCall) Return

Return rewrite *gomock.Call.Return

Jump to

Keyboard shortcuts

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