service

package
v0.0.0-...-cc2418b Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService(repo Repository) *service

Types

type Repository

type Repository interface {
	Create(ctx context.Context, post *model.Post) error
	Get(ctx context.Context, id string) (*model.Post, error)
	GetBy(ctx context.Context, filter interface{}) ([]model.Post, error)
	Update(ctx context.Context, post *model.Post) error
	Delete(ctx context.Context, id string) error
}

Jump to

Keyboard shortcuts

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