biz

package
v0.0.0-...-7d1b39b Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PublishMessage = 1
)

Variables

View Source
var ErrInValidActionType = errors.New("invalid action type")

ProviderSet is biz providers.

Functions

This section is empty.

Types

type Message

type Message struct {
	Id         uint64
	ToUserId   uint32
	FromUserId uint32
	Content    string
	CreateTime int64
}

type MessageRepo

type MessageRepo interface {
	GetMessageList(context.Context, uint32, int64) ([]*Message, error)
	PublishMessage(context.Context, uint32, string) error
	InitStoreMessageQueue()
}

type MessageUseCase

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

func NewMessageUseCase

func NewMessageUseCase(repo MessageRepo, logger log.Logger) *MessageUseCase

func (*MessageUseCase) GetMessageList

func (uc *MessageUseCase) GetMessageList(
	ctx context.Context, toUserId uint32, preMsgTime int64,
) ([]*Message, error)

func (*MessageUseCase) PublishMessage

func (uc *MessageUseCase) PublishMessage(
	ctx context.Context, toUserId uint32, actionType uint32, content string,
) error

Jump to

Keyboard shortcuts

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