Documentation
¶
Index ¶
- Variables
- func Configure(obj interface{}, file string, metaData ...interface{}) error
- func DefaultConfiguration() iris.Configuration
- func IsDir(dir string) bool
- func IsFile(path string) bool
- func JoinPath(elems ...string) string
- func Logger() *golog.Logger
- func Prepare(f func(Initiator))
- func ProfileDirFromEnv() string
- func Prometheus() *internal.Prometheus
- func ReadProfile(file string, v interface{}) error
- func ServiceLocator() *internal.ServiceLocatorImpl
- func SetConfigurator(c Configurator)
- func SetConfigurer(c Configurer)
- type Application
- type BeforeActivation
- type BootManager
- type Bus
- type BusHandler
- type Configuration
- type Configurator
- type Configurer
- type Context
- type DomainEvent
- type Entity
- type Infra
- type Initiator
- type IrisBeforeActivation
- type IrisConfiguration
- type IrisContext
- type IrisResult
- type LogFields
- type LogRow
- type Repository
- type Result
- type SingleBoot
- type UnitTest
- type Worker
Constants ¶
This section is empty.
Variables ¶
var ( // EnvProfileDir is the name of the environment variable for the search // directory of the profile EnvProfileDir = "FREEDOM_PROJECT_CONFIG" // ProfileENV is the name of the profile directory in environment variable ProfileENV = EnvProfileDir )
Functions ¶
func DefaultConfiguration ¶ added in v1.6.9
func DefaultConfiguration() iris.Configuration
DefaultConfiguration proxy a call to iris.DefaultConfiguration
func IsDir ¶ added in v1.8.8
IsDir accepts a string with a directory path and tests the path. It returns true if the path exists and it is a directory, and false otherwise.
func IsFile ¶ added in v1.8.8
IsFile accepts a string with a file path and tests the path. It returns true if the path exists and it is a file, and false otherwise.
func JoinPath ¶ added in v1.8.8
JoinPath returns a string that joins any number of path elements into a single path, separating them with slashes.
func ProfileDirFromEnv ¶ added in v1.8.8
func ProfileDirFromEnv() string
ProfileDirFromEnv reads from environment variable with EnvProfileDir
func ReadProfile ¶ added in v1.8.8
ReadProfile accepts a string with the name of a profile file, and search the file by detectProfilePath. It will fill v with the configuration by parsing the profile into toml format, and returns nil if the file has found. It returns error, if the file has not been found or any error encountered.
func ServiceLocator ¶ added in v1.8.8
func ServiceLocator() *internal.ServiceLocatorImpl
ServiceLocator .
func SetConfigurator ¶ added in v1.8.8
func SetConfigurator(c Configurator)
SetConfigurator assigns a Configurator to global configurator
func SetConfigurer ¶ added in v1.6.9
func SetConfigurer(c Configurer)
SetConfigurer assigns a Configurator to global configurator
Types ¶
type Application ¶
type Application interface {
InstallDB(f func() (db interface{}))
InstallRedis(f func() (client redis.Cmdable))
InstallCustom(f func() interface{})
InstallMiddleware(handler iris.Handler)
InstallParty(relativePath string)
NewRunner(addr string, configurators ...host.Configurator) iris.Runner
NewH2CRunner(addr string, configurators ...host.Configurator) iris.Runner
NewAutoTLSRunner(addr string, domain string, email string, configurators ...host.Configurator) iris.Runner
NewTLSRunner(addr string, certFile, keyFile string, configurators ...host.Configurator) iris.Runner
Iris() *iris.Application
Logger() *golog.Logger
Run(serve iris.Runner, c iris.Configuration)
BindBooting(f func(bootManager BootManager))
InstallBusMiddleware(handle ...BusHandler)
InstallSerializer(marshal func(v interface{}) ([]byte, error), unmarshal func(data []byte, v interface{}) error)
}
Application represents an application of freedom
type BeforeActivation ¶ added in v1.7.1
type BeforeActivation = IrisBeforeActivation
BeforeActivation is Is the start-up pre-processing of the action.
type BootManager ¶ added in v1.8.9
type BootManager = internal.BootManager
BootManager is the startup interface.
type BusHandler ¶ added in v1.6.2
type BusHandler = internal.BusHandler
BusHandler is the bus message middleware type.
type Configuration ¶ added in v1.6.9
type Configuration = IrisConfiguration
Configuration is the configuration type of the app.
type Configurator ¶ added in v1.8.8
type Configurator interface {
Configure(obj interface{}, file string, metaData ...interface{}) error
}
Configurator .
type DomainEvent ¶ added in v1.8.6
type DomainEvent = internal.DomainEvent
DomainEvent represents a domain event
type IrisBeforeActivation ¶ added in v1.8.8
type IrisBeforeActivation = mvc.BeforeActivation
IrisBeforeActivation represents an type alias to mvc.BeforeActivation
type IrisConfiguration ¶ added in v1.8.8
type IrisConfiguration = iris.Configuration
IrisConfiguration represents an type alias to iris.Configuration
type IrisContext ¶ added in v1.8.8
IrisContext represents an type alias to iris.Context
type IrisResult ¶ added in v1.8.8
IrisResult represents an type alias to hero.Result
Directories
¶
| Path | Synopsis |
|---|---|
|
example
|
|
|
base/adapter/repository
Package repository code generated by 'freedom new-project base' Package repository code generated by 'freedom new-project base'
|
Package repository code generated by 'freedom new-project base' Package repository code generated by 'freedom new-project base' |
|
base/domain
Package domain generated by 'freedom new-project base'
|
Package domain generated by 'freedom new-project base' |
|
base/domain/po
Package po generated by 'freedom new-project base'
|
Package po generated by 'freedom new-project base' |
|
base/domain/vo
Package vo generated by 'freedom new-project base'
|
Package vo generated by 'freedom new-project base' |
|
base/infra
Package infra generated by 'freedom new-project base' Package infra generated by 'freedom new-project base'
|
Package infra generated by 'freedom new-project base' Package infra generated by 'freedom new-project base' |
|
base/server
command
Package main code generated by 'freedom new-project base'
|
Package main code generated by 'freedom new-project base' |
|
fshop/domain/po
Package po generated by 'freedom new-po' Package po generated by 'freedom new-po' Package po generated by 'freedom new-po' Package po generated by 'freedom new-po' Package po generated by 'freedom new-po' Package po generated by 'freedom new-po' Package po generated by 'freedom new-po'
|
Package po generated by 'freedom new-po' Package po generated by 'freedom new-po' Package po generated by 'freedom new-po' Package po generated by 'freedom new-po' Package po generated by 'freedom new-po' Package po generated by 'freedom new-po' Package po generated by 'freedom new-po' |
|
fshop/infra
Package infra code generated by 'freedom new-project base' Package infra code generated by 'freedom new-project base'
|
Package infra code generated by 'freedom new-project base' Package infra code generated by 'freedom new-project base' |
|
fshop/server
command
Code generated by 'freedom new-project fshop'
|
Code generated by 'freedom new-project fshop' |
|
http2/server
command
|
|
|
infra-example/domain/po
Package po generated by 'freedom new-po' Package po generated by 'freedom new-po'
|
Package po generated by 'freedom new-po' Package po generated by 'freedom new-po' |
|
infra-example/domain/vo
Package vo code generated by 'freedom new-project infra-example'
|
Package vo code generated by 'freedom new-project infra-example' |
|
infra-example/infra
Package infra code generated by 'freedom new-project base' Package infra code generated by 'freedom new-project base'
|
Package infra code generated by 'freedom new-project base' Package infra code generated by 'freedom new-project base' |
|
infra-example/server
command
Code generated by 'freedom new-project infra-example'
|
Code generated by 'freedom new-project infra-example' |
|
infra
|
|
