bladeapiv1alpha1

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BladeAgentService_EmitEvent_FullMethodName              = "/api.bladeapi.v1alpha1.BladeAgentService/EmitEvent"
	BladeAgentService_WaitForIdentifyConfirm_FullMethodName = "/api.bladeapi.v1alpha1.BladeAgentService/WaitForIdentifyConfirm"
	BladeAgentService_SetFanSpeed_FullMethodName            = "/api.bladeapi.v1alpha1.BladeAgentService/SetFanSpeed"
	BladeAgentService_SetStealthMode_FullMethodName         = "/api.bladeapi.v1alpha1.BladeAgentService/SetStealthMode"
	BladeAgentService_GetStatus_FullMethodName              = "/api.bladeapi.v1alpha1.BladeAgentService/GetStatus"
)

Variables

View Source
var (
	Event_name = map[int32]string{
		0: "IDENTIFY",
		1: "IDENTIFY_CONFIRM",
		2: "CRITICAL",
		3: "CRITICAL_RESET",
	}
	Event_value = map[string]int32{
		"IDENTIFY":         0,
		"IDENTIFY_CONFIRM": 1,
		"CRITICAL":         2,
		"CRITICAL_RESET":   3,
	}
)

Enum value maps for Event.

View Source
var (
	FanUnit_name = map[int32]string{
		0: "DEFAULT",
		1: "SMART",
	}
	FanUnit_value = map[string]int32{
		"DEFAULT": 0,
		"SMART":   1,
	}
)

Enum value maps for FanUnit.

View Source
var (
	PowerStatus_name = map[int32]string{
		0: "POE_OR_USBC",
		1: "POE_802_AT",
	}
	PowerStatus_value = map[string]int32{
		"POE_OR_USBC": 0,
		"POE_802_AT":  1,
	}
)

Enum value maps for PowerStatus.

View Source
var BladeAgentService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.bladeapi.v1alpha1.BladeAgentService",
	HandlerType: (*BladeAgentServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "EmitEvent",
			Handler:    _BladeAgentService_EmitEvent_Handler,
		},
		{
			MethodName: "WaitForIdentifyConfirm",
			Handler:    _BladeAgentService_WaitForIdentifyConfirm_Handler,
		},
		{
			MethodName: "SetFanSpeed",
			Handler:    _BladeAgentService_SetFanSpeed_Handler,
		},
		{
			MethodName: "SetStealthMode",
			Handler:    _BladeAgentService_SetStealthMode_Handler,
		},
		{
			MethodName: "GetStatus",
			Handler:    _BladeAgentService_GetStatus_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/bladeapi/v1alpha1/blade.proto",
}

BladeAgentService_ServiceDesc is the grpc.ServiceDesc for BladeAgentService 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_api_bladeapi_v1alpha1_blade_proto protoreflect.FileDescriptor

Functions

func RegisterBladeAgentServiceServer

func RegisterBladeAgentServiceServer(s grpc.ServiceRegistrar, srv BladeAgentServiceServer)

Types

type BladeAgentServiceClient

type BladeAgentServiceClient interface {
	// EmitEvent emits an event to the blade
	EmitEvent(ctx context.Context, in *EmitEventRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// WaitForIdentifyConfirm blocks until the blades button is pressed
	WaitForIdentifyConfirm(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	SetFanSpeed(ctx context.Context, in *SetFanSpeedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	SetStealthMode(ctx context.Context, in *StealthModeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*StatusResponse, error)
}

BladeAgentServiceClient is the client API for BladeAgentService 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 BladeAgentServiceServer

type BladeAgentServiceServer interface {
	// EmitEvent emits an event to the blade
	EmitEvent(context.Context, *EmitEventRequest) (*emptypb.Empty, error)
	// WaitForIdentifyConfirm blocks until the blades button is pressed
	WaitForIdentifyConfirm(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	SetFanSpeed(context.Context, *SetFanSpeedRequest) (*emptypb.Empty, error)
	SetStealthMode(context.Context, *StealthModeRequest) (*emptypb.Empty, error)
	GetStatus(context.Context, *emptypb.Empty) (*StatusResponse, error)
	// contains filtered or unexported methods
}

BladeAgentServiceServer is the server API for BladeAgentService service. All implementations must embed UnimplementedBladeAgentServiceServer for forward compatibility

type EmitEventRequest

type EmitEventRequest struct {
	Event Event `protobuf:"varint,1,opt,name=event,proto3,enum=api.bladeapi.v1alpha1.Event" json:"event,omitempty"`
	// contains filtered or unexported fields
}

func (*EmitEventRequest) Descriptor deprecated

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

Deprecated: Use EmitEventRequest.ProtoReflect.Descriptor instead.

func (*EmitEventRequest) GetEvent

func (x *EmitEventRequest) GetEvent() Event

func (*EmitEventRequest) ProtoMessage

func (*EmitEventRequest) ProtoMessage()

func (*EmitEventRequest) ProtoReflect

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

func (*EmitEventRequest) Reset

func (x *EmitEventRequest) Reset()

func (*EmitEventRequest) String

func (x *EmitEventRequest) String() string

type Event

type Event int32

Event is an event the agent reacts to

const (
	Event_IDENTIFY         Event = 0
	Event_IDENTIFY_CONFIRM Event = 1
	Event_CRITICAL         Event = 2
	Event_CRITICAL_RESET   Event = 3
)

func (Event) Descriptor

func (Event) Descriptor() protoreflect.EnumDescriptor

func (Event) Enum

func (x Event) Enum() *Event

func (Event) EnumDescriptor deprecated

func (Event) EnumDescriptor() ([]byte, []int)

Deprecated: Use Event.Descriptor instead.

func (Event) Number

func (x Event) Number() protoreflect.EnumNumber

func (Event) String

func (x Event) String() string

func (Event) Type

func (Event) Type() protoreflect.EnumType

type FanUnit

type FanUnit int32

FanUnit defines the fan unit detected by the blade

const (
	FanUnit_DEFAULT FanUnit = 0
	FanUnit_SMART   FanUnit = 1
)

func (FanUnit) Descriptor

func (FanUnit) Descriptor() protoreflect.EnumDescriptor

func (FanUnit) Enum

func (x FanUnit) Enum() *FanUnit

func (FanUnit) EnumDescriptor deprecated

func (FanUnit) EnumDescriptor() ([]byte, []int)

Deprecated: Use FanUnit.Descriptor instead.

func (FanUnit) Number

func (x FanUnit) Number() protoreflect.EnumNumber

func (FanUnit) String

func (x FanUnit) String() string

func (FanUnit) Type

func (FanUnit) Type() protoreflect.EnumType

type PowerStatus

type PowerStatus int32

PowerStatus defines the power status of the blade

const (
	PowerStatus_POE_OR_USBC PowerStatus = 0
	PowerStatus_POE_802_AT  PowerStatus = 1
)

func (PowerStatus) Descriptor

func (PowerStatus) Enum

func (x PowerStatus) Enum() *PowerStatus

func (PowerStatus) EnumDescriptor deprecated

func (PowerStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use PowerStatus.Descriptor instead.

func (PowerStatus) Number

func (x PowerStatus) Number() protoreflect.EnumNumber

func (PowerStatus) String

func (x PowerStatus) String() string

func (PowerStatus) Type

type SetFanSpeedRequest

type SetFanSpeedRequest struct {
	Percent int64 `protobuf:"varint,1,opt,name=percent,proto3" json:"percent,omitempty"`
	// contains filtered or unexported fields
}

func (*SetFanSpeedRequest) Descriptor deprecated

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

Deprecated: Use SetFanSpeedRequest.ProtoReflect.Descriptor instead.

func (*SetFanSpeedRequest) GetPercent

func (x *SetFanSpeedRequest) GetPercent() int64

func (*SetFanSpeedRequest) ProtoMessage

func (*SetFanSpeedRequest) ProtoMessage()

func (*SetFanSpeedRequest) ProtoReflect

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

func (*SetFanSpeedRequest) Reset

func (x *SetFanSpeedRequest) Reset()

func (*SetFanSpeedRequest) String

func (x *SetFanSpeedRequest) String() string

type StatusResponse

type StatusResponse struct {
	StealthMode    bool        `protobuf:"varint,1,opt,name=stealth_mode,json=stealthMode,proto3" json:"stealth_mode,omitempty"`
	IdentifyActive bool        `protobuf:"varint,2,opt,name=identify_active,json=identifyActive,proto3" json:"identify_active,omitempty"`
	CriticalActive bool        `protobuf:"varint,3,opt,name=critical_active,json=criticalActive,proto3" json:"critical_active,omitempty"`
	Temperature    int64       `protobuf:"varint,4,opt,name=temperature,proto3" json:"temperature,omitempty"`
	FanRpm         int64       `protobuf:"varint,5,opt,name=fan_rpm,json=fanRpm,proto3" json:"fan_rpm,omitempty"`
	PowerStatus    PowerStatus `` /* 134-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*StatusResponse) Descriptor deprecated

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

Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.

func (*StatusResponse) GetCriticalActive

func (x *StatusResponse) GetCriticalActive() bool

func (*StatusResponse) GetFanRpm

func (x *StatusResponse) GetFanRpm() int64

func (*StatusResponse) GetIdentifyActive

func (x *StatusResponse) GetIdentifyActive() bool

func (*StatusResponse) GetPowerStatus

func (x *StatusResponse) GetPowerStatus() PowerStatus

func (*StatusResponse) GetStealthMode

func (x *StatusResponse) GetStealthMode() bool

func (*StatusResponse) GetTemperature

func (x *StatusResponse) GetTemperature() int64

func (*StatusResponse) ProtoMessage

func (*StatusResponse) ProtoMessage()

func (*StatusResponse) ProtoReflect

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

func (*StatusResponse) Reset

func (x *StatusResponse) Reset()

func (*StatusResponse) String

func (x *StatusResponse) String() string

type StealthModeRequest

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

func (*StealthModeRequest) Descriptor deprecated

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

Deprecated: Use StealthModeRequest.ProtoReflect.Descriptor instead.

func (*StealthModeRequest) GetEnable

func (x *StealthModeRequest) GetEnable() bool

func (*StealthModeRequest) ProtoMessage

func (*StealthModeRequest) ProtoMessage()

func (*StealthModeRequest) ProtoReflect

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

func (*StealthModeRequest) Reset

func (x *StealthModeRequest) Reset()

func (*StealthModeRequest) String

func (x *StealthModeRequest) String() string

type UnimplementedBladeAgentServiceServer

type UnimplementedBladeAgentServiceServer struct {
}

UnimplementedBladeAgentServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedBladeAgentServiceServer) EmitEvent

func (UnimplementedBladeAgentServiceServer) GetStatus

func (UnimplementedBladeAgentServiceServer) SetFanSpeed

func (UnimplementedBladeAgentServiceServer) SetStealthMode

func (UnimplementedBladeAgentServiceServer) WaitForIdentifyConfirm

type UnsafeBladeAgentServiceServer

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

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

Jump to

Keyboard shortcuts

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