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

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