hitrix

package module
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: GPL-3.0 Imports: 37 Imported by: 0

README

Hitrix

codecov Go Report Card GPL3 license

Hitrix is a framework written in Go based on Gin. It is for web and console applications and provides set of reusable services and features needed for every project so you can focus only on delivering business requirements

Installation

Please follow our Official documentation

The key services and features of Hitrix are:
  • Config service
  • Dependency injection container
  • ORM service to access database
  • Redis Cache layer on top of mysql
  • Redis Search layer on top of mysql
  • Redis Stream for queues
  • OSS service
  • Error logger service
  • Mail provider service
  • Authentication service
  • Feature flag service
  • Clockwork service
  • Background scripts
  • Integration test engine
  • Seeder
  • Validator
  • etc...

Hitrix exposes API for special DEV-PANEL web frontend where you can manage all your queues, error log, performance, mysql alters and so on. You can fully manage your application using our dev panel

For Contributors

Every new feature or change already existing feature should be described into the documentation. To change the documentation you need to execute next steps:

  1. Go to /docs/docs folder
  2. Change the documentation using .md files
  3. If you want to change sidebar or navbar you can do it in /docs/docs/.vuepress/config.js
  4. Run it on localhost from, folder /docs using yarn docs:dev
  5. Push your changes

If you create a new service and write documentation for it please follow next template:

  1. service definition - what this service can be used for
  2. register service - how the service should be registered
  3. access service - how the service can be accessed
  4. technical documentation - details about the service, examples and different use cases

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Goroutine added in v0.8.77

func Goroutine(fn func())

func GoroutineWithRestart added in v0.8.77

func GoroutineWithRestart(fn func())

func InitGin

func InitGin(server graphql.ExecutableSchema, ginInitHandler GinInitHandler, gqlServerInitHandler GQLServerInitHandler) *gin.Engine

func Validate

func Validate(ctx context.Context, callback func() bool) bool

func ValidateDirective

func ValidateDirective() func(ctx context.Context, obj interface{}, next graphql.Resolver, rules string) (interface{}, error)

Types

type BackgroundProcessor added in v0.8.5

type BackgroundProcessor struct {
	Server *Hitrix
}

func (*BackgroundProcessor) RunAsyncOrmConsumer added in v0.8.5

func (processor *BackgroundProcessor) RunAsyncOrmConsumer()

func (*BackgroundProcessor) RunAsyncRequestLoggerCleaner added in v1.1.59

func (processor *BackgroundProcessor) RunAsyncRequestLoggerCleaner()

func (*BackgroundProcessor) RunScript added in v0.8.5

func (processor *BackgroundProcessor) RunScript(s app.IScript)

type GQLServerInitHandler added in v0.3.1

type GQLServerInitHandler func(server *handler.Server)

type GinInitHandler

type GinInitHandler func(ginEngine *gin.Engine)

type Hitrix

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

func (*Hitrix) RunBackgroundProcess added in v0.8.5

func (h *Hitrix) RunBackgroundProcess(callback func(b *BackgroundProcessor))

func (*Hitrix) RunServer

func (h *Hitrix) RunServer(
	defaultPort uint,
	server graphql.ExecutableSchema,
	ginInitHandler GinInitHandler,
	gqlServerInitHandler GQLServerInitHandler,
)

type Registry

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

func New

func New(appName string, secret string) *Registry

func (*Registry) Build

func (r *Registry) Build() (*Hitrix, func())

func (*Registry) RegisterDIGlobalService added in v0.8.35

func (r *Registry) RegisterDIGlobalService(service ...*service.DefinitionGlobal) *Registry

func (*Registry) RegisterDIRequestService added in v0.8.35

func (r *Registry) RegisterDIRequestService(service ...*service.DefinitionRequest) *Registry

func (*Registry) RegisterDevPanel

func (r *Registry) RegisterDevPanel(devPanelUserEntity app.IDevPanelUserEntity, router func(ginEngine *gin.Engine)) *Registry

func (*Registry) RegisterRedisPools added in v0.9.19

func (r *Registry) RegisterRedisPools(pools *app.RedisPools) *Registry

func (*Registry) SetParallelTestID added in v0.8.82

func (r *Registry) SetParallelTestID(parallelTestID string) *Registry

Directories

Path Synopsis
example
oss
pkg

Jump to

Keyboard shortcuts

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