handler

package
v0.0.0-...-174de0b Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(srv *service.Service, log *zap.Logger) *logHandler

Types

type CustomValidator

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

func (*CustomValidator) Validate

func (cv *CustomValidator) Validate(i interface{}) error

type Server

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

func NewServer

func NewServer(cfg config.Server, h *logHandler) *Server

func (*Server) Run

func (s *Server) Run()

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

type Service

type Service interface {
	CreateLog(ctx context.Context, raw string) (int64, error)
	GetLog(ctx context.Context, id int) (models.Log, error)
	ListLogs(ctx context.Context) ([]models.Log, error)
}

Directories

Path Synopsis
Package mock_handler is a generated GoMock package.
Package mock_handler is a generated GoMock package.

Jump to

Keyboard shortcuts

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