usecase

package
v0.0.0-...-21c1986 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Snippet

type Snippet interface {
	CreateSnippet(ctx context.Context, t entity.SnippetCreate) (int, error)
	GetSnippet(ctx context.Context, id int) (*entity.Snippet, error)
	GetTenLatestSnippet(ctx context.Context) ([]*entity.Snippet, error)
}

type SnippetRepo

type SnippetRepo interface {
	Insert(ctx context.Context, t entity.SnippetCreate) (int, error)
	Get(ctx context.Context, id int) (*entity.Snippet, error)
	Latest(ctx context.Context) ([]*entity.Snippet, error)
}

type SnippetUseCase

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

func New

func (*SnippetUseCase) CreateSnippet

func (uc *SnippetUseCase) CreateSnippet(ctx context.Context, t entity.SnippetCreate) (int, error)

func (*SnippetUseCase) GetSnippet

func (uc *SnippetUseCase) GetSnippet(ctx context.Context, id int) (*entity.Snippet, error)

func (*SnippetUseCase) GetTenLatestSnippet

func (uc *SnippetUseCase) GetTenLatestSnippet(ctx context.Context) ([]*entity.Snippet, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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