Documentation ¶
Index ¶
- Variables
- type InstrumentingMiddleware
- func (i InstrumentingMiddleware) CheckHome(ctx context.Context, id int64) (res *domain.HomeCrime, err error)
- func (i InstrumentingMiddleware) CreateCrime(ctx context.Context, crime *domain.Crime) (res *domain.Crime, err error)
- func (i InstrumentingMiddleware) CreateHome(ctx context.Context, home *domain.Home) (res *domain.Home, err error)
- func (i InstrumentingMiddleware) DeleteCrime(ctx context.Context, id int64) (err error)
- func (i InstrumentingMiddleware) DeleteHome(ctx context.Context, id int64) (err error)
- func (i InstrumentingMiddleware) GetCrime(ctx context.Context, id int64) (res *domain.Crime, err error)
- func (i InstrumentingMiddleware) GetCrimes(ctx context.Context) (res *[]domain.Crime, err error)
- func (i InstrumentingMiddleware) GetHome(ctx context.Context, id int64) (res *domain.Home, err error)
- func (i InstrumentingMiddleware) UpdateCrime(ctx context.Context, crime *domain.Crime) (res *domain.Crime, err error)
- type LoggingMiddleWare
- func (m LoggingMiddleWare) CheckHome(ctx context.Context, id int64) (home *domain.HomeCrime, err error)
- func (m LoggingMiddleWare) CreateCrime(ctx context.Context, crime *domain.Crime) (res *domain.Crime, err error)
- func (m LoggingMiddleWare) CreateHome(ctx context.Context, req *domain.Home) (home *domain.Home, err error)
- func (m LoggingMiddleWare) DeleteCrime(ctx context.Context, id int64) (err error)
- func (m LoggingMiddleWare) DeleteHome(ctx context.Context, id int64) (err error)
- func (m LoggingMiddleWare) GetCrime(ctx context.Context, id int64) (res *domain.Crime, err error)
- func (m LoggingMiddleWare) GetCrimes(ctx context.Context) (res *[]domain.Crime, err error)
- func (m LoggingMiddleWare) GetHome(ctx context.Context, id int64) (home *domain.Home, err error)
- func (m LoggingMiddleWare) UpdateCrime(ctx context.Context, crime *domain.Crime) (res *domain.Crime, err error)
- type Service
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type InstrumentingMiddleware ¶
type InstrumentingMiddleware struct { RequestCount metrics.Counter RequestLatency metrics.Histogram CountResult metrics.Histogram Next Service }
func (InstrumentingMiddleware) CreateCrime ¶
func (InstrumentingMiddleware) CreateHome ¶
func (InstrumentingMiddleware) DeleteCrime ¶
func (i InstrumentingMiddleware) DeleteCrime(ctx context.Context, id int64) (err error)
func (InstrumentingMiddleware) DeleteHome ¶
func (i InstrumentingMiddleware) DeleteHome(ctx context.Context, id int64) (err error)
func (InstrumentingMiddleware) UpdateCrime ¶
type LoggingMiddleWare ¶
func (LoggingMiddleWare) CreateCrime ¶
func (LoggingMiddleWare) CreateHome ¶
func (LoggingMiddleWare) DeleteCrime ¶
func (m LoggingMiddleWare) DeleteCrime(ctx context.Context, id int64) (err error)
func (LoggingMiddleWare) DeleteHome ¶
func (m LoggingMiddleWare) DeleteHome(ctx context.Context, id int64) (err error)
func (LoggingMiddleWare) UpdateCrime ¶
type Service ¶
type Service interface { GetCrimes(ctx context.Context) (*[]domain.Crime, error) GetCrime(ctx context.Context, id int64) (*domain.Crime, error) CreateCrime(ctx context.Context, crime *domain.Crime) (*domain.Crime, error) UpdateCrime(ctx context.Context, crime *domain.Crime) (*domain.Crime, error) DeleteCrime(ctx context.Context, id int64) error CreateHome(ctx context.Context, home *domain.Home) (*domain.Home, error) GetHome(ctx context.Context, id int64) (*domain.Home, error) DeleteHome(ctx context.Context, id int64) error CheckHome(ctx context.Context, id int64) (*domain.HomeCrime, error) }
func NewService ¶
func NewService(store store.Repository, logger log.Logger) Service
Click to show internal directories.
Click to hide internal directories.