controller

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AuthService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "controller.AuthService",
	HandlerType: (*AuthServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ExtendToken",
			Handler:    _AuthService_ExtendToken_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "controller.proto",
}

AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService 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_controller_proto protoreflect.FileDescriptor
View Source
var StateService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "controller.StateService",
	HandlerType: (*StateServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetDeviceState",
			Handler:    _StateService_GetDeviceState_Handler,
		},
		{
			MethodName: "SetDeviceState",
			Handler:    _StateService_SetDeviceState_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "controller.proto",
}

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

Functions

func RegisterAuthServiceServer

func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)

func RegisterStateServiceServer

func RegisterStateServiceServer(s grpc.ServiceRegistrar, srv StateServiceServer)

Types

type AuthServiceClient

type AuthServiceClient interface {
	// Get a snapshot of the state of a single fan coil unit.
	ExtendToken(ctx context.Context, in *ExtendTokenRequest, opts ...grpc.CallOption) (*ExtendTokenResponse, error)
}

AuthServiceClient is the client API for AuthService 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 AuthServiceServer

type AuthServiceServer interface {
	// Get a snapshot of the state of a single fan coil unit.
	ExtendToken(context.Context, *ExtendTokenRequest) (*ExtendTokenResponse, error)
	// contains filtered or unexported methods
}

AuthServiceServer is the server API for AuthService service. All implementations must embed UnimplementedAuthServiceServer for forward compatibility

type Command

type Command struct {

	// Types that are assignable to Command:
	//	*Command_SetStateRequest
	Command isCommand_Command `protobuf_oneof:"command"`
	// contains filtered or unexported fields
}

Command is used to issue commands to the controller from pub/sub.

func (*Command) Descriptor deprecated

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

Deprecated: Use Command.ProtoReflect.Descriptor instead.

func (*Command) GetCommand

func (m *Command) GetCommand() isCommand_Command

func (*Command) GetSetStateRequest

func (x *Command) GetSetStateRequest() *fancoil.SetStateRequest

func (*Command) ProtoMessage

func (*Command) ProtoMessage()

func (*Command) ProtoReflect

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

func (*Command) Reset

func (x *Command) Reset()

func (*Command) String

func (x *Command) String() string

type Command_SetStateRequest

type Command_SetStateRequest struct {
	SetStateRequest *fancoil.SetStateRequest `protobuf:"bytes,1,opt,name=set_state_request,json=setStateRequest,proto3,oneof"`
}

type Configuration

type Configuration struct {
	CloudIotDeviceName string `protobuf:"bytes,1,opt,name=cloud_iot_device_name,json=cloudIotDeviceName,proto3" json:"cloud_iot_device_name,omitempty"`
	// Path to USB-to-RS485 device connected to modbus to use for talking to the heat pump (CX34).
	HeatpumpModbusDevicePath string `` /* 137-byte string literal not displayed */
	// Path to USB-to-RS485 device connected to modbus to use for talking to the heat pump (CX34).
	FanCoilsModbusDevicePath string `` /* 139-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Configuration) Descriptor deprecated

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

Deprecated: Use Configuration.ProtoReflect.Descriptor instead.

func (*Configuration) GetCloudIotDeviceName

func (x *Configuration) GetCloudIotDeviceName() string

func (*Configuration) GetFanCoilsModbusDevicePath

func (x *Configuration) GetFanCoilsModbusDevicePath() string

func (*Configuration) GetHeatpumpModbusDevicePath

func (x *Configuration) GetHeatpumpModbusDevicePath() string

func (*Configuration) ProtoMessage

func (*Configuration) ProtoMessage()

func (*Configuration) ProtoReflect

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

func (*Configuration) Reset

func (x *Configuration) Reset()

func (*Configuration) String

func (x *Configuration) String() string

type DeviceAccessToken

type DeviceAccessToken struct {
	UserId     string               `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Expiration *timestamp.Timestamp `protobuf:"bytes,2,opt,name=expiration,proto3" json:"expiration,omitempty"`
	// Signature provided by the server of the wire-encoded message without the
	// signature field.
	Signature string `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

A wire-encoded version of this proto is passed from the device to the server to authenticate.

func (*DeviceAccessToken) Descriptor deprecated

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

Deprecated: Use DeviceAccessToken.ProtoReflect.Descriptor instead.

func (*DeviceAccessToken) GetExpiration

func (x *DeviceAccessToken) GetExpiration() *timestamp.Timestamp

func (*DeviceAccessToken) GetSignature

func (x *DeviceAccessToken) GetSignature() string

func (*DeviceAccessToken) GetUserId

func (x *DeviceAccessToken) GetUserId() string

func (*DeviceAccessToken) ProtoMessage

func (*DeviceAccessToken) ProtoMessage()

func (*DeviceAccessToken) ProtoReflect

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

func (*DeviceAccessToken) Reset

func (x *DeviceAccessToken) Reset()

func (*DeviceAccessToken) String

func (x *DeviceAccessToken) String() string

type DeviceState

type DeviceState struct {

	// The name of the device.
	//
	// For fancoils, looks like "fan-coils/[id]".
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// If the device is a fan coil unit, the state of the fan coil unit.
	FancoilState *fancoil.State `protobuf:"bytes,2,opt,name=fancoil_state,json=fancoilState,proto3" json:"fancoil_state,omitempty"`
	// contains filtered or unexported fields
}

Describes the state of a fan coil unit or other device managed by the controller.

func (*DeviceState) Descriptor deprecated

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

Deprecated: Use DeviceState.ProtoReflect.Descriptor instead.

func (*DeviceState) GetFancoilState

func (x *DeviceState) GetFancoilState() *fancoil.State

func (*DeviceState) GetName

func (x *DeviceState) GetName() string

func (*DeviceState) ProtoMessage

func (*DeviceState) ProtoMessage()

func (*DeviceState) ProtoReflect

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

func (*DeviceState) Reset

func (x *DeviceState) Reset()

func (*DeviceState) String

func (x *DeviceState) String() string

type ExtendTokenRequest

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

func (*ExtendTokenRequest) Descriptor deprecated

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

Deprecated: Use ExtendTokenRequest.ProtoReflect.Descriptor instead.

func (*ExtendTokenRequest) GetToken

func (x *ExtendTokenRequest) GetToken() string

func (*ExtendTokenRequest) ProtoMessage

func (*ExtendTokenRequest) ProtoMessage()

func (*ExtendTokenRequest) ProtoReflect

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

func (*ExtendTokenRequest) Reset

func (x *ExtendTokenRequest) Reset()

func (*ExtendTokenRequest) String

func (x *ExtendTokenRequest) String() string

type ExtendTokenResponse

type ExtendTokenResponse struct {
	RefreshedToken string               `protobuf:"bytes,1,opt,name=refreshed_token,json=refreshedToken,proto3" json:"refreshed_token,omitempty"`
	Expiration     *timestamp.Timestamp `protobuf:"bytes,2,opt,name=expiration,proto3" json:"expiration,omitempty"`
	// contains filtered or unexported fields
}

func (*ExtendTokenResponse) Descriptor deprecated

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

Deprecated: Use ExtendTokenResponse.ProtoReflect.Descriptor instead.

func (*ExtendTokenResponse) GetExpiration

func (x *ExtendTokenResponse) GetExpiration() *timestamp.Timestamp

func (*ExtendTokenResponse) GetRefreshedToken

func (x *ExtendTokenResponse) GetRefreshedToken() string

func (*ExtendTokenResponse) ProtoMessage

func (*ExtendTokenResponse) ProtoMessage()

func (*ExtendTokenResponse) ProtoReflect

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

func (*ExtendTokenResponse) Reset

func (x *ExtendTokenResponse) Reset()

func (*ExtendTokenResponse) String

func (x *ExtendTokenResponse) String() string

type GetDeviceStateRequest

type GetDeviceStateRequest struct {

	// The name of the device.
	//
	// For fancoils, looks like "fan-coils/[id]".
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Requests the state of a device .

func (*GetDeviceStateRequest) Descriptor deprecated

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

Deprecated: Use GetDeviceStateRequest.ProtoReflect.Descriptor instead.

func (*GetDeviceStateRequest) GetName

func (x *GetDeviceStateRequest) GetName() string

func (*GetDeviceStateRequest) ProtoMessage

func (*GetDeviceStateRequest) ProtoMessage()

func (*GetDeviceStateRequest) ProtoReflect

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

func (*GetDeviceStateRequest) Reset

func (x *GetDeviceStateRequest) Reset()

func (*GetDeviceStateRequest) String

func (x *GetDeviceStateRequest) String() string

type SetDeviceStateRequest

type SetDeviceStateRequest struct {
	State *DeviceState `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"`
	// contains filtered or unexported fields
}

Sets the state of the device.

func (*SetDeviceStateRequest) Descriptor deprecated

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

Deprecated: Use SetDeviceStateRequest.ProtoReflect.Descriptor instead.

func (*SetDeviceStateRequest) GetState

func (x *SetDeviceStateRequest) GetState() *DeviceState

func (*SetDeviceStateRequest) ProtoMessage

func (*SetDeviceStateRequest) ProtoMessage()

func (*SetDeviceStateRequest) ProtoReflect

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

func (*SetDeviceStateRequest) Reset

func (x *SetDeviceStateRequest) Reset()

func (*SetDeviceStateRequest) String

func (x *SetDeviceStateRequest) String() string

type SetDeviceStateResponse

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

func (*SetDeviceStateResponse) Descriptor deprecated

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

Deprecated: Use SetDeviceStateResponse.ProtoReflect.Descriptor instead.

func (*SetDeviceStateResponse) ProtoMessage

func (*SetDeviceStateResponse) ProtoMessage()

func (*SetDeviceStateResponse) ProtoReflect

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

func (*SetDeviceStateResponse) Reset

func (x *SetDeviceStateResponse) Reset()

func (*SetDeviceStateResponse) String

func (x *SetDeviceStateResponse) String() string

type StateServiceClient

type StateServiceClient interface {
	// Get a snapshot of the state of a single fan coil unit.
	GetDeviceState(ctx context.Context, in *GetDeviceStateRequest, opts ...grpc.CallOption) (*DeviceState, error)
	// Set some parameters of a device.
	SetDeviceState(ctx context.Context, in *SetDeviceStateRequest, opts ...grpc.CallOption) (*SetDeviceStateResponse, error)
}

StateServiceClient is the client API for StateService 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 StateServiceServer

type StateServiceServer interface {
	// Get a snapshot of the state of a single fan coil unit.
	GetDeviceState(context.Context, *GetDeviceStateRequest) (*DeviceState, error)
	// Set some parameters of a device.
	SetDeviceState(context.Context, *SetDeviceStateRequest) (*SetDeviceStateResponse, error)
	// contains filtered or unexported methods
}

StateServiceServer is the server API for StateService service. All implementations must embed UnimplementedStateServiceServer for forward compatibility

type UnimplementedAuthServiceServer

type UnimplementedAuthServiceServer struct {
}

UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthServiceServer) ExtendToken

type UnimplementedStateServiceServer

type UnimplementedStateServiceServer struct {
}

UnimplementedStateServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedStateServiceServer) GetDeviceState

func (UnimplementedStateServiceServer) SetDeviceState

type UnsafeAuthServiceServer

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

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

type UnsafeStateServiceServer

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

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

Jump to

Keyboard shortcuts

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