defs

package
v0.0.0-...-4a48229 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Customer

type Customer interface {
	GetActID() string
	GetBizID() string

	GetUniqueID() uint64
	GetTalkID() string
	GetUserID() uint64
	SendMessage(msg *talkpb.TalkResponse) error
	Remove(msg string)

	CreateTalkFlag() bool
}

type CustomerMD

type CustomerMD interface {
	Setup(mr MainRoutineRunner)
	InstallCustomer(ctx context.Context, customer Customer)
	UninstallCustomer(ctx context.Context, customer Customer)
	CustomerMessageIncoming(ctx context.Context, customer Customer,
		seqID uint64, message *talkinters.TalkMessageW)
	CustomerClose(ctx context.Context, customer Customer)
}

type CustomerMDI

type CustomerMDI interface {
	MDIBase
	SetCustomerObserver(ob CustomerObserver)
	SendTalkCloseMessage(talkID string)
	SendTalkCreateMessage(talkID string)
}

type CustomerObserver

type CustomerObserver interface {
	OnMessageIncoming(senderUniqueID uint64, talkID string, message *talkinters.TalkMessageW)
	OnTalkClose(talkID string)
}

type CustomerUserGenAnonymousAuthenticator

type CustomerUserGenAnonymousAuthenticator interface {
	NewAnonymousAuthenticator(userName, actID, bizID string) userinters.Authenticator
}

type CustomerUserTokenExplain

type CustomerUserTokenExplain interface {
	ExplainToken(ctx context.Context, token string, renewToken bool) (newToken string, userID uint64,
		userName, actID, bizID string, err error)
}

type CustomerUserTokenHelper

type CustomerUserTokenHelper interface {
	UserTokenExtractor
	CustomerUserTokenExplain
	CustomerUserGenAnonymousAuthenticator
	ExtractUserFromGRPCContext(ctx context.Context, renewToken bool) (newToken string, userID uint64,
		userName, actID, bizID string, err error)
}

type MD

type MD interface {
	Load(ctx context.Context) (err error)
	CustomerMD
	ServicerMD
}

type MDI

type MDI interface {
	CustomerMDI
	ServicerMDI
}

type MDIBase

type MDIBase interface {
	GetM() ModelEx

	Load(ctx context.Context) error

	AddTrackTalk(ctx context.Context, talkID string) error
	RemoveTrackTalk(ctx context.Context, talkID string)

	SendMessage(senderUniqueID uint64, talkID string, message *talkinters.TalkMessageW)
}

type MainRoutineRunner

type MainRoutineRunner interface {
	Post(func())
}

type ModelEx

type ModelEx interface {
	talkinters.Model

	TalkExists(ctx context.Context, actIDs, bizIDs []string, talkID string) (bool, error)
	GetTalkInfo(ctx context.Context, actIDs, bizIDs []string, talkID string) (*talkinters.TalkInfoR, error)
	GetServicerTalkInfos(ctx context.Context, actIDs, bizIDs []string, servicerID uint64) ([]*talkinters.TalkInfoR, error)
	GetTalkServicerID(ctx context.Context, actIDs, bizIDs []string, talkID string) (servicerID uint64, err error)
}

type Observer

type Observer interface {
	CustomerObserver
	ServicerObserver
}

type Servicer

type Servicer interface {
	GetUserID() uint64
	GetUniqueID() uint64
	SendMessage(msg *talkpb.ServiceResponse) error
	Remove(msg string)

	GetActIDs() []string
	GetBizIDs() []string
}

type ServicerExDataGen

type ServicerExDataGen interface {
	GenExData(actIDs, bizIDs []string) map[string]interface{}
}

type ServicerMD

type ServicerMD interface {
	Setup(mr MainRoutineRunner)
	InstallServicer(ctx context.Context, servicer Servicer)
	UninstallServicer(ctx context.Context, servicer Servicer)
	ServicerAttachTalk(ctx context.Context, talkID string, servicer Servicer)
	ServicerDetachTalk(ctx context.Context, talkID string, servicer Servicer)
	ServicerQueryAttachedTalks(ctx context.Context, servicer Servicer)
	ServicerQueryPendingTalks(ctx context.Context, servicer Servicer)
	ServicerReloadTalk(ctx context.Context, servicer Servicer, talkID string)
	ServiceMessage(ctx context.Context, servicer Servicer, talkID string, seqID uint64, message *talkinters.TalkMessageW)
}

type ServicerMDI

type ServicerMDI interface {
	MDIBase
	SetServicerObserver(ob ServicerObserver)
	SendServicerAttachMessage(talkID string, servicerID uint64)
	SendServiceDetachMessage(talkID string, servicerID uint64)
}

type ServicerObserver

type ServicerObserver interface {
	OnMessageIncoming(senderUniqueID uint64, talkID string, message *talkinters.TalkMessageW)

	OnTalkCreate(talkID string)
	OnTalkClose(talkID string)

	OnServicerAttachMessage(talkID string, servicerID uint64)
	OnServicerDetachMessage(talkID string, servicerID uint64)
}

type ServicerUserTokenExplain

type ServicerUserTokenExplain interface {
	ExplainToken(ctx context.Context, token string, renewToken bool) (newToken string, userID uint64,
		userName string, admin bool, actIDs, bizIDs []string, err error)
}

type ServicerUserTokenHelper

type ServicerUserTokenHelper interface {
	UserTokenExtractor
	ServicerUserTokenExplain
	ServicerExDataGen
	ExtractUserFromGRPCContext(ctx context.Context, renewToken bool) (newToken string, userID uint64,
		userName string, admin bool, actIDs, bizIDs []string, err error)
}

type UserTokenExtractor

type UserTokenExtractor interface {
	ExtractTokenFromGRPCContext(ctx context.Context) (token string, err error)
}

Jump to

Keyboard shortcuts

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