mashupsdk

package
v0.0.0-...-b57b4d2 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_mashupsdk_mashupsdk_proto protoreflect.FileDescriptor
View Source
var MashupCert embed.FS
View Source
var MashupKey embed.FS
View Source
var MashupServer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "mashupsdk.MashupServer",
	HandlerType: (*MashupServerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CollaborateInit",
			Handler:    _MashupServer_CollaborateInit_Handler,
		},
		{
			MethodName: "OnDisplayChange",
			Handler:    _MashupServer_OnDisplayChange_Handler,
		},
		{
			MethodName: "GetElements",
			Handler:    _MashupServer_GetElements_Handler,
		},
		{
			MethodName: "UpsertElements",
			Handler:    _MashupServer_UpsertElements_Handler,
		},
		{
			MethodName: "TweakStates",
			Handler:    _MashupServer_TweakStates_Handler,
		},
		{
			MethodName: "ResetStates",
			Handler:    _MashupServer_ResetStates_Handler,
		},
		{
			MethodName: "TweakStatesByMotiv",
			Handler:    _MashupServer_TweakStatesByMotiv_Handler,
		},
		{
			MethodName: "Shutdown",
			Handler:    _MashupServer_Shutdown_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "mashupsdk/mashupsdk.proto",
}

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

Functions

func GenAuthToken

func GenAuthToken() string

func InitCertKeyPair

func InitCertKeyPair(mc embed.FS, mk embed.FS)

func RegisterMashupServerServer

func RegisterMashupServerServer(s grpc.ServiceRegistrar, srv MashupServerServer)

Types

type DisplayElementState

type DisplayElementState int64
const (
	Immutable      DisplayElementState = 0 // For libraries
	Mutable        DisplayElementState = 1 // For
	Init           DisplayElementState = 2
	Clicked        DisplayElementState = 4
	Moved          DisplayElementState = 8
	Hidden         DisplayElementState = 16  // Hidden objects are not clickable
	Recursive      DisplayElementState = 32  // Apply attributes recursively
	SourceExternal DisplayElementState = 64  // Event source external
	RightClick     DisplayElementState = 128 // Click was a right mouse click
	ControlClicked DisplayElementState = 256 // Click was a Ctrl mouse click
)

type GuiWidgetBundle

type GuiWidgetBundle struct {
	GuiComponent          interface{}
	MashupDetailedElement *MashupDetailedElement
}

type MashupApiHandler

type MashupApiHandler interface {
	OnDisplayChange(displayHint *MashupDisplayHint)
	GetElements() (*MashupDetailedElementBundle, error)
	UpsertElements(detailedElementBundle *MashupDetailedElementBundle) (*MashupDetailedElementBundle, error)
	TweakStates(elementStateBundle *MashupElementStateBundle) (*MashupElementStateBundle, error)
	ResetStates()
	TweakStatesByMotiv(Motiv)
}

MashupApiHandler -- mashups implement this to handle all events sent from other mashups.

type MashupConnectionConfigs

type MashupConnectionConfigs struct {
	AuthToken   string `protobuf:"bytes,1,opt,name=authToken,proto3" json:"authToken,omitempty"`
	CallerToken string `protobuf:"bytes,2,opt,name=callerToken,proto3" json:"callerToken,omitempty"`
	Port        int64  `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"`
	// contains filtered or unexported fields
}

The response message with mashup credentials

func (*MashupConnectionConfigs) Descriptor deprecated

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

Deprecated: Use MashupConnectionConfigs.ProtoReflect.Descriptor instead.

func (*MashupConnectionConfigs) GetAuthToken

func (x *MashupConnectionConfigs) GetAuthToken() string

func (*MashupConnectionConfigs) GetCallerToken

func (x *MashupConnectionConfigs) GetCallerToken() string

func (*MashupConnectionConfigs) GetPort

func (x *MashupConnectionConfigs) GetPort() int64

func (*MashupConnectionConfigs) ProtoMessage

func (*MashupConnectionConfigs) ProtoMessage()

func (*MashupConnectionConfigs) ProtoReflect

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

func (*MashupConnectionConfigs) Reset

func (x *MashupConnectionConfigs) Reset()

func (*MashupConnectionConfigs) String

func (x *MashupConnectionConfigs) String() string

type MashupContext

type MashupContext struct {
	context.Context
	Client        MashupServerClient
	MashupGoodies map[string]interface{}
}

type MashupContextInitHandler

type MashupContextInitHandler interface {
	RegisterContext(*MashupContext)
}

type MashupDetailedElement

type MashupDetailedElement struct {
	Basisid        int64               `protobuf:"varint,1,opt,name=basisid,proto3" json:"basisid,omitempty"`
	Id             int64               `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	State          *MashupElementState `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"`
	Name           string              `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	Alias          string              `protobuf:"bytes,5,opt,name=alias,proto3" json:"alias,omitempty"`
	Description    string              `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
	Data           string              `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"`
	Custosrenderer string              `protobuf:"bytes,8,opt,name=custosrenderer,proto3" json:"custosrenderer,omitempty"`
	Renderer       string              `protobuf:"bytes,9,opt,name=renderer,proto3" json:"renderer,omitempty"`
	Colabrenderer  string              `protobuf:"bytes,10,opt,name=colabrenderer,proto3" json:"colabrenderer,omitempty"`
	Genre          string              `protobuf:"bytes,11,opt,name=genre,proto3" json:"genre,omitempty"`
	Subgenre       string              `protobuf:"bytes,12,opt,name=subgenre,proto3" json:"subgenre,omitempty"`
	Parentids      []int64             `protobuf:"varint,13,rep,packed,name=parentids,proto3" json:"parentids,omitempty"`
	Childids       []int64             `protobuf:"varint,14,rep,packed,name=childids,proto3" json:"childids,omitempty"`
	// contains filtered or unexported fields
}

func (*MashupDetailedElement) ApplyState

func (m *MashupDetailedElement) ApplyState(x DisplayElementState, isset bool) bool

func (*MashupDetailedElement) Copy

func (*MashupDetailedElement) Descriptor deprecated

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

Deprecated: Use MashupDetailedElement.ProtoReflect.Descriptor instead.

func (*MashupDetailedElement) GetAlias

func (x *MashupDetailedElement) GetAlias() string

func (*MashupDetailedElement) GetBasisid

func (x *MashupDetailedElement) GetBasisid() int64

func (*MashupDetailedElement) GetChildids

func (x *MashupDetailedElement) GetChildids() []int64

func (*MashupDetailedElement) GetColabrenderer

func (x *MashupDetailedElement) GetColabrenderer() string

func (*MashupDetailedElement) GetCustosrenderer

func (x *MashupDetailedElement) GetCustosrenderer() string

func (*MashupDetailedElement) GetData

func (x *MashupDetailedElement) GetData() string

func (*MashupDetailedElement) GetDescription

func (x *MashupDetailedElement) GetDescription() string

func (*MashupDetailedElement) GetGenre

func (x *MashupDetailedElement) GetGenre() string

func (*MashupDetailedElement) GetId

func (x *MashupDetailedElement) GetId() int64

func (*MashupDetailedElement) GetMashupElementState

func (m *MashupDetailedElement) GetMashupElementState() *MashupElementState

func (*MashupDetailedElement) GetName

func (x *MashupDetailedElement) GetName() string

func (*MashupDetailedElement) GetParentids

func (x *MashupDetailedElement) GetParentids() []int64

func (*MashupDetailedElement) GetRenderer

func (x *MashupDetailedElement) GetRenderer() string

func (*MashupDetailedElement) GetState

func (*MashupDetailedElement) GetSubgenre

func (x *MashupDetailedElement) GetSubgenre() string

func (*MashupDetailedElement) IsStateSet

func (m *MashupDetailedElement) IsStateSet(stateBit DisplayElementState) bool

func (*MashupDetailedElement) ProtoMessage

func (*MashupDetailedElement) ProtoMessage()

func (*MashupDetailedElement) ProtoReflect

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

func (*MashupDetailedElement) Reset

func (x *MashupDetailedElement) Reset()

func (*MashupDetailedElement) SetElementState

func (m *MashupDetailedElement) SetElementState(x DisplayElementState)

func (*MashupDetailedElement) String

func (x *MashupDetailedElement) String() string

type MashupDetailedElementBundle

type MashupDetailedElementBundle struct {
	AuthToken        string                   `protobuf:"bytes,1,opt,name=authToken,proto3" json:"authToken,omitempty"`
	DetailedElements []*MashupDetailedElement `protobuf:"bytes,2,rep,name=detailedElements,proto3" json:"detailedElements,omitempty"`
	// contains filtered or unexported fields
}

func (*MashupDetailedElementBundle) Descriptor deprecated

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

Deprecated: Use MashupDetailedElementBundle.ProtoReflect.Descriptor instead.

func (*MashupDetailedElementBundle) GetAuthToken

func (x *MashupDetailedElementBundle) GetAuthToken() string

func (*MashupDetailedElementBundle) GetDetailedElements

func (x *MashupDetailedElementBundle) GetDetailedElements() []*MashupDetailedElement

func (*MashupDetailedElementBundle) ProtoMessage

func (*MashupDetailedElementBundle) ProtoMessage()

func (*MashupDetailedElementBundle) ProtoReflect

func (*MashupDetailedElementBundle) Reset

func (x *MashupDetailedElementBundle) Reset()

func (*MashupDetailedElementBundle) String

func (x *MashupDetailedElementBundle) String() string

type MashupDisplayBundle

type MashupDisplayBundle struct {
	AuthToken         string             `protobuf:"bytes,1,opt,name=authToken,proto3" json:"authToken,omitempty"`
	MashupDisplayHint *MashupDisplayHint `protobuf:"bytes,2,opt,name=mashupDisplayHint,proto3" json:"mashupDisplayHint,omitempty"`
	// contains filtered or unexported fields
}

func (*MashupDisplayBundle) Descriptor deprecated

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

Deprecated: Use MashupDisplayBundle.ProtoReflect.Descriptor instead.

func (*MashupDisplayBundle) GetAuthToken

func (x *MashupDisplayBundle) GetAuthToken() string

func (*MashupDisplayBundle) GetMashupDisplayHint

func (x *MashupDisplayBundle) GetMashupDisplayHint() *MashupDisplayHint

func (*MashupDisplayBundle) ProtoMessage

func (*MashupDisplayBundle) ProtoMessage()

func (*MashupDisplayBundle) ProtoReflect

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

func (*MashupDisplayBundle) Reset

func (x *MashupDisplayBundle) Reset()

func (*MashupDisplayBundle) String

func (x *MashupDisplayBundle) String() string

type MashupDisplayContext

type MashupDisplayContext struct {
	MainWinDisplay *MashupDisplayHint
	// contains filtered or unexported fields
}

func (*MashupDisplayContext) ApplySettled

func (m *MashupDisplayContext) ApplySettled(s MashupDisplayState, override bool) MashupDisplayState

func (*MashupDisplayContext) GetSettled

func (m *MashupDisplayContext) GetSettled() MashupDisplayState

func (*MashupDisplayContext) GetYoffset

func (m *MashupDisplayContext) GetYoffset() int

func (*MashupDisplayContext) OnDisplayChange

func (m *MashupDisplayContext) OnDisplayChange(displayHint *MashupDisplayHint) bool

func (*MashupDisplayContext) SetYoffset

func (m *MashupDisplayContext) SetYoffset(a int) int

type MashupDisplayHint

type MashupDisplayHint struct {
	Focused bool  `protobuf:"varint,1,opt,name=focused,proto3" json:"focused,omitempty"`
	Xpos    int64 `protobuf:"varint,2,opt,name=xpos,proto3" json:"xpos,omitempty"`
	Ypos    int64 `protobuf:"varint,3,opt,name=ypos,proto3" json:"ypos,omitempty"`
	Width   int64 `protobuf:"varint,4,opt,name=width,proto3" json:"width,omitempty"`
	Height  int64 `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty"`
	// contains filtered or unexported fields
}

The query message with display position information.

func (*MashupDisplayHint) Descriptor deprecated

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

Deprecated: Use MashupDisplayHint.ProtoReflect.Descriptor instead.

func (*MashupDisplayHint) GetFocused

func (x *MashupDisplayHint) GetFocused() bool

func (*MashupDisplayHint) GetHeight

func (x *MashupDisplayHint) GetHeight() int64

func (*MashupDisplayHint) GetWidth

func (x *MashupDisplayHint) GetWidth() int64

func (*MashupDisplayHint) GetXpos

func (x *MashupDisplayHint) GetXpos() int64

func (*MashupDisplayHint) GetYpos

func (x *MashupDisplayHint) GetYpos() int64

func (*MashupDisplayHint) ProtoMessage

func (*MashupDisplayHint) ProtoMessage()

func (*MashupDisplayHint) ProtoReflect

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

func (*MashupDisplayHint) Reset

func (x *MashupDisplayHint) Reset()

func (*MashupDisplayHint) String

func (x *MashupDisplayHint) String() string

type MashupDisplayState

type MashupDisplayState int
const (
	Configured     MashupDisplayState = 1
	Position       MashupDisplayState = 2
	Frame          MashupDisplayState = 4
	AppInitted     MashupDisplayState = 8
	DisplaySettled MashupDisplayState = 31
)

type MashupElementState

type MashupElementState struct {
	Id    int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	State int64 `protobuf:"varint,2,opt,name=state,proto3" json:"state,omitempty"`
	// contains filtered or unexported fields
}

func (*MashupElementState) Descriptor deprecated

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

Deprecated: Use MashupElementState.ProtoReflect.Descriptor instead.

func (*MashupElementState) GetId

func (x *MashupElementState) GetId() int64

func (*MashupElementState) GetState

func (x *MashupElementState) GetState() int64

func (*MashupElementState) ProtoMessage

func (*MashupElementState) ProtoMessage()

func (*MashupElementState) ProtoReflect

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

func (*MashupElementState) Reset

func (x *MashupElementState) Reset()

func (*MashupElementState) String

func (x *MashupElementState) String() string

type MashupElementStateBundle

type MashupElementStateBundle struct {
	AuthToken     string                `protobuf:"bytes,1,opt,name=authToken,proto3" json:"authToken,omitempty"`
	ElementStates []*MashupElementState `protobuf:"bytes,2,rep,name=elementStates,proto3" json:"elementStates,omitempty"`
	// contains filtered or unexported fields
}

func (*MashupElementStateBundle) Descriptor deprecated

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

Deprecated: Use MashupElementStateBundle.ProtoReflect.Descriptor instead.

func (*MashupElementStateBundle) GetAuthToken

func (x *MashupElementStateBundle) GetAuthToken() string

func (*MashupElementStateBundle) GetElementStates

func (x *MashupElementStateBundle) GetElementStates() []*MashupElementState

func (*MashupElementStateBundle) ProtoMessage

func (*MashupElementStateBundle) ProtoMessage()

func (*MashupElementStateBundle) ProtoReflect

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

func (*MashupElementStateBundle) Reset

func (x *MashupElementStateBundle) Reset()

func (*MashupElementStateBundle) String

func (x *MashupElementStateBundle) String() string

type MashupEmpty

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

func (*MashupEmpty) Descriptor deprecated

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

Deprecated: Use MashupEmpty.ProtoReflect.Descriptor instead.

func (*MashupEmpty) GetAuthToken

func (x *MashupEmpty) GetAuthToken() string

func (*MashupEmpty) ProtoMessage

func (*MashupEmpty) ProtoMessage()

func (*MashupEmpty) ProtoReflect

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

func (*MashupEmpty) Reset

func (x *MashupEmpty) Reset()

func (*MashupEmpty) String

func (x *MashupEmpty) String() string

type MashupServerClient

type MashupServerClient interface {
	// Indicates to mashup it is time to shutdown.
	CollaborateInit(ctx context.Context, in *MashupConnectionConfigs, opts ...grpc.CallOption) (*MashupConnectionConfigs, error)
	OnDisplayChange(ctx context.Context, in *MashupDisplayBundle, opts ...grpc.CallOption) (*MashupDisplayHint, error)
	GetElements(ctx context.Context, in *MashupEmpty, opts ...grpc.CallOption) (*MashupDetailedElementBundle, error)
	UpsertElements(ctx context.Context, in *MashupDetailedElementBundle, opts ...grpc.CallOption) (*MashupDetailedElementBundle, error)
	TweakStates(ctx context.Context, in *MashupElementStateBundle, opts ...grpc.CallOption) (*MashupElementStateBundle, error)
	ResetStates(ctx context.Context, in *MashupEmpty, opts ...grpc.CallOption) (*empty.Empty, error)
	TweakStatesByMotiv(ctx context.Context, in *Motiv, opts ...grpc.CallOption) (*empty.Empty, error)
	Shutdown(ctx context.Context, in *MashupEmpty, opts ...grpc.CallOption) (*MashupEmpty, error)
}

MashupServerClient is the client API for MashupServer 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 MashupServerServer

type MashupServerServer interface {
	// Indicates to mashup it is time to shutdown.
	CollaborateInit(context.Context, *MashupConnectionConfigs) (*MashupConnectionConfigs, error)
	OnDisplayChange(context.Context, *MashupDisplayBundle) (*MashupDisplayHint, error)
	GetElements(context.Context, *MashupEmpty) (*MashupDetailedElementBundle, error)
	UpsertElements(context.Context, *MashupDetailedElementBundle) (*MashupDetailedElementBundle, error)
	TweakStates(context.Context, *MashupElementStateBundle) (*MashupElementStateBundle, error)
	ResetStates(context.Context, *MashupEmpty) (*empty.Empty, error)
	TweakStatesByMotiv(context.Context, *Motiv) (*empty.Empty, error)
	Shutdown(context.Context, *MashupEmpty) (*MashupEmpty, error)
	// contains filtered or unexported methods
}

MashupServerServer is the server API for MashupServer service. All implementations must embed UnimplementedMashupServerServer for forward compatibility

type Motiv

type Motiv struct {
	AuthToken string `protobuf:"bytes,1,opt,name=authToken,proto3" json:"authToken,omitempty"`
	Code      int64  `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

func (*Motiv) Descriptor deprecated

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

Deprecated: Use Motiv.ProtoReflect.Descriptor instead.

func (*Motiv) GetAuthToken

func (x *Motiv) GetAuthToken() string

func (*Motiv) GetCode

func (x *Motiv) GetCode() int64

func (*Motiv) ProtoMessage

func (*Motiv) ProtoMessage()

func (*Motiv) ProtoReflect

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

func (*Motiv) Reset

func (x *Motiv) Reset()

func (*Motiv) String

func (x *Motiv) String() string

type ShutdownReply

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

The response message containing the any messages to log

func (*ShutdownReply) Descriptor deprecated

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

Deprecated: Use ShutdownReply.ProtoReflect.Descriptor instead.

func (*ShutdownReply) GetMessage

func (x *ShutdownReply) GetMessage() string

func (*ShutdownReply) ProtoMessage

func (*ShutdownReply) ProtoMessage()

func (*ShutdownReply) ProtoReflect

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

func (*ShutdownReply) Reset

func (x *ShutdownReply) Reset()

func (*ShutdownReply) String

func (x *ShutdownReply) String() string

type UnimplementedMashupServerServer

type UnimplementedMashupServerServer struct {
}

UnimplementedMashupServerServer must be embedded to have forward compatible implementations.

func (UnimplementedMashupServerServer) CollaborateInit

func (UnimplementedMashupServerServer) GetElements

func (UnimplementedMashupServerServer) OnDisplayChange

func (UnimplementedMashupServerServer) ResetStates

func (UnimplementedMashupServerServer) Shutdown

func (UnimplementedMashupServerServer) TweakStates

func (UnimplementedMashupServerServer) TweakStatesByMotiv

type UnsafeMashupServerServer

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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