contract

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection interface {
	SetNext(connection Connection)
	CountByUsername(ctx context.Context, username string) (int, error)
	Count(ctx context.Context) (int, error)
}

type DeviceRepository

type DeviceRepository interface {
	Save(ctx context.Context, device *entity.Device) error
	Exists(ctx context.Context, device *entity.Device) bool
	DeleteByUsername(ctx context.Context, username string) error
	CountByUsername(ctx context.Context, username string) (int, error)
	ListByUsername(ctx context.Context, username string) ([]*entity.Device, error)
	ListAll(ctx context.Context) ([]*entity.Device, error)
}

type Executor

type Executor interface {
	Execute(ctx context.Context, command string) (string, error)
}

type UserCacheService added in v0.1.5

type UserCacheService interface {
	Set(value *entity.User, ttl time.Duration)
	Get(username string) (*entity.User, bool)
}

type UserDAO added in v0.1.5

type UserDAO interface {
	FindByUsername(ctx context.Context, username string) (*entity.User, error)
}

type UserRepository

type UserRepository interface {
	FindByUsername(ctx context.Context, username string) (*entity.User, error)
}

Jump to

Keyboard shortcuts

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