Skip to content

module ​

go
import "github.com/prescriptoo/prescriptoo-api/pkg/module"

Package module provides the shared Module type for service modules in the modular monolith architecture.

Index ​

type HTTPModule ​

HTTPModule defines the interface a module must satisfy to be mounted in the HTTP server.

go
type HTTPModule interface {
    Routes() http.Handler
}

type Module ​

Module is the base type embedded by all service modules. It holds the event bus for cross-module communication.

go
type Module struct {
    // contains filtered or unexported fields
}

func NewModule ​

go
func NewModule(bus events.Bus) Module

NewModule creates a base Module with the given event bus.

Generated by gomarkdoc

Documentation follows the source. Planned contracts are marked explicitly.