core

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package core contains the core module of the nutrix application.

The core module contains the main business logic of the application, including the data models, services, and handlers for the core features of the application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Core

type Core struct {
	// Logger is the logger object for the core module.
	Logger logger.ILogger

	// Config is the config object for the core module.
	Config config.Config

	// Settings is the settings object for the core module.
	Settings models.Settings

	// Prompter is the prompter object for the core module.
	Prompter userio.Prompter

	// NotificationSvc is the notification service object for the core module.
	NotificationSvc services.INotificationService
}

Core is the main struct for the core module.

It contains the necessary fields for the core module to function, including the logger, config, settings, prompter, and notification service.

func (*Core) GetSeedables

func (c *Core) GetSeedables() (entities []string, err error)

GetSeedables returns a list of seedables.

func (*Core) OnEnd

func (c *Core) OnEnd() func()

OnEnd is called when the core module is ended.

func (*Core) OnStart

func (c *Core) OnStart() func()

OnStart is called when the core module is started.

func (*Core) RegisterBackgroundWorkers

func (c *Core) RegisterBackgroundWorkers() []modules.Worker

RegisterBackgroundWorkers registers background workers.

func (*Core) RegisterHttpHandlers

func (c *Core) RegisterHttpHandlers(router *mux.Router, prefix string)

RegisterHttpHandlers registers HTTP handlers.

func (*Core) Seed

func (c *Core) Seed(entities []string, is_new_only bool) error

Seed seeds the database with sample data.

Directories

Path Synopsis
Package dto contains structs for data transfer objects (DTOs) used in the core module of nutrix.
Package dto contains structs for data transfer objects (DTOs) used in the core module of nutrix.
Package handlers contains HTTP handlers for the core module of nutrix.
Package handlers contains HTTP handlers for the core module of nutrix.
Package middlewares contains middleware functions for the web server.
Package middlewares contains middleware functions for the web server.
Package models contains the data models for the application.
Package models contains the data models for the application.
Package services contains the business logic of the core module of nutrix.
Package services contains the business logic of the core module of nutrix.

Jump to

Keyboard shortcuts

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