counter

package
v0.0.0-...-7669f62 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	CreateDialogCounters(ctx context.Context, dialogID model.DialogID, participants []*model.Participant) error
	IncreaseDialogCounters(ctx context.Context, dialogID model.DialogID, senderID model.UserID, participants []*model.Participant) error
	FlushDialogCountersForUser(ctx context.Context, dialogID model.DialogID, userID model.UserID) error
}

type ClientImpl

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

func NewClientImpl

func NewClientImpl(logger *zap.Logger, conn *grpc.ClientConn) *ClientImpl

func (*ClientImpl) CreateDialogCounters

func (c *ClientImpl) CreateDialogCounters(ctx context.Context, dialogID model.DialogID, participants []*model.Participant) error

func (*ClientImpl) FlushDialogCountersForUser

func (c *ClientImpl) FlushDialogCountersForUser(ctx context.Context, dialogID model.DialogID, userID model.UserID) error

func (*ClientImpl) IncreaseDialogCounters

func (c *ClientImpl) IncreaseDialogCounters(ctx context.Context, dialogID model.DialogID, senderID model.UserID, participants []*model.Participant) error

type ClientMock

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

func NewClientMock

func NewClientMock(logger *zap.Logger) *ClientMock

func (*ClientMock) CreateDialogCounters

func (m *ClientMock) CreateDialogCounters(ctx context.Context, dialogID model.DialogID, participants []*model.Participant) error

func (*ClientMock) FlushDialogCountersForUser

func (m *ClientMock) FlushDialogCountersForUser(ctx context.Context, dialogID model.DialogID, userID model.UserID) error

func (*ClientMock) IncreaseDialogCounters

func (m *ClientMock) IncreaseDialogCounters(ctx context.Context, dialogID model.DialogID, senderID model.UserID, participants []*model.Participant) error

Jump to

Keyboard shortcuts

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