implement simple tui with humans data
This commit is contained in:
@@ -0,0 +1,554 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.35.1
|
||||
// protoc v5.28.3
|
||||
// source: helios/widgets/widgets.proto
|
||||
|
||||
package pbwidgets
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type WidgetSizeVariant int32
|
||||
|
||||
const (
|
||||
WidgetSizeVariant_WIDGET_SIZE_VARIANT_UNSPECIFIED WidgetSizeVariant = 0
|
||||
WidgetSizeVariant_WIDGET_SIZE_VARIANT_1_X_1 WidgetSizeVariant = 1
|
||||
WidgetSizeVariant_WIDGET_SIZE_VARIANT_2_X_1 WidgetSizeVariant = 2
|
||||
WidgetSizeVariant_WIDGET_SIZE_VARIANT_1_X_2 WidgetSizeVariant = 3
|
||||
WidgetSizeVariant_WIDGET_SIZE_VARIANT_2_X_2 WidgetSizeVariant = 4
|
||||
WidgetSizeVariant_WIDGET_SIZE_VARIANT_4_X_4 WidgetSizeVariant = 5
|
||||
)
|
||||
|
||||
// Enum value maps for WidgetSizeVariant.
|
||||
var (
|
||||
WidgetSizeVariant_name = map[int32]string{
|
||||
0: "WIDGET_SIZE_VARIANT_UNSPECIFIED",
|
||||
1: "WIDGET_SIZE_VARIANT_1_X_1",
|
||||
2: "WIDGET_SIZE_VARIANT_2_X_1",
|
||||
3: "WIDGET_SIZE_VARIANT_1_X_2",
|
||||
4: "WIDGET_SIZE_VARIANT_2_X_2",
|
||||
5: "WIDGET_SIZE_VARIANT_4_X_4",
|
||||
}
|
||||
WidgetSizeVariant_value = map[string]int32{
|
||||
"WIDGET_SIZE_VARIANT_UNSPECIFIED": 0,
|
||||
"WIDGET_SIZE_VARIANT_1_X_1": 1,
|
||||
"WIDGET_SIZE_VARIANT_2_X_1": 2,
|
||||
"WIDGET_SIZE_VARIANT_1_X_2": 3,
|
||||
"WIDGET_SIZE_VARIANT_2_X_2": 4,
|
||||
"WIDGET_SIZE_VARIANT_4_X_4": 5,
|
||||
}
|
||||
)
|
||||
|
||||
func (x WidgetSizeVariant) Enum() *WidgetSizeVariant {
|
||||
p := new(WidgetSizeVariant)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x WidgetSizeVariant) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (WidgetSizeVariant) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_helios_widgets_widgets_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (WidgetSizeVariant) Type() protoreflect.EnumType {
|
||||
return &file_helios_widgets_widgets_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x WidgetSizeVariant) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use WidgetSizeVariant.Descriptor instead.
|
||||
func (WidgetSizeVariant) EnumDescriptor() ([]byte, []int) {
|
||||
return file_helios_widgets_widgets_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// A flowy system representation of a human's context/what they're doing.
|
||||
type AppContext struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
// e.g. Figma (web)
|
||||
DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
|
||||
IconUri *AppContext_IconUri `protobuf:"bytes,3,opt,name=icon_uri,json=iconUri,proto3" json:"icon_uri,omitempty"`
|
||||
// Types that are assignable to ContextMatch:
|
||||
//
|
||||
// *AppContext_DesktopAppProcessName
|
||||
// *AppContext_WebAppDomain
|
||||
// *AppContext_WebUrlPrefix
|
||||
ContextMatch isAppContext_ContextMatch `protobuf_oneof:"context_match"`
|
||||
// Optional.
|
||||
// Hue that matches the branding of this app context. Used for widget gradient bg aesthetic.
|
||||
HueColorHex string `protobuf:"bytes,7,opt,name=hue_color_hex,json=hueColorHex,proto3" json:"hue_color_hex,omitempty"`
|
||||
}
|
||||
|
||||
func (x *AppContext) Reset() {
|
||||
*x = AppContext{}
|
||||
mi := &file_helios_widgets_widgets_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *AppContext) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AppContext) ProtoMessage() {}
|
||||
|
||||
func (x *AppContext) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_helios_widgets_widgets_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use AppContext.ProtoReflect.Descriptor instead.
|
||||
func (*AppContext) Descriptor() ([]byte, []int) {
|
||||
return file_helios_widgets_widgets_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *AppContext) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AppContext) GetDisplayName() string {
|
||||
if x != nil {
|
||||
return x.DisplayName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AppContext) GetIconUri() *AppContext_IconUri {
|
||||
if x != nil {
|
||||
return x.IconUri
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *AppContext) GetContextMatch() isAppContext_ContextMatch {
|
||||
if m != nil {
|
||||
return m.ContextMatch
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *AppContext) GetDesktopAppProcessName() string {
|
||||
if x, ok := x.GetContextMatch().(*AppContext_DesktopAppProcessName); ok {
|
||||
return x.DesktopAppProcessName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AppContext) GetWebAppDomain() string {
|
||||
if x, ok := x.GetContextMatch().(*AppContext_WebAppDomain); ok {
|
||||
return x.WebAppDomain
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AppContext) GetWebUrlPrefix() string {
|
||||
if x, ok := x.GetContextMatch().(*AppContext_WebUrlPrefix); ok {
|
||||
return x.WebUrlPrefix
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AppContext) GetHueColorHex() string {
|
||||
if x != nil {
|
||||
return x.HueColorHex
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type isAppContext_ContextMatch interface {
|
||||
isAppContext_ContextMatch()
|
||||
}
|
||||
|
||||
type AppContext_DesktopAppProcessName struct {
|
||||
// e.g. Code
|
||||
DesktopAppProcessName string `protobuf:"bytes,4,opt,name=desktop_app_process_name,json=desktopAppProcessName,proto3,oneof"`
|
||||
}
|
||||
|
||||
type AppContext_WebAppDomain struct {
|
||||
// e.g. figma.com
|
||||
WebAppDomain string `protobuf:"bytes,5,opt,name=web_app_domain,json=webAppDomain,proto3,oneof"`
|
||||
}
|
||||
|
||||
type AppContext_WebUrlPrefix struct {
|
||||
// e.g. youtube.com/watch
|
||||
WebUrlPrefix string `protobuf:"bytes,6,opt,name=web_url_prefix,json=webUrlPrefix,proto3,oneof"`
|
||||
}
|
||||
|
||||
func (*AppContext_DesktopAppProcessName) isAppContext_ContextMatch() {}
|
||||
|
||||
func (*AppContext_WebAppDomain) isAppContext_ContextMatch() {}
|
||||
|
||||
func (*AppContext_WebUrlPrefix) isAppContext_ContextMatch() {}
|
||||
|
||||
type Space struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
// Optional.
|
||||
// This defines how this space auto-activates, as well as what action a manual trigger performs (e.g. focus desktop app, find relevant browser tab)
|
||||
AppContext *AppContext `protobuf:"bytes,3,opt,name=app_context,json=appContext,proto3" json:"app_context,omitempty"`
|
||||
WidgetsInstances []*WidgetInstance `protobuf:"bytes,4,rep,name=widgets_instances,json=widgetsInstances,proto3" json:"widgets_instances,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Space) Reset() {
|
||||
*x = Space{}
|
||||
mi := &file_helios_widgets_widgets_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Space) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Space) ProtoMessage() {}
|
||||
|
||||
func (x *Space) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_helios_widgets_widgets_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Space.ProtoReflect.Descriptor instead.
|
||||
func (*Space) Descriptor() ([]byte, []int) {
|
||||
return file_helios_widgets_widgets_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *Space) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Space) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Space) GetAppContext() *AppContext {
|
||||
if x != nil {
|
||||
return x.AppContext
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Space) GetWidgetsInstances() []*WidgetInstance {
|
||||
if x != nil {
|
||||
return x.WidgetsInstances
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type WidgetInstance struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
WidgetIdentifier string `protobuf:"bytes,2,opt,name=widget_identifier,json=widgetIdentifier,proto3" json:"widget_identifier,omitempty"`
|
||||
WidgetVersion string `protobuf:"bytes,3,opt,name=widget_version,json=widgetVersion,proto3" json:"widget_version,omitempty"`
|
||||
// The selected size_variant from the available ones of the underlying widget.
|
||||
WidgetSizeVariant WidgetSizeVariant `protobuf:"varint,4,opt,name=widget_size_variant,json=widgetSizeVariant,proto3,enum=helios.widgets.WidgetSizeVariant" json:"widget_size_variant,omitempty"`
|
||||
// Configuration data or state for this specific widget instance.
|
||||
// e.g. bookmark url, list of saved terminal commands
|
||||
Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
|
||||
}
|
||||
|
||||
func (x *WidgetInstance) Reset() {
|
||||
*x = WidgetInstance{}
|
||||
mi := &file_helios_widgets_widgets_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *WidgetInstance) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*WidgetInstance) ProtoMessage() {}
|
||||
|
||||
func (x *WidgetInstance) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_helios_widgets_widgets_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use WidgetInstance.ProtoReflect.Descriptor instead.
|
||||
func (*WidgetInstance) Descriptor() ([]byte, []int) {
|
||||
return file_helios_widgets_widgets_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *WidgetInstance) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *WidgetInstance) GetWidgetIdentifier() string {
|
||||
if x != nil {
|
||||
return x.WidgetIdentifier
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *WidgetInstance) GetWidgetVersion() string {
|
||||
if x != nil {
|
||||
return x.WidgetVersion
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *WidgetInstance) GetWidgetSizeVariant() WidgetSizeVariant {
|
||||
if x != nil {
|
||||
return x.WidgetSizeVariant
|
||||
}
|
||||
return WidgetSizeVariant_WIDGET_SIZE_VARIANT_UNSPECIFIED
|
||||
}
|
||||
|
||||
func (x *WidgetInstance) GetData() []byte {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type AppContext_IconUri struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Dark string `protobuf:"bytes,1,opt,name=dark,proto3" json:"dark,omitempty"`
|
||||
Light string `protobuf:"bytes,2,opt,name=light,proto3" json:"light,omitempty"`
|
||||
}
|
||||
|
||||
func (x *AppContext_IconUri) Reset() {
|
||||
*x = AppContext_IconUri{}
|
||||
mi := &file_helios_widgets_widgets_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *AppContext_IconUri) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AppContext_IconUri) ProtoMessage() {}
|
||||
|
||||
func (x *AppContext_IconUri) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_helios_widgets_widgets_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use AppContext_IconUri.ProtoReflect.Descriptor instead.
|
||||
func (*AppContext_IconUri) Descriptor() ([]byte, []int) {
|
||||
return file_helios_widgets_widgets_proto_rawDescGZIP(), []int{0, 0}
|
||||
}
|
||||
|
||||
func (x *AppContext_IconUri) GetDark() string {
|
||||
if x != nil {
|
||||
return x.Dark
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AppContext_IconUri) GetLight() string {
|
||||
if x != nil {
|
||||
return x.Light
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_helios_widgets_widgets_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_helios_widgets_widgets_proto_rawDesc = []byte{
|
||||
0x0a, 0x1c, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2f, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x73,
|
||||
0x2f, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e,
|
||||
0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2e, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x73, 0x22, 0xf3,
|
||||
0x02, 0x0a, 0x0a, 0x41, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x0e, 0x0a,
|
||||
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a,
|
||||
0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65,
|
||||
0x12, 0x3d, 0x0a, 0x08, 0x69, 0x63, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x22, 0x2e, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2e, 0x77, 0x69, 0x64, 0x67,
|
||||
0x65, 0x74, 0x73, 0x2e, 0x41, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x49,
|
||||
0x63, 0x6f, 0x6e, 0x55, 0x72, 0x69, 0x52, 0x07, 0x69, 0x63, 0x6f, 0x6e, 0x55, 0x72, 0x69, 0x12,
|
||||
0x39, 0x0a, 0x18, 0x64, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x5f, 0x61, 0x70, 0x70, 0x5f, 0x70,
|
||||
0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x09, 0x48, 0x00, 0x52, 0x15, 0x64, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x41, 0x70, 0x70, 0x50,
|
||||
0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x77, 0x65,
|
||||
0x62, 0x5f, 0x61, 0x70, 0x70, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01,
|
||||
0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x77, 0x65, 0x62, 0x41, 0x70, 0x70, 0x44, 0x6f, 0x6d, 0x61,
|
||||
0x69, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x77, 0x65, 0x62, 0x5f, 0x75, 0x72, 0x6c, 0x5f, 0x70, 0x72,
|
||||
0x65, 0x66, 0x69, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x77, 0x65,
|
||||
0x62, 0x55, 0x72, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x75,
|
||||
0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x68, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0b, 0x68, 0x75, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x48, 0x65, 0x78, 0x1a, 0x33,
|
||||
0x0a, 0x07, 0x49, 0x63, 0x6f, 0x6e, 0x55, 0x72, 0x69, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x72,
|
||||
0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x72, 0x6b, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x69,
|
||||
0x67, 0x68, 0x74, 0x42, 0x0f, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x6d,
|
||||
0x61, 0x74, 0x63, 0x68, 0x22, 0xb5, 0x01, 0x0a, 0x05, 0x53, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e,
|
||||
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78,
|
||||
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73,
|
||||
0x2e, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x41, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x74,
|
||||
0x65, 0x78, 0x74, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12,
|
||||
0x4b, 0x0a, 0x11, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x73, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61,
|
||||
0x6e, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x68, 0x65, 0x6c,
|
||||
0x69, 0x6f, 0x73, 0x2e, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x57, 0x69, 0x64, 0x67,
|
||||
0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x10, 0x77, 0x69, 0x64, 0x67,
|
||||
0x65, 0x74, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x22, 0xdb, 0x01, 0x0a,
|
||||
0x0e, 0x57, 0x69, 0x64, 0x67, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12,
|
||||
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12,
|
||||
0x2b, 0x0a, 0x11, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69,
|
||||
0x66, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x77, 0x69, 0x64, 0x67,
|
||||
0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0e,
|
||||
0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x13, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x69,
|
||||
0x7a, 0x65, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e,
|
||||
0x32, 0x21, 0x2e, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73, 0x2e, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74,
|
||||
0x73, 0x2e, 0x57, 0x69, 0x64, 0x67, 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x56, 0x61, 0x72, 0x69,
|
||||
0x61, 0x6e, 0x74, 0x52, 0x11, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x56,
|
||||
0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x2a, 0xd3, 0x01, 0x0a, 0x11, 0x57,
|
||||
0x69, 0x64, 0x67, 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74,
|
||||
0x12, 0x23, 0x0a, 0x1f, 0x57, 0x49, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x5f,
|
||||
0x56, 0x41, 0x52, 0x49, 0x41, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,
|
||||
0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x57, 0x49, 0x44, 0x47, 0x45, 0x54, 0x5f,
|
||||
0x53, 0x49, 0x5a, 0x45, 0x5f, 0x56, 0x41, 0x52, 0x49, 0x41, 0x4e, 0x54, 0x5f, 0x31, 0x5f, 0x58,
|
||||
0x5f, 0x31, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x57, 0x49, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x53,
|
||||
0x49, 0x5a, 0x45, 0x5f, 0x56, 0x41, 0x52, 0x49, 0x41, 0x4e, 0x54, 0x5f, 0x32, 0x5f, 0x58, 0x5f,
|
||||
0x31, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x19, 0x57, 0x49, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x53, 0x49,
|
||||
0x5a, 0x45, 0x5f, 0x56, 0x41, 0x52, 0x49, 0x41, 0x4e, 0x54, 0x5f, 0x31, 0x5f, 0x58, 0x5f, 0x32,
|
||||
0x10, 0x03, 0x12, 0x1d, 0x0a, 0x19, 0x57, 0x49, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x53, 0x49, 0x5a,
|
||||
0x45, 0x5f, 0x56, 0x41, 0x52, 0x49, 0x41, 0x4e, 0x54, 0x5f, 0x32, 0x5f, 0x58, 0x5f, 0x32, 0x10,
|
||||
0x04, 0x12, 0x1d, 0x0a, 0x19, 0x57, 0x49, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x53, 0x49, 0x5a, 0x45,
|
||||
0x5f, 0x56, 0x41, 0x52, 0x49, 0x41, 0x4e, 0x54, 0x5f, 0x34, 0x5f, 0x58, 0x5f, 0x34, 0x10, 0x05,
|
||||
0x42, 0x40, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66,
|
||||
0x6c, 0x6f, 0x77, 0x79, 0x2d, 0x6c, 0x69, 0x76, 0x65, 0x2f, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73,
|
||||
0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x68, 0x65, 0x6c, 0x69, 0x6f, 0x73,
|
||||
0x2f, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x73, 0x3b, 0x70, 0x62, 0x77, 0x69, 0x64, 0x67, 0x65,
|
||||
0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_helios_widgets_widgets_proto_rawDescOnce sync.Once
|
||||
file_helios_widgets_widgets_proto_rawDescData = file_helios_widgets_widgets_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_helios_widgets_widgets_proto_rawDescGZIP() []byte {
|
||||
file_helios_widgets_widgets_proto_rawDescOnce.Do(func() {
|
||||
file_helios_widgets_widgets_proto_rawDescData = protoimpl.X.CompressGZIP(file_helios_widgets_widgets_proto_rawDescData)
|
||||
})
|
||||
return file_helios_widgets_widgets_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_helios_widgets_widgets_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_helios_widgets_widgets_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_helios_widgets_widgets_proto_goTypes = []any{
|
||||
(WidgetSizeVariant)(0), // 0: helios.widgets.WidgetSizeVariant
|
||||
(*AppContext)(nil), // 1: helios.widgets.AppContext
|
||||
(*Space)(nil), // 2: helios.widgets.Space
|
||||
(*WidgetInstance)(nil), // 3: helios.widgets.WidgetInstance
|
||||
(*AppContext_IconUri)(nil), // 4: helios.widgets.AppContext.IconUri
|
||||
}
|
||||
var file_helios_widgets_widgets_proto_depIdxs = []int32{
|
||||
4, // 0: helios.widgets.AppContext.icon_uri:type_name -> helios.widgets.AppContext.IconUri
|
||||
1, // 1: helios.widgets.Space.app_context:type_name -> helios.widgets.AppContext
|
||||
3, // 2: helios.widgets.Space.widgets_instances:type_name -> helios.widgets.WidgetInstance
|
||||
0, // 3: helios.widgets.WidgetInstance.widget_size_variant:type_name -> helios.widgets.WidgetSizeVariant
|
||||
4, // [4:4] is the sub-list for method output_type
|
||||
4, // [4:4] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_helios_widgets_widgets_proto_init() }
|
||||
func file_helios_widgets_widgets_proto_init() {
|
||||
if File_helios_widgets_widgets_proto != nil {
|
||||
return
|
||||
}
|
||||
file_helios_widgets_widgets_proto_msgTypes[0].OneofWrappers = []any{
|
||||
(*AppContext_DesktopAppProcessName)(nil),
|
||||
(*AppContext_WebAppDomain)(nil),
|
||||
(*AppContext_WebUrlPrefix)(nil),
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_helios_widgets_widgets_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_helios_widgets_widgets_proto_goTypes,
|
||||
DependencyIndexes: file_helios_widgets_widgets_proto_depIdxs,
|
||||
EnumInfos: file_helios_widgets_widgets_proto_enumTypes,
|
||||
MessageInfos: file_helios_widgets_widgets_proto_msgTypes,
|
||||
}.Build()
|
||||
File_helios_widgets_widgets_proto = out.File
|
||||
file_helios_widgets_widgets_proto_rawDesc = nil
|
||||
file_helios_widgets_widgets_proto_goTypes = nil
|
||||
file_helios_widgets_widgets_proto_depIdxs = nil
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,477 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.28.3
|
||||
// source: helios/widgets/widgetservice.proto
|
||||
|
||||
package pbwidgets
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
WidgetService_ListAppContexts_FullMethodName = "/helios.widgets.WidgetService/ListAppContexts"
|
||||
WidgetService_ListSpaces_FullMethodName = "/helios.widgets.WidgetService/ListSpaces"
|
||||
WidgetService_AddSpace_FullMethodName = "/helios.widgets.WidgetService/AddSpace"
|
||||
WidgetService_UpdateSpace_FullMethodName = "/helios.widgets.WidgetService/UpdateSpace"
|
||||
WidgetService_DeleteSpace_FullMethodName = "/helios.widgets.WidgetService/DeleteSpace"
|
||||
WidgetService_ReorderSpaces_FullMethodName = "/helios.widgets.WidgetService/ReorderSpaces"
|
||||
WidgetService_CreateWidgetInstance_FullMethodName = "/helios.widgets.WidgetService/CreateWidgetInstance"
|
||||
WidgetService_SaveWidgetInstanceData_FullMethodName = "/helios.widgets.WidgetService/SaveWidgetInstanceData"
|
||||
WidgetService_MoveWidgetInstanceToSpace_FullMethodName = "/helios.widgets.WidgetService/MoveWidgetInstanceToSpace"
|
||||
WidgetService_DeleteWidgetInstance_FullMethodName = "/helios.widgets.WidgetService/DeleteWidgetInstance"
|
||||
)
|
||||
|
||||
// WidgetServiceClient is the client API for WidgetService 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.
|
||||
//
|
||||
// Requires authed human.
|
||||
type WidgetServiceClient interface {
|
||||
ListAppContexts(ctx context.Context, in *ListAppContextsRequest, opts ...grpc.CallOption) (*ListAppContextsResponse, error)
|
||||
// All spaces & attached widget instances for the authed human.
|
||||
ListSpaces(ctx context.Context, in *ListSpacesRequest, opts ...grpc.CallOption) (*ListSpacesResponse, error)
|
||||
AddSpace(ctx context.Context, in *AddSpaceRequest, opts ...grpc.CallOption) (*AddSpaceResponse, error)
|
||||
// Authoritative: please define every field, otherwise they will be overwritten as empty.
|
||||
UpdateSpace(ctx context.Context, in *UpdateSpaceRequest, opts ...grpc.CallOption) (*UpdateSpaceResponse, error)
|
||||
// Deletes space and all widget instances within.
|
||||
DeleteSpace(ctx context.Context, in *DeleteSpaceRequest, opts ...grpc.CallOption) (*DeleteSpaceResponse, error)
|
||||
// All existing spaces for human must be provided.
|
||||
ReorderSpaces(ctx context.Context, in *ReorderSpacesRequest, opts ...grpc.CallOption) (*ReorderSpacesResponse, error)
|
||||
// Create a widget instance and set it's initial space
|
||||
CreateWidgetInstance(ctx context.Context, in *CreateWidgetInstanceRequest, opts ...grpc.CallOption) (*CreateWidgetInstanceResponse, error)
|
||||
SaveWidgetInstanceData(ctx context.Context, in *SaveWidgetInstanceDataRequest, opts ...grpc.CallOption) (*SaveWidgetInstanceDataResponse, error)
|
||||
MoveWidgetInstanceToSpace(ctx context.Context, in *MoveWidgetInstanceToSpaceRequest, opts ...grpc.CallOption) (*MoveWidgetInstanceToSpaceResponse, error)
|
||||
DeleteWidgetInstance(ctx context.Context, in *DeleteWidgetInstanceRequest, opts ...grpc.CallOption) (*DeleteWidgetInstanceResponse, error)
|
||||
}
|
||||
|
||||
type widgetServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewWidgetServiceClient(cc grpc.ClientConnInterface) WidgetServiceClient {
|
||||
return &widgetServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *widgetServiceClient) ListAppContexts(ctx context.Context, in *ListAppContextsRequest, opts ...grpc.CallOption) (*ListAppContextsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListAppContextsResponse)
|
||||
err := c.cc.Invoke(ctx, WidgetService_ListAppContexts_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *widgetServiceClient) ListSpaces(ctx context.Context, in *ListSpacesRequest, opts ...grpc.CallOption) (*ListSpacesResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListSpacesResponse)
|
||||
err := c.cc.Invoke(ctx, WidgetService_ListSpaces_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *widgetServiceClient) AddSpace(ctx context.Context, in *AddSpaceRequest, opts ...grpc.CallOption) (*AddSpaceResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(AddSpaceResponse)
|
||||
err := c.cc.Invoke(ctx, WidgetService_AddSpace_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *widgetServiceClient) UpdateSpace(ctx context.Context, in *UpdateSpaceRequest, opts ...grpc.CallOption) (*UpdateSpaceResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(UpdateSpaceResponse)
|
||||
err := c.cc.Invoke(ctx, WidgetService_UpdateSpace_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *widgetServiceClient) DeleteSpace(ctx context.Context, in *DeleteSpaceRequest, opts ...grpc.CallOption) (*DeleteSpaceResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(DeleteSpaceResponse)
|
||||
err := c.cc.Invoke(ctx, WidgetService_DeleteSpace_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *widgetServiceClient) ReorderSpaces(ctx context.Context, in *ReorderSpacesRequest, opts ...grpc.CallOption) (*ReorderSpacesResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ReorderSpacesResponse)
|
||||
err := c.cc.Invoke(ctx, WidgetService_ReorderSpaces_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *widgetServiceClient) CreateWidgetInstance(ctx context.Context, in *CreateWidgetInstanceRequest, opts ...grpc.CallOption) (*CreateWidgetInstanceResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CreateWidgetInstanceResponse)
|
||||
err := c.cc.Invoke(ctx, WidgetService_CreateWidgetInstance_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *widgetServiceClient) SaveWidgetInstanceData(ctx context.Context, in *SaveWidgetInstanceDataRequest, opts ...grpc.CallOption) (*SaveWidgetInstanceDataResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SaveWidgetInstanceDataResponse)
|
||||
err := c.cc.Invoke(ctx, WidgetService_SaveWidgetInstanceData_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *widgetServiceClient) MoveWidgetInstanceToSpace(ctx context.Context, in *MoveWidgetInstanceToSpaceRequest, opts ...grpc.CallOption) (*MoveWidgetInstanceToSpaceResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MoveWidgetInstanceToSpaceResponse)
|
||||
err := c.cc.Invoke(ctx, WidgetService_MoveWidgetInstanceToSpace_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *widgetServiceClient) DeleteWidgetInstance(ctx context.Context, in *DeleteWidgetInstanceRequest, opts ...grpc.CallOption) (*DeleteWidgetInstanceResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(DeleteWidgetInstanceResponse)
|
||||
err := c.cc.Invoke(ctx, WidgetService_DeleteWidgetInstance_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// WidgetServiceServer is the server API for WidgetService service.
|
||||
// All implementations must embed UnimplementedWidgetServiceServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// Requires authed human.
|
||||
type WidgetServiceServer interface {
|
||||
ListAppContexts(context.Context, *ListAppContextsRequest) (*ListAppContextsResponse, error)
|
||||
// All spaces & attached widget instances for the authed human.
|
||||
ListSpaces(context.Context, *ListSpacesRequest) (*ListSpacesResponse, error)
|
||||
AddSpace(context.Context, *AddSpaceRequest) (*AddSpaceResponse, error)
|
||||
// Authoritative: please define every field, otherwise they will be overwritten as empty.
|
||||
UpdateSpace(context.Context, *UpdateSpaceRequest) (*UpdateSpaceResponse, error)
|
||||
// Deletes space and all widget instances within.
|
||||
DeleteSpace(context.Context, *DeleteSpaceRequest) (*DeleteSpaceResponse, error)
|
||||
// All existing spaces for human must be provided.
|
||||
ReorderSpaces(context.Context, *ReorderSpacesRequest) (*ReorderSpacesResponse, error)
|
||||
// Create a widget instance and set it's initial space
|
||||
CreateWidgetInstance(context.Context, *CreateWidgetInstanceRequest) (*CreateWidgetInstanceResponse, error)
|
||||
SaveWidgetInstanceData(context.Context, *SaveWidgetInstanceDataRequest) (*SaveWidgetInstanceDataResponse, error)
|
||||
MoveWidgetInstanceToSpace(context.Context, *MoveWidgetInstanceToSpaceRequest) (*MoveWidgetInstanceToSpaceResponse, error)
|
||||
DeleteWidgetInstance(context.Context, *DeleteWidgetInstanceRequest) (*DeleteWidgetInstanceResponse, error)
|
||||
mustEmbedUnimplementedWidgetServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedWidgetServiceServer 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.
|
||||
type UnimplementedWidgetServiceServer struct{}
|
||||
|
||||
func (UnimplementedWidgetServiceServer) ListAppContexts(context.Context, *ListAppContextsRequest) (*ListAppContextsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListAppContexts not implemented")
|
||||
}
|
||||
func (UnimplementedWidgetServiceServer) ListSpaces(context.Context, *ListSpacesRequest) (*ListSpacesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListSpaces not implemented")
|
||||
}
|
||||
func (UnimplementedWidgetServiceServer) AddSpace(context.Context, *AddSpaceRequest) (*AddSpaceResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddSpace not implemented")
|
||||
}
|
||||
func (UnimplementedWidgetServiceServer) UpdateSpace(context.Context, *UpdateSpaceRequest) (*UpdateSpaceResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateSpace not implemented")
|
||||
}
|
||||
func (UnimplementedWidgetServiceServer) DeleteSpace(context.Context, *DeleteSpaceRequest) (*DeleteSpaceResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteSpace not implemented")
|
||||
}
|
||||
func (UnimplementedWidgetServiceServer) ReorderSpaces(context.Context, *ReorderSpacesRequest) (*ReorderSpacesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ReorderSpaces not implemented")
|
||||
}
|
||||
func (UnimplementedWidgetServiceServer) CreateWidgetInstance(context.Context, *CreateWidgetInstanceRequest) (*CreateWidgetInstanceResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateWidgetInstance not implemented")
|
||||
}
|
||||
func (UnimplementedWidgetServiceServer) SaveWidgetInstanceData(context.Context, *SaveWidgetInstanceDataRequest) (*SaveWidgetInstanceDataResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SaveWidgetInstanceData not implemented")
|
||||
}
|
||||
func (UnimplementedWidgetServiceServer) MoveWidgetInstanceToSpace(context.Context, *MoveWidgetInstanceToSpaceRequest) (*MoveWidgetInstanceToSpaceResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method MoveWidgetInstanceToSpace not implemented")
|
||||
}
|
||||
func (UnimplementedWidgetServiceServer) DeleteWidgetInstance(context.Context, *DeleteWidgetInstanceRequest) (*DeleteWidgetInstanceResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteWidgetInstance not implemented")
|
||||
}
|
||||
func (UnimplementedWidgetServiceServer) mustEmbedUnimplementedWidgetServiceServer() {}
|
||||
func (UnimplementedWidgetServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeWidgetServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to WidgetServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeWidgetServiceServer interface {
|
||||
mustEmbedUnimplementedWidgetServiceServer()
|
||||
}
|
||||
|
||||
func RegisterWidgetServiceServer(s grpc.ServiceRegistrar, srv WidgetServiceServer) {
|
||||
// If the following call pancis, it indicates UnimplementedWidgetServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&WidgetService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _WidgetService_ListAppContexts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListAppContextsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WidgetServiceServer).ListAppContexts(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: WidgetService_ListAppContexts_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WidgetServiceServer).ListAppContexts(ctx, req.(*ListAppContextsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WidgetService_ListSpaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListSpacesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WidgetServiceServer).ListSpaces(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: WidgetService_ListSpaces_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WidgetServiceServer).ListSpaces(ctx, req.(*ListSpacesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WidgetService_AddSpace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AddSpaceRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WidgetServiceServer).AddSpace(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: WidgetService_AddSpace_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WidgetServiceServer).AddSpace(ctx, req.(*AddSpaceRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WidgetService_UpdateSpace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateSpaceRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WidgetServiceServer).UpdateSpace(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: WidgetService_UpdateSpace_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WidgetServiceServer).UpdateSpace(ctx, req.(*UpdateSpaceRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WidgetService_DeleteSpace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteSpaceRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WidgetServiceServer).DeleteSpace(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: WidgetService_DeleteSpace_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WidgetServiceServer).DeleteSpace(ctx, req.(*DeleteSpaceRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WidgetService_ReorderSpaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ReorderSpacesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WidgetServiceServer).ReorderSpaces(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: WidgetService_ReorderSpaces_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WidgetServiceServer).ReorderSpaces(ctx, req.(*ReorderSpacesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WidgetService_CreateWidgetInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateWidgetInstanceRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WidgetServiceServer).CreateWidgetInstance(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: WidgetService_CreateWidgetInstance_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WidgetServiceServer).CreateWidgetInstance(ctx, req.(*CreateWidgetInstanceRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WidgetService_SaveWidgetInstanceData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SaveWidgetInstanceDataRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WidgetServiceServer).SaveWidgetInstanceData(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: WidgetService_SaveWidgetInstanceData_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WidgetServiceServer).SaveWidgetInstanceData(ctx, req.(*SaveWidgetInstanceDataRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WidgetService_MoveWidgetInstanceToSpace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MoveWidgetInstanceToSpaceRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WidgetServiceServer).MoveWidgetInstanceToSpace(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: WidgetService_MoveWidgetInstanceToSpace_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WidgetServiceServer).MoveWidgetInstanceToSpace(ctx, req.(*MoveWidgetInstanceToSpaceRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WidgetService_DeleteWidgetInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteWidgetInstanceRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WidgetServiceServer).DeleteWidgetInstance(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: WidgetService_DeleteWidgetInstance_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WidgetServiceServer).DeleteWidgetInstance(ctx, req.(*DeleteWidgetInstanceRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// WidgetService_ServiceDesc is the grpc.ServiceDesc for WidgetService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var WidgetService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "helios.widgets.WidgetService",
|
||||
HandlerType: (*WidgetServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ListAppContexts",
|
||||
Handler: _WidgetService_ListAppContexts_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListSpaces",
|
||||
Handler: _WidgetService_ListSpaces_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AddSpace",
|
||||
Handler: _WidgetService_AddSpace_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateSpace",
|
||||
Handler: _WidgetService_UpdateSpace_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteSpace",
|
||||
Handler: _WidgetService_DeleteSpace_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ReorderSpaces",
|
||||
Handler: _WidgetService_ReorderSpaces_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateWidgetInstance",
|
||||
Handler: _WidgetService_CreateWidgetInstance_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SaveWidgetInstanceData",
|
||||
Handler: _WidgetService_SaveWidgetInstanceData_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "MoveWidgetInstanceToSpace",
|
||||
Handler: _WidgetService_MoveWidgetInstanceToSpace_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteWidgetInstance",
|
||||
Handler: _WidgetService_DeleteWidgetInstance_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "helios/widgets/widgetservice.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user