Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type ErrInvalidRequestBody ¶
type ErrInvalidRequestBody struct {
// contains filtered or unexported fields
}
func (ErrInvalidRequestBody) Error ¶
func (e ErrInvalidRequestBody) Error() string
type Middleware ¶
Middleware describes a Service Middleware
func LoggingMiddleware ¶
func LoggingMiddleware(logger log.Logger) Middleware
type Service ¶
type Service interface {
Save(context.Context, pkg.Fact) (*pkg.Fact, error)
List(context.Context) ([]pkg.Fact, error)
Update(context.Context, pkg.Fact) (*pkg.Fact, bool, error)
Remove(context.Context, int64) error
}
Service is an application service that lets us interact with a list of facts
func NewService ¶
func NewService(repository pkg.FactRepository) Service
Click to show internal directories.
Click to hide internal directories.