core

package
v0.0.0-...-0fcfa94 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API responsible to deliver communication of application and client via http transport.

func NewApi

func NewApi(l *Logger) *API

func (*API) GetCore

func (r *API) GetCore() *fiber.App

func (*API) GetRouter

func (r *API) GetRouter() fiber.Router

type Database

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

func NewDatabase

func NewDatabase(l *Logger) *Database

func (*Database) GetCore

func (db *Database) GetCore() *gorm.DB

type Logger

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

Logger act application logging using slog, standard Go library for structured log. This dependency could also be used by the package by injecting it at initialization.

func NewLogger

func NewLogger() *Logger

func (*Logger) GetCore

func (l *Logger) GetCore() *slog.Logger

type PubSub

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

PubSub responsible for communication intermediary between packages. The core is using watermill GoChannel pub/sub implementation and could be replaced by any other type as long as it's still using watermill package, otherwise the router wouldn't work as expected.

func NewPubSub

func NewPubSub(l *Logger) *PubSub

func (*PubSub) GetCore

func (ps *PubSub) GetCore() *gochannel.GoChannel

func (*PubSub) GetRouter

func (ps *PubSub) GetRouter() *message.Router

Jump to

Keyboard shortcuts

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