Paranoia

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: BSD-2-Clause Imports: 2 Imported by: 0

README

Paranoia framework

pipeline status coverage report Latest Release

Simple start:

Import to project go get gitlab.com/devpro_studio/Paranoia

add to main.go

	s := Paranoia.
		New("base paranoia app", &config.Env{}, &logger.File{&logger.Std{}}).
		PushCache(&cache.Memory{Name: "cache"}).
		PushRepository(&myRepository{Name: "repository"}).
		PushController(&myController{Name: "controller"})
	
	err := s.Init()

	if err != nil {
		panic(err)
		return
	}
	
	defer s.Stop()

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

func New

func New(name string, config interfaces.IConfig, logger interfaces.ILogger) *Service

func (*Service) GetBroker

func (t *Service) GetBroker(key string) interfaces.IBroker

func (*Service) GetCache

func (t *Service) GetCache(key string) interfaces.ICache

func (*Service) GetController

func (t *Service) GetController(key string) interfaces.IController

func (*Service) GetDatabase

func (t *Service) GetDatabase(key string) interfaces.IDatabase

func (*Service) GetLogger

func (t *Service) GetLogger() interfaces.ILogger

func (*Service) GetModule

func (t *Service) GetModule(key string) interfaces.IModules

func (*Service) GetRepository

func (t *Service) GetRepository(key string) interfaces.IRepository

func (*Service) GetServer

func (t *Service) GetServer(key string) interfaces.IServer

func (*Service) GetStorage

func (t *Service) GetStorage(key string) interfaces.IStorage

func (*Service) Init

func (t *Service) Init() error

func (*Service) PushBroker

func (t *Service) PushBroker(b interfaces.IBroker) interfaces.IService

func (*Service) PushCache

func (t *Service) PushCache(c interfaces.ICache) interfaces.IService

func (*Service) PushController

func (t *Service) PushController(b interfaces.IController) interfaces.IService

func (*Service) PushDatabase

func (t *Service) PushDatabase(b interfaces.IDatabase) interfaces.IService

func (*Service) PushModule

func (t *Service) PushModule(b interfaces.IModules) interfaces.IService

func (*Service) PushRepository

func (t *Service) PushRepository(b interfaces.IRepository) interfaces.IService

func (*Service) PushServer

func (t *Service) PushServer(b interfaces.IServer) interfaces.IService

func (*Service) PushStorage

func (t *Service) PushStorage(b interfaces.IStorage) interfaces.IService

func (*Service) Stop

func (t *Service) Stop() error

Jump to

Keyboard shortcuts

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