Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterTowerServer(s grpc.ServiceRegistrar, srv TowerServer)
- type Badge
- type Error
- type Extension
- type PullValueRequest
- func (*PullValueRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PullValueRequest) GetExtensionId() string
- func (x *PullValueRequest) GetStateId() string
- func (*PullValueRequest) ProtoMessage()
- func (x *PullValueRequest) ProtoReflect() protoreflect.Message
- func (x *PullValueRequest) Reset()
- func (x *PullValueRequest) String() string
- type PullValueResponse
- func (*PullValueResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PullValueResponse) GetClass() int32
- func (x *PullValueResponse) GetIntValue() int32
- func (x *PullValueResponse) GetStrValue() string
- func (*PullValueResponse) ProtoMessage()
- func (x *PullValueResponse) ProtoReflect() protoreflect.Message
- func (x *PullValueResponse) Reset()
- func (x *PullValueResponse) String() string
- type PushValueRequest
- func (*PushValueRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PushValueRequest) GetClass() int32
- func (x *PushValueRequest) GetExtensionId() string
- func (x *PushValueRequest) GetIntValue() int32
- func (x *PushValueRequest) GetStateId() string
- func (x *PushValueRequest) GetStrValue() string
- func (*PushValueRequest) ProtoMessage()
- func (x *PushValueRequest) ProtoReflect() protoreflect.Message
- func (x *PushValueRequest) Reset()
- func (x *PushValueRequest) String() string
- type PushValueResponse
- func (*PushValueResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PushValueResponse) GetError() bool
- func (x *PushValueResponse) GetMessage() string
- func (*PushValueResponse) ProtoMessage()
- func (x *PushValueResponse) ProtoReflect() protoreflect.Message
- func (x *PushValueResponse) Reset()
- func (x *PushValueResponse) String() string
- type RegisterExtensionRequest
- func (*RegisterExtensionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterExtensionRequest) GetDescription() string
- func (x *RegisterExtensionRequest) GetExtensionId() string
- func (*RegisterExtensionRequest) ProtoMessage()
- func (x *RegisterExtensionRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterExtensionRequest) Reset()
- func (x *RegisterExtensionRequest) String() string
- type RegisterExtensionResponse
- func (*RegisterExtensionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterExtensionResponse) GetError() bool
- func (x *RegisterExtensionResponse) GetMessage() string
- func (*RegisterExtensionResponse) ProtoMessage()
- func (x *RegisterExtensionResponse) ProtoReflect() protoreflect.Message
- func (x *RegisterExtensionResponse) Reset()
- func (x *RegisterExtensionResponse) String() string
- type RegisterStateRequest
- func (*RegisterStateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterStateRequest) GetClass() int32
- func (x *RegisterStateRequest) GetDescription() string
- func (x *RegisterStateRequest) GetExtensionId() string
- func (x *RegisterStateRequest) GetStateId() string
- func (*RegisterStateRequest) ProtoMessage()
- func (x *RegisterStateRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterStateRequest) Reset()
- func (x *RegisterStateRequest) String() string
- type RegisterStateResponse
- func (*RegisterStateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterStateResponse) GetError() bool
- func (x *RegisterStateResponse) GetMessage() string
- func (*RegisterStateResponse) ProtoMessage()
- func (x *RegisterStateResponse) ProtoReflect() protoreflect.Message
- func (x *RegisterStateResponse) Reset()
- func (x *RegisterStateResponse) String() string
- type Result
- type State
- type TowerClient
- type TowerServer
- type UnimplementedTowerServer
- func (UnimplementedTowerServer) PullValue(context.Context, *PullValueRequest) (*PullValueResponse, error)
- func (UnimplementedTowerServer) PushValue(context.Context, *PushValueRequest) (*PushValueResponse, error)
- func (UnimplementedTowerServer) RegisterExtension(context.Context, *RegisterExtensionRequest) (*RegisterExtensionResponse, error)
- func (UnimplementedTowerServer) RegisterState(context.Context, *RegisterStateRequest) (*RegisterStateResponse, error)
- type UnsafeTowerServer
- type Value
Constants ¶
const BADGECLASS_GAUGE = 0
const BADGECLASS_LABEL = 2
const BADGECLASS_LIGHT = 1
const BADGECLASS_NIL = -1
const VALUECLASS_INT = 0
const VALUECLASS_NIL = -1
const VALUECLASS_STR = 1
Variables ¶
var File_extension_proto protoreflect.FileDescriptor
var Tower_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Tower", HandlerType: (*TowerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "RegisterExtension", Handler: _Tower_RegisterExtension_Handler, }, { MethodName: "RegisterState", Handler: _Tower_RegisterState_Handler, }, { MethodName: "PushValue", Handler: _Tower_PushValue_Handler, }, { MethodName: "PullValue", Handler: _Tower_PullValue_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "extension.proto", }
Tower_ServiceDesc is the grpc.ServiceDesc for Tower service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTowerServer ¶
func RegisterTowerServer(s grpc.ServiceRegistrar, srv TowerServer)
Types ¶
type Extension ¶
type Extension struct { Id string `json:"id"` Description string `json:"description"` States map[string]*State `json:"states"` }
func NewExtension ¶
type PullValueRequest ¶
type PullValueRequest struct { // mapping ExtensionId string `protobuf:"bytes,1,opt,name=extension_id,json=extensionId,proto3" json:"extension_id,omitempty"` StateId string `protobuf:"bytes,2,opt,name=state_id,json=stateId,proto3" json:"state_id,omitempty"` // contains filtered or unexported fields }
func (*PullValueRequest) Descriptor
deprecated
func (*PullValueRequest) Descriptor() ([]byte, []int)
Deprecated: Use PullValueRequest.ProtoReflect.Descriptor instead.
func (*PullValueRequest) GetExtensionId ¶
func (x *PullValueRequest) GetExtensionId() string
func (*PullValueRequest) GetStateId ¶
func (x *PullValueRequest) GetStateId() string
func (*PullValueRequest) ProtoMessage ¶
func (*PullValueRequest) ProtoMessage()
func (*PullValueRequest) ProtoReflect ¶
func (x *PullValueRequest) ProtoReflect() protoreflect.Message
func (*PullValueRequest) Reset ¶
func (x *PullValueRequest) Reset()
func (*PullValueRequest) String ¶
func (x *PullValueRequest) String() string
type PullValueResponse ¶
type PullValueResponse struct { // payload Class int32 `protobuf:"varint,1,opt,name=class,proto3" json:"class,omitempty"` IntValue int32 `protobuf:"varint,2,opt,name=int_value,json=intValue,proto3" json:"int_value,omitempty"` StrValue string `protobuf:"bytes,3,opt,name=str_value,json=strValue,proto3" json:"str_value,omitempty"` // contains filtered or unexported fields }
func (*PullValueResponse) Descriptor
deprecated
func (*PullValueResponse) Descriptor() ([]byte, []int)
Deprecated: Use PullValueResponse.ProtoReflect.Descriptor instead.
func (*PullValueResponse) GetClass ¶
func (x *PullValueResponse) GetClass() int32
func (*PullValueResponse) GetIntValue ¶
func (x *PullValueResponse) GetIntValue() int32
func (*PullValueResponse) GetStrValue ¶
func (x *PullValueResponse) GetStrValue() string
func (*PullValueResponse) ProtoMessage ¶
func (*PullValueResponse) ProtoMessage()
func (*PullValueResponse) ProtoReflect ¶
func (x *PullValueResponse) ProtoReflect() protoreflect.Message
func (*PullValueResponse) Reset ¶
func (x *PullValueResponse) Reset()
func (*PullValueResponse) String ¶
func (x *PullValueResponse) String() string
type PushValueRequest ¶
type PushValueRequest struct { // mapping ExtensionId string `protobuf:"bytes,1,opt,name=extension_id,json=extensionId,proto3" json:"extension_id,omitempty"` StateId string `protobuf:"bytes,2,opt,name=state_id,json=stateId,proto3" json:"state_id,omitempty"` // payload Class int32 `protobuf:"varint,3,opt,name=class,proto3" json:"class,omitempty"` IntValue int32 `protobuf:"varint,4,opt,name=int_value,json=intValue,proto3" json:"int_value,omitempty"` StrValue string `protobuf:"bytes,5,opt,name=str_value,json=strValue,proto3" json:"str_value,omitempty"` // contains filtered or unexported fields }
func (*PushValueRequest) Descriptor
deprecated
func (*PushValueRequest) Descriptor() ([]byte, []int)
Deprecated: Use PushValueRequest.ProtoReflect.Descriptor instead.
func (*PushValueRequest) GetClass ¶
func (x *PushValueRequest) GetClass() int32
func (*PushValueRequest) GetExtensionId ¶
func (x *PushValueRequest) GetExtensionId() string
func (*PushValueRequest) GetIntValue ¶
func (x *PushValueRequest) GetIntValue() int32
func (*PushValueRequest) GetStateId ¶
func (x *PushValueRequest) GetStateId() string
func (*PushValueRequest) GetStrValue ¶
func (x *PushValueRequest) GetStrValue() string
func (*PushValueRequest) ProtoMessage ¶
func (*PushValueRequest) ProtoMessage()
func (*PushValueRequest) ProtoReflect ¶
func (x *PushValueRequest) ProtoReflect() protoreflect.Message
func (*PushValueRequest) Reset ¶
func (x *PushValueRequest) Reset()
func (*PushValueRequest) String ¶
func (x *PushValueRequest) String() string
type PushValueResponse ¶
type PushValueResponse struct { Error bool `protobuf:"varint,1,opt,name=error,proto3" json:"error,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*PushValueResponse) Descriptor
deprecated
func (*PushValueResponse) Descriptor() ([]byte, []int)
Deprecated: Use PushValueResponse.ProtoReflect.Descriptor instead.
func (*PushValueResponse) GetError ¶
func (x *PushValueResponse) GetError() bool
func (*PushValueResponse) GetMessage ¶
func (x *PushValueResponse) GetMessage() string
func (*PushValueResponse) ProtoMessage ¶
func (*PushValueResponse) ProtoMessage()
func (*PushValueResponse) ProtoReflect ¶
func (x *PushValueResponse) ProtoReflect() protoreflect.Message
func (*PushValueResponse) Reset ¶
func (x *PushValueResponse) Reset()
func (*PushValueResponse) String ¶
func (x *PushValueResponse) String() string
type RegisterExtensionRequest ¶
type RegisterExtensionRequest struct { // mapping ExtensionId string `protobuf:"bytes,1,opt,name=extension_id,json=extensionId,proto3" json:"extension_id,omitempty"` // payload Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // contains filtered or unexported fields }
func (*RegisterExtensionRequest) Descriptor
deprecated
func (*RegisterExtensionRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterExtensionRequest.ProtoReflect.Descriptor instead.
func (*RegisterExtensionRequest) GetDescription ¶
func (x *RegisterExtensionRequest) GetDescription() string
func (*RegisterExtensionRequest) GetExtensionId ¶
func (x *RegisterExtensionRequest) GetExtensionId() string
func (*RegisterExtensionRequest) ProtoMessage ¶
func (*RegisterExtensionRequest) ProtoMessage()
func (*RegisterExtensionRequest) ProtoReflect ¶
func (x *RegisterExtensionRequest) ProtoReflect() protoreflect.Message
func (*RegisterExtensionRequest) Reset ¶
func (x *RegisterExtensionRequest) Reset()
func (*RegisterExtensionRequest) String ¶
func (x *RegisterExtensionRequest) String() string
type RegisterExtensionResponse ¶
type RegisterExtensionResponse struct { Error bool `protobuf:"varint,1,opt,name=error,proto3" json:"error,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*RegisterExtensionResponse) Descriptor
deprecated
func (*RegisterExtensionResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterExtensionResponse.ProtoReflect.Descriptor instead.
func (*RegisterExtensionResponse) GetError ¶
func (x *RegisterExtensionResponse) GetError() bool
func (*RegisterExtensionResponse) GetMessage ¶
func (x *RegisterExtensionResponse) GetMessage() string
func (*RegisterExtensionResponse) ProtoMessage ¶
func (*RegisterExtensionResponse) ProtoMessage()
func (*RegisterExtensionResponse) ProtoReflect ¶
func (x *RegisterExtensionResponse) ProtoReflect() protoreflect.Message
func (*RegisterExtensionResponse) Reset ¶
func (x *RegisterExtensionResponse) Reset()
func (*RegisterExtensionResponse) String ¶
func (x *RegisterExtensionResponse) String() string
type RegisterStateRequest ¶
type RegisterStateRequest struct { // mapping ExtensionId string `protobuf:"bytes,1,opt,name=extension_id,json=extensionId,proto3" json:"extension_id,omitempty"` StateId string `protobuf:"bytes,2,opt,name=state_id,json=stateId,proto3" json:"state_id,omitempty"` // payload Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` Class int32 `protobuf:"varint,4,opt,name=class,proto3" json:"class,omitempty"` // contains filtered or unexported fields }
func (*RegisterStateRequest) Descriptor
deprecated
func (*RegisterStateRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterStateRequest.ProtoReflect.Descriptor instead.
func (*RegisterStateRequest) GetClass ¶
func (x *RegisterStateRequest) GetClass() int32
func (*RegisterStateRequest) GetDescription ¶
func (x *RegisterStateRequest) GetDescription() string
func (*RegisterStateRequest) GetExtensionId ¶
func (x *RegisterStateRequest) GetExtensionId() string
func (*RegisterStateRequest) GetStateId ¶
func (x *RegisterStateRequest) GetStateId() string
func (*RegisterStateRequest) ProtoMessage ¶
func (*RegisterStateRequest) ProtoMessage()
func (*RegisterStateRequest) ProtoReflect ¶
func (x *RegisterStateRequest) ProtoReflect() protoreflect.Message
func (*RegisterStateRequest) Reset ¶
func (x *RegisterStateRequest) Reset()
func (*RegisterStateRequest) String ¶
func (x *RegisterStateRequest) String() string
type RegisterStateResponse ¶
type RegisterStateResponse struct { Error bool `protobuf:"varint,1,opt,name=error,proto3" json:"error,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*RegisterStateResponse) Descriptor
deprecated
func (*RegisterStateResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterStateResponse.ProtoReflect.Descriptor instead.
func (*RegisterStateResponse) GetError ¶
func (x *RegisterStateResponse) GetError() bool
func (*RegisterStateResponse) GetMessage ¶
func (x *RegisterStateResponse) GetMessage() string
func (*RegisterStateResponse) ProtoMessage ¶
func (*RegisterStateResponse) ProtoMessage()
func (*RegisterStateResponse) ProtoReflect ¶
func (x *RegisterStateResponse) ProtoReflect() protoreflect.Message
func (*RegisterStateResponse) Reset ¶
func (x *RegisterStateResponse) Reset()
func (*RegisterStateResponse) String ¶
func (x *RegisterStateResponse) String() string
type Result ¶
type Result struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*Result) Descriptor
deprecated
func (*Result) GetMessage ¶
func (*Result) GetSuccess ¶
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
func (*Result) ProtoReflect ¶
func (x *Result) ProtoReflect() protoreflect.Message
type State ¶
type TowerClient ¶
type TowerClient interface { RegisterExtension(ctx context.Context, in *RegisterExtensionRequest, opts ...grpc.CallOption) (*RegisterExtensionResponse, error) RegisterState(ctx context.Context, in *RegisterStateRequest, opts ...grpc.CallOption) (*RegisterStateResponse, error) PushValue(ctx context.Context, in *PushValueRequest, opts ...grpc.CallOption) (*PushValueResponse, error) PullValue(ctx context.Context, in *PullValueRequest, opts ...grpc.CallOption) (*PullValueResponse, error) }
TowerClient is the client API for Tower 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 NewTowerClient ¶
func NewTowerClient(cc grpc.ClientConnInterface) TowerClient
type TowerServer ¶
type TowerServer interface { RegisterExtension(context.Context, *RegisterExtensionRequest) (*RegisterExtensionResponse, error) RegisterState(context.Context, *RegisterStateRequest) (*RegisterStateResponse, error) PushValue(context.Context, *PushValueRequest) (*PushValueResponse, error) PullValue(context.Context, *PullValueRequest) (*PullValueResponse, error) // contains filtered or unexported methods }
TowerServer is the server API for Tower service. All implementations must embed UnimplementedTowerServer for forward compatibility
type UnimplementedTowerServer ¶
type UnimplementedTowerServer struct { }
UnimplementedTowerServer must be embedded to have forward compatible implementations.
func (UnimplementedTowerServer) PullValue ¶
func (UnimplementedTowerServer) PullValue(context.Context, *PullValueRequest) (*PullValueResponse, error)
func (UnimplementedTowerServer) PushValue ¶
func (UnimplementedTowerServer) PushValue(context.Context, *PushValueRequest) (*PushValueResponse, error)
func (UnimplementedTowerServer) RegisterExtension ¶
func (UnimplementedTowerServer) RegisterExtension(context.Context, *RegisterExtensionRequest) (*RegisterExtensionResponse, error)
func (UnimplementedTowerServer) RegisterState ¶
func (UnimplementedTowerServer) RegisterState(context.Context, *RegisterStateRequest) (*RegisterStateResponse, error)
type UnsafeTowerServer ¶
type UnsafeTowerServer interface {
// contains filtered or unexported methods
}
UnsafeTowerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TowerServer will result in compilation errors.