ports

package
v0.0.0-...-0de0edb Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mediator

type Mediator interface {
	Publish(ctx context.Context, events ...mediator.Event) error
}

type TrManager

type TrManager interface {
	Do(ctx context.Context, fn func(ctx context.Context) error) (err error)
}

type UniquenessPolicer

type UniquenessPolicer interface {
	IsUnique(email common.Email) (bool, error)
}

type UserPgStorage

type UserPgStorage interface {
	Fetch(ctx context.Context, limit, offset int64) ([]entity.User, error)
	Create(ctx context.Context, data entity.User) error
	Update(ctx context.Context, data entity.User) error
	GetByEmail(ctx context.Context, email common.Email) (entity.User, error)
	GetByID(ctx context.Context, id common.UID) (entity.User, error)
	Delete(ctx context.Context, id common.UID) error
}

type UserRedisStorage

type UserRedisStorage interface {
	GetByID(ctx context.Context, id common.UID) (entity.User, error)
	Set(ctx context.Context, key string, user entity.User) error
	Delete(ctx context.Context, key string) error
}

type UserViewStorage

type UserViewStorage interface {
	Fetch(ctx context.Context, limit, offset int64) ([]entity.User, error)
	GetByEmail(ctx context.Context, email common.Email) (entity.User, error)
	GetByID(ctx context.Context, id common.UID) (entity.User, error)
}

Jump to

Keyboard shortcuts

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