http

package
v0.0.0-...-cb92905 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandController

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

func NewCommandController

func NewCommandController(
	r app.OrderStore,
	e event.Publisher,
	timeout time.Duration,
) (CommandController, error)

type Config

type Config struct {
	Server struct {
		Port    string `json:"port"`
		Timeout int    `json:"timeout"`
	} `json:"server"`
	MongoDB struct {
		URL      string `json:"url"`
		Database string `json:"database"`
	} `json:"mongoDb"`
	Context struct {
		Timeout int `json:"timeout"`
	} `json:"context"`
}

type OrderQueryController

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

func NewQueryController

func NewQueryController(s QueryService) OrderQueryController

type QueryService

type QueryService interface {
	GetOrders(ctx context.Context) *query.GetOrdersDto
	GetOrder(ctx context.Context, id string) *query.GetOrderDto
}

type Server

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

func NewServer

func NewServer(cfg Config,
	e *echo.Echo,
	cmdCtrl CommandController,
	queryCtrl OrderQueryController,
) *Server

func (*Server) Config

func (s *Server) Config() Config

func (*Server) Fatal

func (s *Server) Fatal(err error)

func (*Server) Shutdown

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

func (*Server) Start

func (s *Server) Start() error

Jump to

Keyboard shortcuts

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