storage

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DialogRepository

type DialogRepository interface {
	CreateDialog(ctx context.Context, id model.DialogID) error
	GetDialogParticipants(ctx context.Context, dialogID model.DialogID) ([]*model.Participant, error)
	AddParticipants(ctx context.Context, dialogID model.DialogID, participants []*model.Participant) error
	GetDialogMessages(ctx context.Context, dialogID model.DialogID) ([]*model.Message, error) // TODO: pagination
	CreateMessage(ctx context.Context, params *model.Message) (*model.Message, error)

	DeleteParticipants(ctx context.Context, dialogID model.DialogID, participants []*model.Participant) error
	DeleteDialog(ctx context.Context, dialogID model.DialogID) error
	DeleteMessage(ctx context.Context, dialogID model.DialogID, messageID model.MessageID) error
}

type Storage

type Storage interface {
	Dialog() DialogRepository
	Hosts() []string
	Salt() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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