usecase

package
v0.0.0-...-38c5a15 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 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 CreateShortcutBoundary

type CreateShortcutBoundary interface {
	CreateShortcut(context.Context, *CreateShortcutInput) (*CreateShortcutOutput, error)
}

CreateShortcutBoundary is Boundary of CreateShortcut

func NewCreateShortcutInteractor

func NewCreateShortcutInteractor(f *entity.Factory, repo ShortcutRepository) CreateShortcutBoundary

type CreateShortcutInput

type CreateShortcutInput struct {
	LongURL string `json:"long_url"`
}

CreateShortcutInput is InputData for CreateShortcutBoundary

type CreateShortcutInteractor

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

func (*CreateShortcutInteractor) CreateShortcut

type CreateShortcutOutput

type CreateShortcutOutput struct {
	ShortcutID entity.ShortcutID
	LongURL    string
}

CreateShortcutInput is OutputData for CreateShortcutBoundary

type GetShortcutBoundary

type GetShortcutBoundary interface {
	GetShortcut(context.Context, *GetShortcutInput) (*GetShortcutOutput, error)
}

GetShortcutBoundary is Boundary of GetShortcut

func NewGetShortcutInteractor

func NewGetShortcutInteractor(f *entity.Factory, repo ShortcutRepository) GetShortcutBoundary

type GetShortcutInput

type GetShortcutInput struct {
	ShortcutID string `json:"shortcut_id"`
}

GetShortcutInput is InputData for GetShortcutBoundary

type GetShortcutInteractor

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

func (*GetShortcutInteractor) GetShortcut

type GetShortcutOutput

type GetShortcutOutput struct {
	RedirectURL string
}

GetShortcutInput is OutputData for GetShortcutBoundary

type ShortcutRepository

type ShortcutRepository interface {
	Save(context.Context, *entity.Shortcut) error
	Find(context.Context, entity.ShortcutID) (*entity.Shortcut, error)
}

type Usecase

Usecase is is a container for Boundarys

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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