protos

package
v0.0.0-...-691f4a8 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 8 Imported by: 0

README

protoc --go_out=. --go_opt=paths=source_relative
--go-grpc_out=. --go-grpc_opt=paths=source_relative
simple.proto

grpcurl -plaintext localhost:7070 list grpcurl -plaintext localhost:7070 list protos.DeviceConfigurator grpcurl -plaintext localhost:7070 describe protos.DeviceConfigurator

grpcurl -plaintext -format json -d '{"configWiFi": "ciao"}'
localhost:7070 protos.DeviceConfigurator.UpdateDeviceConfig

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeviceConfigurator_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "protos.DeviceConfigurator",
	HandlerType: (*DeviceConfiguratorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "UpdateDeviceConfig",
			Handler:    _DeviceConfigurator_UpdateDeviceConfig_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "simple.proto",
}

DeviceConfigurator_ServiceDesc is the grpc.ServiceDesc for DeviceConfigurator 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_simple_proto protoreflect.FileDescriptor

Functions

func RegisterDeviceConfiguratorServer

func RegisterDeviceConfiguratorServer(s grpc.ServiceRegistrar, srv DeviceConfiguratorServer)

Types

type ConfigResult

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

func (*ConfigResult) Descriptor deprecated

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

Deprecated: Use ConfigResult.ProtoReflect.Descriptor instead.

func (*ConfigResult) GetAck

func (x *ConfigResult) GetAck() string

func (*ConfigResult) ProtoMessage

func (*ConfigResult) ProtoMessage()

func (*ConfigResult) ProtoReflect

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

func (*ConfigResult) Reset

func (x *ConfigResult) Reset()

func (*ConfigResult) String

func (x *ConfigResult) String() string

type DeviceConfig

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

func (*DeviceConfig) Descriptor deprecated

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

Deprecated: Use DeviceConfig.ProtoReflect.Descriptor instead.

func (*DeviceConfig) GetConfigWiFi

func (x *DeviceConfig) GetConfigWiFi() string

func (*DeviceConfig) ProtoMessage

func (*DeviceConfig) ProtoMessage()

func (*DeviceConfig) ProtoReflect

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

func (*DeviceConfig) Reset

func (x *DeviceConfig) Reset()

func (*DeviceConfig) String

func (x *DeviceConfig) String() string

type DeviceConfiguratorClient

type DeviceConfiguratorClient interface {
	UpdateDeviceConfig(ctx context.Context, in *DeviceConfig, opts ...grpc.CallOption) (*ConfigResult, error)
}

DeviceConfiguratorClient is the client API for DeviceConfigurator 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.

type DeviceConfiguratorServer

type DeviceConfiguratorServer interface {
	UpdateDeviceConfig(context.Context, *DeviceConfig) (*ConfigResult, error)
	// contains filtered or unexported methods
}

DeviceConfiguratorServer is the server API for DeviceConfigurator service. All implementations must embed UnimplementedDeviceConfiguratorServer for forward compatibility

type UnimplementedDeviceConfiguratorServer

type UnimplementedDeviceConfiguratorServer struct {
}

UnimplementedDeviceConfiguratorServer must be embedded to have forward compatible implementations.

func (UnimplementedDeviceConfiguratorServer) UpdateDeviceConfig

type UnsafeDeviceConfiguratorServer

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

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

Jump to

Keyboard shortcuts

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