contract

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 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 CountConnection

type CountConnection interface {
	SetNext(connection CountConnection)
	ByUsername(ctx context.Context, username string) (int, error)
	All(ctx context.Context) (int, error)
}

type CountConnectionCacheService

type CountConnectionCacheService interface {
	Set(key string, value int, ttl time.Duration)
	Get(key string) (int, bool)
}

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)
	CountAll(ctx context.Context) (int, error)
}

type Executor

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

type UserCacheService

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

type UserDAO

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