helloworld

package
v0.1.316 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

README

ProtoC

Individual outputs

go mod vendor

protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative helloworld/helloworld.proto
go get -u github.com/fluffy-bunny/grpcdotnetgo/protoc-gen-go-di/cmd/protoc-gen-go-di
protoc --go_out=. --go_opt=paths=source_relative --go-di_out=. --go-di_opt=paths=source_relative helloworld/helloworld.proto 

One hit wonder

go mod vendor

go get -u github.com/fluffy-bunny/grpcdotnetgo/protoc-gen-go-di/cmd/protoc-gen-go-di

go build .\protoc-gen-go-di\cmd\protoc-gen-go-di\  

protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative --grpc-gateway_out . --grpc-gateway_opt paths=source_relative --go-di_out=. --go-di_opt=paths=source_relative,grpc_gateway=true protoc-gen-go-di/helloworld/helloworld.proto

git clone https://github.com/googleapis/googleapis.git
# copy to google/api is so that the linter can find the files in visual studio. 
# leave the googleapis folder in place for the protoc to find the files
md ./google/api
cp ./googleapis/google/api/annotations.proto ./google/api/annotations.proto
cp ./googleapis/google/api/field_behavior.proto ./google/api/field_behavior.proto
cp ./googleapis/google/api/http.proto ./google/api/http.proto
cp ./googleapis/google/api/httpbody.proto ./google/api/httpbody.proto

Documentation

Overview

Package helloworld is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EdgeControlService_WriteProps_FullMethodName = "/helloworld.EdgeControlService/WriteProps"
)
View Source
const (
	// FMN_Greeter2_SayHello
	FMN_Greeter2_SayHello = "/helloworld.Greeter2/SayHello"
)

FullMethodNames for Greeter2

View Source
const (
	// FMN_Greeter_SayHello
	FMN_Greeter_SayHello = "/helloworld.Greeter/SayHello"
)

FullMethodNames for Greeter

View Source
const (
	Greeter2_SayHello_FullMethodName = "/helloworld.Greeter2/SayHello"
)
View Source
const (
	Greeter_SayHello_FullMethodName = "/helloworld.Greeter/SayHello"
)

Variables

View Source
var EdgeControlService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "helloworld.EdgeControlService",
	HandlerType: (*EdgeControlServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "WriteProps",
			Handler:       _EdgeControlService_WriteProps_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "protoc-gen-go-di/helloworld/helloworld.proto",
}

EdgeControlService_ServiceDesc is the grpc.ServiceDesc for EdgeControlService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_protoc_gen_go_di_helloworld_helloworld_proto protoreflect.FileDescriptor
View Source
var Greeter2_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "helloworld.Greeter2",
	HandlerType: (*Greeter2Server)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SayHello",
			Handler:    _Greeter2_SayHello_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "protoc-gen-go-di/helloworld/helloworld.proto",
}

Greeter2_ServiceDesc is the grpc.ServiceDesc for Greeter2 service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var Greeter_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "helloworld.Greeter",
	HandlerType: (*GreeterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SayHello",
			Handler:    _Greeter_SayHello_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "protoc-gen-go-di/helloworld/helloworld.proto",
}

Greeter_ServiceDesc is the grpc.ServiceDesc for Greeter service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var M_helloworld_Greeter2FullMethodNameExecuteMap = map[string]func(service IGreeter2Server, ctx context.Context, request interface{}) (interface{}, error){
	"/helloworld.Greeter2/SayHello": func(service IGreeter2Server, ctx context.Context, request interface{}) (interface{}, error) {
		req := request.(*HelloRequest)
		return service.SayHello(ctx, req)
	},
}

M_helloworld_Greeter2FullMethodNameExecuteMap keys match that of grpc.UnaryServerInfo.FullMethodName

View Source
var M_helloworld_GreeterFullMethodNameExecuteMap = map[string]func(service IGreeterServer, ctx context.Context, request interface{}) (interface{}, error){
	"/helloworld.Greeter/SayHello": func(service IGreeterServer, ctx context.Context, request interface{}) (interface{}, error) {
		req := request.(*HelloRequest)
		return service.SayHello(ctx, req)
	},
}

M_helloworld_GreeterFullMethodNameExecuteMap keys match that of grpc.UnaryServerInfo.FullMethodName

View Source
var ReflectTypeIGreeter2Server = sarulabsdi.GetInterfaceReflectType((*IGreeter2Server)(nil))

ReflectTypeIGreeter2Server reflect type

View Source
var ReflectTypeIGreeter2Service = sarulabsdi.GetInterfaceReflectType((*IGreeter2Service)(nil))

ReflectTypeIGreeter2Service reflect type

View Source
var ReflectTypeIGreeterServer = sarulabsdi.GetInterfaceReflectType((*IGreeterServer)(nil))

ReflectTypeIGreeterServer reflect type

View Source
var ReflectTypeIGreeterService = sarulabsdi.GetInterfaceReflectType((*IGreeterService)(nil))

ReflectTypeIGreeterService reflect type

View Source
var TypeGreeter2EndpointRegistration = sarulabsdi.GetInterfaceReflectType((*Greeter2EndpointRegistration)(nil))

TypeGreeter2EndpointRegistration reflect type

TypeGreeterEndpointRegistration reflect type

TypeIGreeter2Server reflect type

TypeIGreeter2Service reflect type

TypeIGreeterServer reflect type

TypeIGreeterService reflect type

Functions

func AddGreeter2EndpointRegistration added in v0.1.281

func AddGreeter2EndpointRegistration(builder *sarulabsdi.Builder, implType reflect.Type)

AddGreeter2EndpointRegistration adds a type that implements IServiceEndpointRegistration

func AddGreeter2EndpointRegistrationV2 added in v0.1.295

func AddGreeter2EndpointRegistrationV2(builder *sarulabsdi.Builder, implType reflect.Type)

AddGreeter2EndpointRegistration adds a type that implements IServiceEndpointRegistration

func AddGreeterEndpointRegistration added in v0.1.281

func AddGreeterEndpointRegistration(builder *sarulabsdi.Builder, implType reflect.Type)

AddGreeterEndpointRegistration adds a type that implements IServiceEndpointRegistration

func AddGreeterEndpointRegistrationV2 added in v0.1.295

func AddGreeterEndpointRegistrationV2(builder *sarulabsdi.Builder, implType reflect.Type)

AddGreeterEndpointRegistration adds a type that implements IServiceEndpointRegistration

func AddScopedIGreeter2Server added in v0.1.295

func AddScopedIGreeter2Server(builder *sarulabsdi.Builder, implType reflect.Type)

AddScopedIGreeter2Server adds a type that implements IGreeter2Server

func AddScopedIGreeter2Service added in v0.1.144

func AddScopedIGreeter2Service(builder *sarulabsdi.Builder, implType reflect.Type)

AddScopedIGreeter2Service adds a type that implements IGreeter2Service

func AddScopedIGreeter2ServiceByFunc added in v0.1.144

func AddScopedIGreeter2ServiceByFunc(builder *sarulabsdi.Builder, implType reflect.Type, build func(ctn sarulabsdi.Container) (interface{}, error))

AddScopedIGreeter2ServiceByFunc adds a type by a custom func

func AddScopedIGreeterServer added in v0.1.295

func AddScopedIGreeterServer(builder *sarulabsdi.Builder, implType reflect.Type)

AddScopedIGreeterServer adds a type that implements IGreeterServer

func AddScopedIGreeterService added in v0.1.144

func AddScopedIGreeterService(builder *sarulabsdi.Builder, implType reflect.Type)

AddScopedIGreeterService adds a type that implements IGreeterService

func AddScopedIGreeterServiceByFunc added in v0.1.144

func AddScopedIGreeterServiceByFunc(builder *sarulabsdi.Builder, implType reflect.Type, build func(ctn sarulabsdi.Container) (interface{}, error))

AddScopedIGreeterServiceByFunc adds a type by a custom func

func AddSingletonIGreeter2Server added in v0.1.147

func AddSingletonIGreeter2Server(builder *sarulabsdi.Builder, implType reflect.Type)

AddSingletonIGreeter2Server adds a type that implements IGreeter2Server

func AddSingletonIGreeter2ServerByFunc added in v0.1.147

func AddSingletonIGreeter2ServerByFunc(builder *sarulabsdi.Builder, implType reflect.Type, build func(ctn sarulabsdi.Container) (interface{}, error))

AddSingletonIGreeter2ServerByFunc adds a type by a custom func

func AddSingletonIGreeter2ServerByObj added in v0.1.147

func AddSingletonIGreeter2ServerByObj(builder *sarulabsdi.Builder, obj interface{})

AddSingletonIGreeter2ServerByObj adds a prebuilt obj

func AddSingletonIGreeter2Service added in v0.1.144

func AddSingletonIGreeter2Service(builder *sarulabsdi.Builder, implType reflect.Type)

AddSingletonIGreeter2Service adds a type that implements IGreeter2Service

func AddSingletonIGreeter2ServiceByFunc added in v0.1.144

func AddSingletonIGreeter2ServiceByFunc(builder *sarulabsdi.Builder, implType reflect.Type, build func(ctn sarulabsdi.Container) (interface{}, error))

AddSingletonIGreeter2ServiceByFunc adds a type by a custom func

func AddSingletonIGreeter2ServiceByObj added in v0.1.144

func AddSingletonIGreeter2ServiceByObj(builder *sarulabsdi.Builder, obj interface{})

AddSingletonIGreeter2ServiceByObj adds a prebuilt obj

func AddSingletonIGreeterServer added in v0.1.147

func AddSingletonIGreeterServer(builder *sarulabsdi.Builder, implType reflect.Type)

AddSingletonIGreeterServer adds a type that implements IGreeterServer

func AddSingletonIGreeterServerByFunc added in v0.1.147

func AddSingletonIGreeterServerByFunc(builder *sarulabsdi.Builder, implType reflect.Type, build func(ctn sarulabsdi.Container) (interface{}, error))

AddSingletonIGreeterServerByFunc adds a type by a custom func

func AddSingletonIGreeterServerByObj added in v0.1.147

func AddSingletonIGreeterServerByObj(builder *sarulabsdi.Builder, obj interface{})

AddSingletonIGreeterServerByObj adds a prebuilt obj

func AddSingletonIGreeterService added in v0.1.144

func AddSingletonIGreeterService(builder *sarulabsdi.Builder, implType reflect.Type)

AddSingletonIGreeterService adds a type that implements IGreeterService

func AddSingletonIGreeterServiceByFunc added in v0.1.144

func AddSingletonIGreeterServiceByFunc(builder *sarulabsdi.Builder, implType reflect.Type, build func(ctn sarulabsdi.Container) (interface{}, error))

AddSingletonIGreeterServiceByFunc adds a type by a custom func

func AddSingletonIGreeterServiceByObj added in v0.1.144

func AddSingletonIGreeterServiceByObj(builder *sarulabsdi.Builder, obj interface{})

AddSingletonIGreeterServiceByObj adds a prebuilt obj

func AddTransientIGreeter2Service added in v0.1.144

func AddTransientIGreeter2Service(builder *sarulabsdi.Builder, implType reflect.Type)

AddTransientIGreeter2Service adds a type that implements IGreeter2Service

func AddTransientIGreeter2ServiceByFunc added in v0.1.144

func AddTransientIGreeter2ServiceByFunc(builder *sarulabsdi.Builder, implType reflect.Type, build func(ctn sarulabsdi.Container) (interface{}, error))

AddTransientIGreeter2ServiceByFunc adds a type by a custom func

func AddTransientIGreeterService added in v0.1.144

func AddTransientIGreeterService(builder *sarulabsdi.Builder, implType reflect.Type)

AddTransientIGreeterService adds a type that implements IGreeterService

func AddTransientIGreeterServiceByFunc added in v0.1.144

func AddTransientIGreeterServiceByFunc(builder *sarulabsdi.Builder, implType reflect.Type, build func(ctn sarulabsdi.Container) (interface{}, error))

AddTransientIGreeterServiceByFunc adds a type by a custom func

func Get_helloworldFullEmptyResponseFromFullMethodName

func Get_helloworldFullEmptyResponseFromFullMethodName(fullMethodName string) func() interface{}

Get_helloworldFullEmptyResponseFromFullMethodName ...

func Get_helloworldFullEmptyResponseWithErrorFromFullMethodName

func Get_helloworldFullEmptyResponseWithErrorFromFullMethodName(fullMethodName string) func() interface{}

Get_helloworldFullEmptyResponseWithErrorFromFullMethodName ...

func New_helloworldFullMethodNameSlice

func New_helloworldFullMethodNameSlice() []string

New_helloworldFullMethodNameSlice create a new map of fullMethodNames to []string i.e. /helloworld.Greeter/SayHello

func RegisterEdgeControlServiceServer added in v0.1.263

func RegisterEdgeControlServiceServer(s grpc.ServiceRegistrar, srv EdgeControlServiceServer)

func RegisterGreeter2Handler added in v0.1.313

func RegisterGreeter2Handler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterGreeter2Handler registers the http handlers for service Greeter2 to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterGreeter2HandlerClient added in v0.1.313

func RegisterGreeter2HandlerClient(ctx context.Context, mux *runtime.ServeMux, client Greeter2Client) error

RegisterGreeter2HandlerClient registers the http handlers for service Greeter2 to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "Greeter2Client". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "Greeter2Client" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "Greeter2Client" to call the correct interceptors.

func RegisterGreeter2HandlerFromEndpoint added in v0.1.313

func RegisterGreeter2HandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterGreeter2HandlerFromEndpoint is same as RegisterGreeter2Handler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterGreeter2HandlerServer added in v0.1.313

func RegisterGreeter2HandlerServer(ctx context.Context, mux *runtime.ServeMux, server Greeter2Server) error

RegisterGreeter2HandlerServer registers the http handlers for service Greeter2 to "mux". UnaryRPC :call Greeter2Server directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterGreeter2HandlerFromEndpoint instead.

func RegisterGreeter2Server

func RegisterGreeter2Server(s grpc.ServiceRegistrar, srv Greeter2Server)

func RegisterGreeter2ServerDI

func RegisterGreeter2ServerDI(s grpc.ServiceRegistrar) interface{}

RegisterGreeter2ServerDI ...

func RegisterGreeter2ServerDIV2 added in v0.1.295

func RegisterGreeter2ServerDIV2(s grpc.ServiceRegistrar) interface{}

RegisterGreeter2ServerDIV2 ...

func RegisterGreeterHandler added in v0.1.313

func RegisterGreeterHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterGreeterHandler registers the http handlers for service Greeter to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterGreeterHandlerClient added in v0.1.313

func RegisterGreeterHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GreeterClient) error

RegisterGreeterHandlerClient registers the http handlers for service Greeter to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "GreeterClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "GreeterClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "GreeterClient" to call the correct interceptors.

func RegisterGreeterHandlerFromEndpoint added in v0.1.313

func RegisterGreeterHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterGreeterHandlerFromEndpoint is same as RegisterGreeterHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterGreeterHandlerServer added in v0.1.313

func RegisterGreeterHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GreeterServer) error

RegisterGreeterHandlerServer registers the http handlers for service Greeter to "mux". UnaryRPC :call GreeterServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterGreeterHandlerFromEndpoint instead.

func RegisterGreeterServer

func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer)

func RegisterGreeterServerDI

func RegisterGreeterServerDI(s grpc.ServiceRegistrar) interface{}

RegisterGreeterServerDI ...

func RegisterGreeterServerDIV2 added in v0.1.295

func RegisterGreeterServerDIV2(s grpc.ServiceRegistrar) interface{}

RegisterGreeterServerDIV2 ...

func RemoveAllIGreeter2Service added in v0.1.144

func RemoveAllIGreeter2Service(builder *sarulabsdi.Builder)

RemoveAllIGreeter2Service removes all IBillingService from the DI

func RemoveAllIGreeterService added in v0.1.144

func RemoveAllIGreeterService(builder *sarulabsdi.Builder)

RemoveAllIGreeterService removes all IBillingService from the DI

Types

type EdgeControlServiceClient added in v0.1.263

type EdgeControlServiceClient interface {
	// Write a property to one or more known subtended device(s)
	// Request: Unary
	// Response: Streaming
	WriteProps(ctx context.Context, in *WritePropsRequest, opts ...grpc.CallOption) (EdgeControlService_WritePropsClient, error)
}

EdgeControlServiceClient is the client API for EdgeControlService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewEdgeControlServiceClient added in v0.1.263

func NewEdgeControlServiceClient(cc grpc.ClientConnInterface) EdgeControlServiceClient

type EdgeControlServiceServer added in v0.1.263

type EdgeControlServiceServer interface {
	// Write a property to one or more known subtended device(s)
	// Request: Unary
	// Response: Streaming
	WriteProps(*WritePropsRequest, EdgeControlService_WritePropsServer) error
	// contains filtered or unexported methods
}

EdgeControlServiceServer is the server API for EdgeControlService service. All implementations must embed UnimplementedEdgeControlServiceServer for forward compatibility

type EdgeControlService_WritePropsClient added in v0.1.263

type EdgeControlService_WritePropsClient interface {
	Recv() (*WritePropsResponse, error)
	grpc.ClientStream
}

type EdgeControlService_WritePropsServer added in v0.1.263

type EdgeControlService_WritePropsServer interface {
	Send(*WritePropsResponse) error
	grpc.ServerStream
}

type GetGreeter2Client added in v0.1.281

type GetGreeter2Client func() (Greeter2Client, error)

type GetGreeterClient added in v0.1.281

type GetGreeterClient func() (GreeterClient, error)

type Greeter2Client

type Greeter2Client interface {
	// Sends a greeting
	SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply2, error)
}

Greeter2Client is the client API for Greeter2 service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewGreeter2Client

func NewGreeter2Client(cc grpc.ClientConnInterface) Greeter2Client

type Greeter2EndpointRegistration added in v0.1.281

type Greeter2EndpointRegistration struct {
}

Greeter2EndpointRegistration defines the grpc server endpoint registration

func (*Greeter2EndpointRegistration) GetName added in v0.1.281

func (s *Greeter2EndpointRegistration) GetName() string

GetName returns the name of the service

func (*Greeter2EndpointRegistration) GetNewClient added in v0.1.281

func (s *Greeter2EndpointRegistration) GetNewClient(cc grpc.ClientConnInterface) interface{}

GetNewClient returns a new instance of a grpc client

func (*Greeter2EndpointRegistration) RegisterEndpoint added in v0.1.281

func (s *Greeter2EndpointRegistration) RegisterEndpoint(server *grpc.Server) interface{}

RegisterEndpoint registers a DI server

func (*Greeter2EndpointRegistration) RegisterGatewayHandler added in v0.1.313

func (s *Greeter2EndpointRegistration) RegisterGatewayHandler(gwmux *runtime.ServeMux, conn *grpc.ClientConn)

Registery gateway handler

type Greeter2EndpointRegistrationV2 added in v0.1.295

type Greeter2EndpointRegistrationV2 struct {
	UnimplementedGreeter2ServerEndpointRegistration
}

Greeter2EndpointRegistration defines the grpc server endpoint registration

func (*Greeter2EndpointRegistrationV2) GetName added in v0.1.295

GetName returns the name of the service

func (*Greeter2EndpointRegistrationV2) GetNewClient added in v0.1.295

func (s *Greeter2EndpointRegistrationV2) GetNewClient(cc grpc.ClientConnInterface) interface{}

GetNewClient returns a new instance of a grpc client

func (*Greeter2EndpointRegistrationV2) RegisterEndpoint added in v0.1.295

func (s *Greeter2EndpointRegistrationV2) RegisterEndpoint(server *grpc.Server) interface{}

RegisterEndpoint registers a DI server

func (*Greeter2EndpointRegistrationV2) RegisterEndpointV2 added in v0.1.295

func (s *Greeter2EndpointRegistrationV2) RegisterEndpointV2(server *grpc.Server) interface{}

RegisterEndpoint registers a DI server

func (*Greeter2EndpointRegistrationV2) RegisterGatewayHandler added in v0.1.313

func (s *Greeter2EndpointRegistrationV2) RegisterGatewayHandler(gwmux *runtime.ServeMux, conn *grpc.ClientConn)

Registery gateway handler

type Greeter2Server

type Greeter2Server interface {
	// Sends a greeting
	SayHello(context.Context, *HelloRequest) (*HelloReply2, error)
	// contains filtered or unexported methods
}

Greeter2Server is the server API for Greeter2 service. All implementations must embed UnimplementedGreeter2Server for forward compatibility

type GreeterClient

type GreeterClient interface {
	// Sends a greeting
	SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error)
}

GreeterClient is the client API for Greeter service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewGreeterClient

func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient

type GreeterEndpointRegistration added in v0.1.281

type GreeterEndpointRegistration struct {
}

GreeterEndpointRegistration defines the grpc server endpoint registration

func (*GreeterEndpointRegistration) GetName added in v0.1.281

func (s *GreeterEndpointRegistration) GetName() string

GetName returns the name of the service

func (*GreeterEndpointRegistration) GetNewClient added in v0.1.281

func (s *GreeterEndpointRegistration) GetNewClient(cc grpc.ClientConnInterface) interface{}

GetNewClient returns a new instance of a grpc client

func (*GreeterEndpointRegistration) RegisterEndpoint added in v0.1.281

func (s *GreeterEndpointRegistration) RegisterEndpoint(server *grpc.Server) interface{}

RegisterEndpoint registers a DI server

func (*GreeterEndpointRegistration) RegisterGatewayHandler added in v0.1.313

func (s *GreeterEndpointRegistration) RegisterGatewayHandler(gwmux *runtime.ServeMux, conn *grpc.ClientConn)

Registery gateway handler

type GreeterEndpointRegistrationV2 added in v0.1.295

type GreeterEndpointRegistrationV2 struct {
	UnimplementedGreeterServerEndpointRegistration
}

GreeterEndpointRegistration defines the grpc server endpoint registration

func (*GreeterEndpointRegistrationV2) GetName added in v0.1.295

GetName returns the name of the service

func (*GreeterEndpointRegistrationV2) GetNewClient added in v0.1.295

func (s *GreeterEndpointRegistrationV2) GetNewClient(cc grpc.ClientConnInterface) interface{}

GetNewClient returns a new instance of a grpc client

func (*GreeterEndpointRegistrationV2) RegisterEndpoint added in v0.1.295

func (s *GreeterEndpointRegistrationV2) RegisterEndpoint(server *grpc.Server) interface{}

RegisterEndpoint registers a DI server

func (*GreeterEndpointRegistrationV2) RegisterEndpointV2 added in v0.1.295

func (s *GreeterEndpointRegistrationV2) RegisterEndpointV2(server *grpc.Server) interface{}

RegisterEndpoint registers a DI server

func (*GreeterEndpointRegistrationV2) RegisterGatewayHandler added in v0.1.313

func (s *GreeterEndpointRegistrationV2) RegisterGatewayHandler(gwmux *runtime.ServeMux, conn *grpc.ClientConn)

Registery gateway handler

type GreeterServer

type GreeterServer interface {
	// Sends a greeting
	SayHello(context.Context, *HelloRequest) (*HelloReply, error)
	// contains filtered or unexported methods
}

GreeterServer is the server API for Greeter service. All implementations must embed UnimplementedGreeterServer for forward compatibility

type HelloReply

type HelloReply struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

The response message containing the greetings

func (*HelloReply) Descriptor deprecated

func (*HelloReply) Descriptor() ([]byte, []int)

Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.

func (*HelloReply) GetMessage

func (x *HelloReply) GetMessage() string

func (*HelloReply) ProtoMessage

func (*HelloReply) ProtoMessage()

func (*HelloReply) ProtoReflect

func (x *HelloReply) ProtoReflect() protoreflect.Message

func (*HelloReply) Reset

func (x *HelloReply) Reset()

func (*HelloReply) String

func (x *HelloReply) String() string

type HelloReply2

type HelloReply2 struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*HelloReply2) Descriptor deprecated

func (*HelloReply2) Descriptor() ([]byte, []int)

Deprecated: Use HelloReply2.ProtoReflect.Descriptor instead.

func (*HelloReply2) GetMessage

func (x *HelloReply2) GetMessage() string

func (*HelloReply2) ProtoMessage

func (*HelloReply2) ProtoMessage()

func (*HelloReply2) ProtoReflect

func (x *HelloReply2) ProtoReflect() protoreflect.Message

func (*HelloReply2) Reset

func (x *HelloReply2) Reset()

func (*HelloReply2) String

func (x *HelloReply2) String() string

type HelloRequest

type HelloRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

The request message containing the user's name.

func (*HelloRequest) Descriptor deprecated

func (*HelloRequest) Descriptor() ([]byte, []int)

Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.

func (*HelloRequest) GetName

func (x *HelloRequest) GetName() string

func (*HelloRequest) ProtoMessage

func (*HelloRequest) ProtoMessage()

func (*HelloRequest) ProtoReflect

func (x *HelloRequest) ProtoReflect() protoreflect.Message

func (*HelloRequest) Reset

func (x *HelloRequest) Reset()

func (*HelloRequest) String

func (x *HelloRequest) String() string

type IGreeter2Server

type IGreeter2Server interface {
	SayHello(ctx context.Context, request *HelloRequest) (*HelloReply2, error)
	// contains filtered or unexported methods
}

IGreeter2Server defines the grpc server

func GetGreeter2ServerFromContainer added in v0.1.295

func GetGreeter2ServerFromContainer(ctn sarulabsdi.Container) IGreeter2Server

GetGreeter2ServerFromContainer fetches the downstream di.Request scoped service

func GetIGreeter2ServerFromContainer added in v0.1.295

func GetIGreeter2ServerFromContainer(ctn sarulabsdi.Container) IGreeter2Server

GetIGreeter2ServerFromContainer fetches the downstream di.Request scoped service

func SafeGetIGreeter2ServerFromContainer added in v0.1.295

func SafeGetIGreeter2ServerFromContainer(ctn sarulabsdi.Container) (IGreeter2Server, error)

SafeGetIGreeter2ServerFromContainer fetches the downstream di.Request scoped service

type IGreeter2Service

type IGreeter2Service interface {
	SayHello(request *HelloRequest) (*HelloReply2, error)
}

IGreeter2Service defines the required downstream service interface

func GetGreeter2ServiceFromContainer

func GetGreeter2ServiceFromContainer(ctn sarulabsdi.Container) IGreeter2Service

GetGreeter2ServiceFromContainer fetches the downstream di.Request scoped service

func GetIGreeter2ServiceFromContainer added in v0.1.120

func GetIGreeter2ServiceFromContainer(ctn sarulabsdi.Container) IGreeter2Service

GetIGreeter2ServiceFromContainer fetches the downstream di.Request scoped service

func SafeGetIGreeter2ServiceFromContainer added in v0.1.120

func SafeGetIGreeter2ServiceFromContainer(ctn sarulabsdi.Container) (IGreeter2Service, error)

SafeGetIGreeter2ServiceFromContainer fetches the downstream di.Request scoped service

type IGreeterServer

type IGreeterServer interface {
	SayHello(ctx context.Context, request *HelloRequest) (*HelloReply, error)
	// contains filtered or unexported methods
}

IGreeterServer defines the grpc server

func GetGreeterServerFromContainer added in v0.1.295

func GetGreeterServerFromContainer(ctn sarulabsdi.Container) IGreeterServer

GetGreeterServerFromContainer fetches the downstream di.Request scoped service

func GetIGreeterServerFromContainer added in v0.1.295

func GetIGreeterServerFromContainer(ctn sarulabsdi.Container) IGreeterServer

GetIGreeterServerFromContainer fetches the downstream di.Request scoped service

func SafeGetIGreeterServerFromContainer added in v0.1.295

func SafeGetIGreeterServerFromContainer(ctn sarulabsdi.Container) (IGreeterServer, error)

SafeGetIGreeterServerFromContainer fetches the downstream di.Request scoped service

type IGreeterService

type IGreeterService interface {
	SayHello(request *HelloRequest) (*HelloReply, error)
}

IGreeterService defines the required downstream service interface

func GetGreeterServiceFromContainer

func GetGreeterServiceFromContainer(ctn sarulabsdi.Container) IGreeterService

GetGreeterServiceFromContainer fetches the downstream di.Request scoped service

func GetIGreeterServiceFromContainer added in v0.1.120

func GetIGreeterServiceFromContainer(ctn sarulabsdi.Container) IGreeterService

GetIGreeterServiceFromContainer fetches the downstream di.Request scoped service

func SafeGetIGreeterServiceFromContainer added in v0.1.120

func SafeGetIGreeterServiceFromContainer(ctn sarulabsdi.Container) (IGreeterService, error)

SafeGetIGreeterServiceFromContainer fetches the downstream di.Request scoped service

type UnimplementedEdgeControlServiceServer added in v0.1.263

type UnimplementedEdgeControlServiceServer struct {
}

UnimplementedEdgeControlServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedEdgeControlServiceServer) WriteProps added in v0.1.263

type UnimplementedGreeter2Server

type UnimplementedGreeter2Server struct {
}

UnimplementedGreeter2Server must be embedded to have forward compatible implementations.

func (UnimplementedGreeter2Server) SayHello

type UnimplementedGreeter2ServerEndpointRegistration added in v0.1.313

type UnimplementedGreeter2ServerEndpointRegistration struct {
}

func (UnimplementedGreeter2ServerEndpointRegistration) RegisterGatewayHandler added in v0.1.313

func (UnimplementedGreeter2ServerEndpointRegistration) RegisterGatewayHandler(gwmux *runtime.ServeMux, conn *grpc.ClientConn)

type UnimplementedGreeter2ServerEx added in v0.1.277

type UnimplementedGreeter2ServerEx struct {
	UnimplemtedErrorResponse func() error
}

UnimplementedGreeter2ServerEx defines the grpc server

func (UnimplementedGreeter2ServerEx) SayHello added in v0.1.277

type UnimplementedGreeterServer

type UnimplementedGreeterServer struct {
}

UnimplementedGreeterServer must be embedded to have forward compatible implementations.

func (UnimplementedGreeterServer) SayHello

type UnimplementedGreeterServerEndpointRegistration added in v0.1.313

type UnimplementedGreeterServerEndpointRegistration struct {
}

func (UnimplementedGreeterServerEndpointRegistration) RegisterGatewayHandler added in v0.1.313

func (UnimplementedGreeterServerEndpointRegistration) RegisterGatewayHandler(gwmux *runtime.ServeMux, conn *grpc.ClientConn)

type UnimplementedGreeterServerEx added in v0.1.277

type UnimplementedGreeterServerEx struct {
	UnimplemtedErrorResponse func() error
}

UnimplementedGreeterServerEx defines the grpc server

func (UnimplementedGreeterServerEx) SayHello added in v0.1.277

type UnsafeEdgeControlServiceServer added in v0.1.263

type UnsafeEdgeControlServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeEdgeControlServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EdgeControlServiceServer will result in compilation errors.

type UnsafeGreeter2Server

type UnsafeGreeter2Server interface {
	// contains filtered or unexported methods
}

UnsafeGreeter2Server may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to Greeter2Server will result in compilation errors.

type UnsafeGreeterServer

type UnsafeGreeterServer interface {
	// contains filtered or unexported methods
}

UnsafeGreeterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GreeterServer will result in compilation errors.

type WritePropsRequest added in v0.1.263

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

func (*WritePropsRequest) Descriptor deprecated added in v0.1.263

func (*WritePropsRequest) Descriptor() ([]byte, []int)

Deprecated: Use WritePropsRequest.ProtoReflect.Descriptor instead.

func (*WritePropsRequest) ProtoMessage added in v0.1.263

func (*WritePropsRequest) ProtoMessage()

func (*WritePropsRequest) ProtoReflect added in v0.1.263

func (x *WritePropsRequest) ProtoReflect() protoreflect.Message

func (*WritePropsRequest) Reset added in v0.1.263

func (x *WritePropsRequest) Reset()

func (*WritePropsRequest) String added in v0.1.263

func (x *WritePropsRequest) String() string

type WritePropsResponse added in v0.1.263

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

func (*WritePropsResponse) Descriptor deprecated added in v0.1.263

func (*WritePropsResponse) Descriptor() ([]byte, []int)

Deprecated: Use WritePropsResponse.ProtoReflect.Descriptor instead.

func (*WritePropsResponse) ProtoMessage added in v0.1.263

func (*WritePropsResponse) ProtoMessage()

func (*WritePropsResponse) ProtoReflect added in v0.1.263

func (x *WritePropsResponse) ProtoReflect() protoreflect.Message

func (*WritePropsResponse) Reset added in v0.1.263

func (x *WritePropsResponse) Reset()

func (*WritePropsResponse) String added in v0.1.263

func (x *WritePropsResponse) String() string

Jump to

Keyboard shortcuts

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