core

package module
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2019 License: MIT Imports: 21 Imported by: 0

README

CORE

Documentation

Index

Constants

View Source
const Version = "v1.1.3"

Variables

This section is empty.

Functions

func BrowseLog

func BrowseLog(ctx *gin.Context)

func HealthHandler

func HealthHandler(healthFunction health.HealthFunc) func(ctx *gin.Context)

Health godoc @_Summary Show health service status @_Produce json @_Success 200 {string} nil "" @_Failure 400 {object} fault.TypedErrorStr "" @_Failure 404 {object} fault.TypedErrorStr "" @_Failure 500 {object} fault.TypedErrorStr "" @_Router /health [get]

func RedirectToApiHandler

func RedirectToApiHandler(RouterGroup *gin.RouterGroup)

func ShowVersion

func ShowVersion() string

Types

type AbstractComponent

type AbstractComponent struct {
	Log *logger.Logger
}

type BaseComponent

type BaseComponent struct {
	AbstractComponent
	Address           string
	FactoryGinRouter  factory_gin.FactoryGinRouter
	FactoryRestClient factory_restclient.FactoryRestClient
	FactoryLogger     factory_logger.FactoryLogger
	FactoryRedis      factory_redis.FactoryRedis
	FactoryCache      factory_cache.FactoryCache
	FactoryOAuth      factory_oauth.FactoryOAuth
	FactoryGormSource factory_gormsource.FactoryGormSource
	FactorySwagger    factory_swagger.FactorySwagger
	FactoryKafka      factory_kafka.FactoryKafka
	FactoryDataSource factory_datasource.FactoryDataSource
	FactoryRedirect   factory_redirect.FactoryRedirect
	ApiVersion        string
	// contains filtered or unexported fields
}

func (*BaseComponent) InitBaseComponent

func (this *BaseComponent) InitBaseComponent(
	serviceName string,
	version string,

	swaggerInfo *SI,
)

func (*BaseComponent) PostConstructComponent

func (this *BaseComponent) PostConstructComponent(
	serviceName string,
	swaggerInfo *SI,
	router Router,
	healthFunction health.HealthFunc,
)

func (*BaseComponent) RedirectToApi

func (this *BaseComponent) RedirectToApi(ctx *gin.Context)

type BaseRouter

type BaseRouter struct {
	Router      *gin.Engine
	RouterGroup *gin.RouterGroup
	Filters     []gin.HandlerFunc
}

func (*BaseRouter) AddFilter

func (this *BaseRouter) AddFilter(handlers ...gin.HandlerFunc)

func (*BaseRouter) Get

func (this *BaseRouter) Get(relativePath string, handlers ...gin.HandlerFunc)

func (BaseRouter) GetEngine

func (this BaseRouter) GetEngine() *gin.Engine

func (*BaseRouter) GetRouterGroup

func (this *BaseRouter) GetRouterGroup() *gin.RouterGroup

type Router

type Router interface {
	Get(relativePath string, handlers ...gin.HandlerFunc)
	GetEngine() *gin.Engine
	GetRouterGroup() *gin.RouterGroup
	AddFilter(handlers ...gin.HandlerFunc)
	InitRouter()
}

type SI

type SI struct {
	Version     string
	Host        string
	BasePath    string
	Schemes     []string
	Title       string
	Description string
}

Directories

Path Synopsis
factory
Типы были выделенны для того чтобы в списке аргументов избежать несовпадний из за однотипности
Типы были выделенны для того чтобы в списке аргументов избежать несовпадний из за однотипности

Jump to

Keyboard shortcuts

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