service

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageService

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

func NewMessageService

func NewMessageService(client *chatent.Client) *MessageService

func (*MessageService) CreateMessage

func (s *MessageService) CreateMessage(ctx context.Context, session *chatent.Session, fromUserId, toUserId, content string) (*chatent.Message, error)

func (*MessageService) CreateSpouseMessage

func (s *MessageService) CreateSpouseMessage(ctx context.Context, session *chatent.Session, fromUserId, toUserId, content string, spouse *chatent.Message) (*chatent.Message, error)

func (*MessageService) ListLatestMessagesWithSpouse

func (s *MessageService) ListLatestMessagesWithSpouse(ctx context.Context, userId string, sessionId int, limit int) ([]*chatent.Message, error)

type SessionService

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

func NewSessionService

func NewSessionService(client *chatent.Client) *SessionService

func (*SessionService) CreateSession

func (s *SessionService) CreateSession(ctx context.Context, userId string) (*chatent.Session, error)

func (*SessionService) GetLatestActiveSession

func (s *SessionService) GetLatestActiveSession(ctx context.Context, userId string) (*chatent.Session, error)

Jump to

Keyboard shortcuts

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