hue

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Lights_GetGroups_FullMethodName  = "/hue.Lights/GetGroups"
	Lights_GetSensors_FullMethodName = "/hue.Lights/GetSensors"
	Lights_SwitchOn_FullMethodName   = "/hue.Lights/SwitchOn"
	Lights_SwitchOff_FullMethodName  = "/hue.Lights/SwitchOff"
	Lights_Blink_FullMethodName      = "/hue.Lights/Blink"
)

Variables

View Source
var Lights_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "hue.Lights",
	HandlerType: (*LightsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetGroups",
			Handler:    _Lights_GetGroups_Handler,
		},
		{
			MethodName: "GetSensors",
			Handler:    _Lights_GetSensors_Handler,
		},
		{
			MethodName: "SwitchOn",
			Handler:    _Lights_SwitchOn_Handler,
		},
		{
			MethodName: "SwitchOff",
			Handler:    _Lights_SwitchOff_Handler,
		},
		{
			MethodName: "Blink",
			Handler:    _Lights_Blink_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "hue.proto",
}

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

Functions

func RegisterLightsServer

func RegisterLightsServer(s grpc.ServiceRegistrar, srv LightsServer)

Types

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type Group

type Group struct {
	ID         int32  `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Name       string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	On         bool   `protobuf:"varint,3,opt,name=On,proto3" json:"On,omitempty"`
	Brightness int32  `protobuf:"varint,4,opt,name=Brightness,proto3" json:"Brightness,omitempty"`
	// contains filtered or unexported fields
}

func (*Group) Descriptor deprecated

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

Deprecated: Use Group.ProtoReflect.Descriptor instead.

func (*Group) GetBrightness

func (x *Group) GetBrightness() int32

func (*Group) GetID

func (x *Group) GetID() int32

func (*Group) GetName

func (x *Group) GetName() string

func (*Group) GetOn

func (x *Group) GetOn() bool

func (*Group) ProtoMessage

func (*Group) ProtoMessage()

func (*Group) ProtoReflect

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

func (*Group) Reset

func (x *Group) Reset()

func (*Group) String

func (x *Group) String() string

type Groups

type Groups struct {
	Groups []*Group `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"`
	// contains filtered or unexported fields
}

func (*Groups) Descriptor deprecated

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

Deprecated: Use Groups.ProtoReflect.Descriptor instead.

func (*Groups) GetGroups

func (x *Groups) GetGroups() []*Group

func (*Groups) ProtoMessage

func (*Groups) ProtoMessage()

func (*Groups) ProtoReflect

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

func (*Groups) Reset

func (x *Groups) Reset()

func (*Groups) String

func (x *Groups) String() string

type LightsClient

type LightsClient interface {
	GetGroups(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Groups, error)
	GetSensors(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Sensors, error)
	SwitchOn(ctx context.Context, in *LightsRequest, opts ...grpc.CallOption) (*LightsResponse, error)
	SwitchOff(ctx context.Context, in *LightsRequest, opts ...grpc.CallOption) (*LightsResponse, error)
	Blink(ctx context.Context, in *LightsRequest, opts ...grpc.CallOption) (*LightsResponse, error)
}

LightsClient is the client API for Lights 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 NewLightsClient

func NewLightsClient(cc grpc.ClientConnInterface) LightsClient

type LightsRequest

type LightsRequest struct {
	Group int32 `protobuf:"varint,1,opt,name=Group,proto3" json:"Group,omitempty"`
	// Value between 0 and 1
	BrightnessPercent float32 `protobuf:"fixed32,2,opt,name=BrightnessPercent,proto3" json:"BrightnessPercent,omitempty"`
	// Value between 0 and 1
	SaturationPercent float32 `protobuf:"fixed32,3,opt,name=SaturationPercent,proto3" json:"SaturationPercent,omitempty"`
	// Value between 0 and 65535
	// Red: 65535
	// Green: 25500
	// Blue: 46920
	Hue float32 `protobuf:"fixed32,4,opt,name=Hue,proto3" json:"Hue,omitempty"`
	// contains filtered or unexported fields
}

func (*LightsRequest) Descriptor deprecated

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

Deprecated: Use LightsRequest.ProtoReflect.Descriptor instead.

func (*LightsRequest) GetBrightnessPercent

func (x *LightsRequest) GetBrightnessPercent() float32

func (*LightsRequest) GetGroup

func (x *LightsRequest) GetGroup() int32

func (*LightsRequest) GetHue

func (x *LightsRequest) GetHue() float32

func (*LightsRequest) GetSaturationPercent

func (x *LightsRequest) GetSaturationPercent() float32

func (*LightsRequest) ProtoMessage

func (*LightsRequest) ProtoMessage()

func (*LightsRequest) ProtoReflect

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

func (*LightsRequest) Reset

func (x *LightsRequest) Reset()

func (*LightsRequest) String

func (x *LightsRequest) String() string

type LightsResponse

type LightsResponse struct {
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

func (*LightsResponse) Descriptor deprecated

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

Deprecated: Use LightsResponse.ProtoReflect.Descriptor instead.

func (*LightsResponse) GetSuccess

func (x *LightsResponse) GetSuccess() bool

func (*LightsResponse) ProtoMessage

func (*LightsResponse) ProtoMessage()

func (*LightsResponse) ProtoReflect

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

func (*LightsResponse) Reset

func (x *LightsResponse) Reset()

func (*LightsResponse) String

func (x *LightsResponse) String() string

type LightsServer

type LightsServer interface {
	GetGroups(context.Context, *Empty) (*Groups, error)
	GetSensors(context.Context, *Empty) (*Sensors, error)
	SwitchOn(context.Context, *LightsRequest) (*LightsResponse, error)
	SwitchOff(context.Context, *LightsRequest) (*LightsResponse, error)
	Blink(context.Context, *LightsRequest) (*LightsResponse, error)
	// contains filtered or unexported methods
}

LightsServer is the server API for Lights service. All implementations must embed UnimplementedLightsServer for forward compatibility.

type Sensor

type Sensor struct {
	ID               int32  `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	UniqueID         string `protobuf:"bytes,2,opt,name=UniqueID,proto3" json:"UniqueID,omitempty"`
	Name             string `protobuf:"bytes,3,opt,name=Name,proto3" json:"Name,omitempty"`
	Type             string `protobuf:"bytes,4,opt,name=Type,proto3" json:"Type,omitempty"`
	ManufacturerName string `protobuf:"bytes,5,opt,name=ManufacturerName,proto3" json:"ManufacturerName,omitempty"`
	ModelID          string `protobuf:"bytes,6,opt,name=ModelID,proto3" json:"ModelID,omitempty"`
	SWVersion        string `protobuf:"bytes,7,opt,name=SWVersion,proto3" json:"SWVersion,omitempty"`
	State            *State `protobuf:"bytes,8,opt,name=State,proto3" json:"State,omitempty"`
	// contains filtered or unexported fields
}

func (*Sensor) Descriptor deprecated

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

Deprecated: Use Sensor.ProtoReflect.Descriptor instead.

func (*Sensor) GetID

func (x *Sensor) GetID() int32

func (*Sensor) GetManufacturerName

func (x *Sensor) GetManufacturerName() string

func (*Sensor) GetModelID

func (x *Sensor) GetModelID() string

func (*Sensor) GetName

func (x *Sensor) GetName() string

func (*Sensor) GetSWVersion

func (x *Sensor) GetSWVersion() string

func (*Sensor) GetState

func (x *Sensor) GetState() *State

func (*Sensor) GetType

func (x *Sensor) GetType() string

func (*Sensor) GetUniqueID

func (x *Sensor) GetUniqueID() string

func (*Sensor) ProtoMessage

func (*Sensor) ProtoMessage()

func (*Sensor) ProtoReflect

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

func (*Sensor) Reset

func (x *Sensor) Reset()

func (*Sensor) String

func (x *Sensor) String() string

type SensorRequest

type SensorRequest struct {
	Sensor int32 `protobuf:"varint,1,opt,name=Sensor,proto3" json:"Sensor,omitempty"`
	// contains filtered or unexported fields
}

func (*SensorRequest) Descriptor deprecated

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

Deprecated: Use SensorRequest.ProtoReflect.Descriptor instead.

func (*SensorRequest) GetSensor

func (x *SensorRequest) GetSensor() int32

func (*SensorRequest) ProtoMessage

func (*SensorRequest) ProtoMessage()

func (*SensorRequest) ProtoReflect

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

func (*SensorRequest) Reset

func (x *SensorRequest) Reset()

func (*SensorRequest) String

func (x *SensorRequest) String() string

type Sensors

type Sensors struct {
	Sensors []*Sensor `protobuf:"bytes,1,rep,name=sensors,proto3" json:"sensors,omitempty"`
	// contains filtered or unexported fields
}

func (*Sensors) Descriptor deprecated

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

Deprecated: Use Sensors.ProtoReflect.Descriptor instead.

func (*Sensors) GetSensors

func (x *Sensors) GetSensors() []*Sensor

func (*Sensors) ProtoMessage

func (*Sensors) ProtoMessage()

func (*Sensors) ProtoReflect

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

func (*Sensors) Reset

func (x *Sensors) Reset()

func (*Sensors) String

func (x *Sensors) String() string

type State

type State struct {
	ButtonEvent int32  `protobuf:"varint,1,opt,name=ButtonEvent,proto3" json:"ButtonEvent,omitempty"`
	Dark        bool   `protobuf:"varint,2,opt,name=Dark,proto3" json:"Dark,omitempty"`
	Daylight    bool   `protobuf:"varint,3,opt,name=Daylight,proto3" json:"Daylight,omitempty"`
	LastUpdated string `protobuf:"bytes,4,opt,name=LastUpdated,proto3" json:"LastUpdated,omitempty"`
	LightLevel  int32  `protobuf:"varint,5,opt,name=LightLevel,proto3" json:"LightLevel,omitempty"`
	Presence    bool   `protobuf:"varint,6,opt,name=Presence,proto3" json:"Presence,omitempty"`
	Status      int32  `protobuf:"varint,7,opt,name=Status,proto3" json:"Status,omitempty"`
	Temperature int32  `protobuf:"varint,8,opt,name=Temperature,proto3" json:"Temperature,omitempty"`
	// contains filtered or unexported fields
}

func (*State) Descriptor deprecated

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

Deprecated: Use State.ProtoReflect.Descriptor instead.

func (*State) GetButtonEvent

func (x *State) GetButtonEvent() int32

func (*State) GetDark

func (x *State) GetDark() bool

func (*State) GetDaylight

func (x *State) GetDaylight() bool

func (*State) GetLastUpdated

func (x *State) GetLastUpdated() string

func (*State) GetLightLevel

func (x *State) GetLightLevel() int32

func (*State) GetPresence

func (x *State) GetPresence() bool

func (*State) GetStatus

func (x *State) GetStatus() int32

func (*State) GetTemperature

func (x *State) GetTemperature() int32

func (*State) ProtoMessage

func (*State) ProtoMessage()

func (*State) ProtoReflect

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

func (*State) Reset

func (x *State) Reset()

func (*State) String

func (x *State) String() string

type UnimplementedLightsServer

type UnimplementedLightsServer struct{}

UnimplementedLightsServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedLightsServer) GetGroups

func (UnimplementedLightsServer) GetSensors

func (UnimplementedLightsServer) SwitchOff

func (UnimplementedLightsServer) SwitchOn

type UnsafeLightsServer added in v0.7.2

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

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

Jump to

Keyboard shortcuts

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