user_use_case

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 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 CheckUserOutput

type CheckUserOutput struct {
	ID          int    `json:"id"`
	Username    string `json:"username"`
	ExpiresAt   string `json:"expiration_date"`
	ExpiresDays int    `json:"expiration_days"`
	Limit       int    `json:"limit_connections"`
	Connections int    `json:"count_connections"`
}

type CheckUserUseCase

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

func NewCheckUserUseCase

func NewCheckUserUseCase(
	userRepository contract.UserRepository,
	deviceRepository contract.DeviceRepository,
) *CheckUserUseCase

func (*CheckUserUseCase) Execute

func (c *CheckUserUseCase) Execute(ctx context.Context, username, deviceID string) (*CheckUserOutput, error)

type CountConnectionsByUsernameUseCase

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

func NewCountConnectionsByUsernameUseCase

func NewCountConnectionsByUsernameUseCase(connection contract.Connection) *CountConnectionsByUsernameUseCase

func (*CountConnectionsByUsernameUseCase) Execute

func (c *CountConnectionsByUsernameUseCase) Execute(ctx context.Context, username string) int

type CountConnectionsUseCase

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

func NewCountConnectionsUseCase

func NewCountConnectionsUseCase(connection contract.Connection) *CountConnectionsUseCase

func (*CountConnectionsUseCase) Execute

func (c *CountConnectionsUseCase) Execute(ctx context.Context) int

Jump to

Keyboard shortcuts

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