blog

package
v0.0.0-...-2e5aa7e Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRepository = errors.New("post repository execution error")

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Title     string
	Slug      string
	Content   string
	Author    string
	CreatedAt time.Time
}

type Repository

type Repository interface {
	FindOne(ctx context.Context, slug string) (*Entry, error)
	Find(ctx context.Context) (*[]Entry, error)
}

type Service

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

func ProvideService

func ProvideService(repo Repository) Service

func (Service) GetEntry

func (s Service) GetEntry(ctx context.Context, slug string) (*Entry, error)

func (Service) ListEntries

func (s Service) ListEntries(ctx context.Context) (*[]Entry, error)

Jump to

Keyboard shortcuts

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