trcchat

package
v0.0.0-...-c50f130 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommonInit

func CommonInit(authToken string, callerToken string)

func GetId

func GetId() int64

Updates ID and returns value id should match up with number of queries made by user

func ProcessDFQuery

func ProcessDFQuery(msg *mashupsdk.MashupDetailedElement)

This is currently a stub version of processing a DialogFlow query When the dialogflow api has been implemented, send the msg provided in the parameter to the endpoint of the dialogflowapi

func ProcessDFResponse

func ProcessDFResponse(msg *mashupsdk.MashupDetailedElement)

This is currently a stub version of processing a DialogFlow query When the dialogflow api has been implemented, send the msg provided in the parameter to the endpoint of the dialogflowapi This message will need to be interpreted and formated by dialogflow to make it understandable to user

func ProcessGChatAnswer

func ProcessGChatAnswer(msg *mashupsdk.MashupDetailedElement)

Prints out answer to google chat user and sets up google chat app to ask another response Once the google chat api is set up, should send response to correct endpoint for google chat

func ProcessQuery

func ProcessQuery(msg *mashupsdk.MashupDetailedElement)

Processes upserted query from client Changes based on msg.Name

Types

type GChatApp

type GChatApp struct {
	MashupSdkApiHandler          *GoogleChatHandler
	GoogleChatContext            *GoogleChatContext
	WClientInitHandler           *WorldClientInitHandler
	DetailedElements             []*mashupsdk.MashupDetailedElement
	MashupDetailedElementLibrary map[int64]*mashupsdk.MashupDetailedElement
	ElementLoaderIndex           map[string]int64 // mashup indexes by Name
}

func (*GChatApp) InitServer

func (w *GChatApp) InitServer(callerCreds string, insecure bool, maxMessageLength int)

type GoogleChatContext

type GoogleChatContext struct {
	MashupContext *mashupsdk.MashupContext // Needed for callbacks to other mashups
}

type GoogleChatHandler

type GoogleChatHandler struct {
}

func (*GoogleChatHandler) GetElements

func (*GoogleChatHandler) GetMashupElements

func (msdk *GoogleChatHandler) GetMashupElements() (*mashupsdk.MashupDetailedElementBundle, error)

func (*GoogleChatHandler) OnDisplayChange

func (msdk *GoogleChatHandler) OnDisplayChange(displayHint *mashupsdk.MashupDisplayHint)

func (*GoogleChatHandler) OnResize

func (msdk *GoogleChatHandler) OnResize(displayHint *mashupsdk.MashupDisplayHint)

func (*GoogleChatHandler) ResetG3NDetailedElementStates

func (msdk *GoogleChatHandler) ResetG3NDetailedElementStates()

func (*GoogleChatHandler) ResetStates

func (msdk *GoogleChatHandler) ResetStates()

func (*GoogleChatHandler) TweakStates

func (*GoogleChatHandler) TweakStatesByMotiv

func (msdk *GoogleChatHandler) TweakStatesByMotiv(mashupsdk.Motiv)

func (*GoogleChatHandler) UpsertElements

func (msdk *GoogleChatHandler) UpsertElements(detailedElementBundle *mashupsdk.MashupDetailedElementBundle) (*mashupsdk.MashupDetailedElementBundle, error)

func (*GoogleChatHandler) UpsertMashupElements

func (msdk *GoogleChatHandler) UpsertMashupElements(detailedElementBundle *mashupsdk.MashupDetailedElementBundle) (*mashupsdk.MashupDetailedElementBundle, error)

func (*GoogleChatHandler) UpsertMashupElementsState

func (msdk *GoogleChatHandler) UpsertMashupElementsState(elementStateBundle *mashupsdk.MashupElementStateBundle) (*mashupsdk.MashupElementStateBundle, error)

type WorldClientInitHandler

type WorldClientInitHandler struct {
}

func (*WorldClientInitHandler) RegisterContext

func (w *WorldClientInitHandler) RegisterContext(context *mashupsdk.MashupContext)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳