streamchat

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Text chat functionality backed by getstream.io chat service.

TODO: convert to plugin.

Index

Constants

View Source
const MomentumChannelType = "momentum-world"

Currently manage a single channel type

Variables

This section is empty.

Functions

This section is empty.

Types

type StreamChat

type StreamChat struct {
	// contains filtered or unexported fields
}

func NewStreamChat

func NewStreamChat() *StreamChat

func (*StreamChat) GetChannel

func (s *StreamChat) GetChannel(ctx context.Context, object universe.Object) (*stream.Channel, error)

Get or create a channel for given object.

func (*StreamChat) GetToken

func (s *StreamChat) GetToken(ctx context.Context, user universe.User) (string, error)

Get StreamChat authentication token. Creates or update the user at the streamchat side.

func (*StreamChat) Initialize

func (s *StreamChat) Initialize(ctx types.NodeContext) error

func (*StreamChat) Load

func (s *StreamChat) Load() error

func (*StreamChat) MakeMember

func (s *StreamChat) MakeMember(ctx context.Context, channel *stream.Channel, user universe.User) error

Add user as a member of a channel.

func (*StreamChat) RegisterAPI

func (s *StreamChat) RegisterAPI(r *gin.Engine)

func (*StreamChat) RemoveMember

func (s *StreamChat) RemoveMember(ctx context.Context, channel *stream.Channel, user universe.User) error

Remove user as a member from a streamchat channel.

Jump to

Keyboard shortcuts

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