Documentation
¶
Index ¶
- type Environment
- func (e *Environment) CheckErrors(errors []error) error
- func (e *Environment) GetBoolOrDefault(path string, defaultValue bool) bool
- func (e *Environment) GetDurationOrDefault(path string, defaultValue time.Duration) time.Duration
- func (e *Environment) GetFloat64OrDefault(path string, defaultValue float64) float64
- func (e *Environment) GetIntOrDefault(path string, defaultValue int) int
- func (e *Environment) GetStringOrDefault(path string, defaultValue string) string
- type EnvironmentBuilder
- func (eb *EnvironmentBuilder) Build() (*Environment, error)
- func (eb *EnvironmentBuilder) WithConfigurationFile(config string) *EnvironmentBuilder
- func (eb *EnvironmentBuilder) WithName(name string) *EnvironmentBuilder
- func (eb *EnvironmentBuilder) WithRemoteConfiguration(provider, uri string) *EnvironmentBuilder
- type Exception
- type Microservice
- func (m *Microservice) Broker() interfaces.Broker
- func (m *Microservice) Cache() interfaces.Cache
- func (m *Microservice) Close()
- func (m *Microservice) Config(path string, defaultValue interface{}) interface{}
- func (m *Microservice) Create(key string, value interface{}) error
- func (m *Microservice) Debug(msg string)
- func (m *Microservice) Debugf(msg string, args ...interface{})
- func (m *Microservice) Delete(key string) error
- func (m *Microservice) DeleteHandler(endpoint string, handler interface{})
- func (m *Microservice) Error(msg string)
- func (m *Microservice) Errorf(msg string, args ...interface{})
- func (m *Microservice) Errors() []error
- func (m *Microservice) Fatal(msg string)
- func (m *Microservice) Fatalf(msg string, args ...interface{})
- func (m *Microservice) GetHandler(endpoint string, handler interface{})
- func (m *Microservice) HookShutDown(fn func())
- func (m *Microservice) Info(msg string)
- func (m *Microservice) Infof(msg string, args ...interface{})
- func (m *Microservice) List() ([]interface{}, error)
- func (m *Microservice) Middleware(middleware func(*gin.Context))
- func (m *Microservice) PostHandler(endpoint string, handler interface{})
- func (m *Microservice) Process(instance interface{}) (interface{}, error)
- func (m *Microservice) Publish(topic string, handler interface{}) error
- func (m *Microservice) PutHandler(endpoint string, handler interface{})
- func (m *Microservice) Read(key string) (interface{}, error)
- func (m *Microservice) Registry() interfaces.Registry
- func (m *Microservice) Run()
- func (m *Microservice) Running() bool
- func (m *Microservice) StaticFilesFolder(uri, folder string)
- func (m *Microservice) Store() interfaces.Store
- func (m *Microservice) Subscribe(topic string, callback nats.MsgHandler) error
- func (m *Microservice) SubscribeDefault(handler nats.MsgHandler) error
- func (m *Microservice) Transport() interfaces.Transport
- func (m *Microservice) Update(key string, value interface{}) error
- func (m *Microservice) Warn(msg string)
- func (m *Microservice) Warnf(msg string, args ...interface{})
- type MicroserviceBuilder
- func (mb *MicroserviceBuilder) Build() (*Microservice, error)
- func (mb *MicroserviceBuilder) WithBroker(broker interfaces.Broker) *MicroserviceBuilder
- func (mb *MicroserviceBuilder) WithCache(cache interfaces.Cache) *MicroserviceBuilder
- func (mb *MicroserviceBuilder) WithDiscovery(discovery interfaces.Registry) *MicroserviceBuilder
- func (mb *MicroserviceBuilder) WithPlugin(processor interfaces.Processor) *MicroserviceBuilder
- func (mb *MicroserviceBuilder) WithStore(store interfaces.Store) *MicroserviceBuilder
- func (mb *MicroserviceBuilder) WithSubscription(topic string, callback nats.MsgHandler) *MicroserviceBuilder
- func (mb *MicroserviceBuilder) WithTransport(transport interfaces.Transport) *MicroserviceBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Environment ¶
func (*Environment) CheckErrors ¶
func (e *Environment) CheckErrors(errors []error) error
func (*Environment) GetBoolOrDefault ¶
func (e *Environment) GetBoolOrDefault(path string, defaultValue bool) bool
func (*Environment) GetDurationOrDefault ¶
func (*Environment) GetFloat64OrDefault ¶
func (e *Environment) GetFloat64OrDefault(path string, defaultValue float64) float64
func (*Environment) GetIntOrDefault ¶
func (e *Environment) GetIntOrDefault(path string, defaultValue int) int
func (*Environment) GetStringOrDefault ¶
func (e *Environment) GetStringOrDefault(path string, defaultValue string) string
type EnvironmentBuilder ¶
type EnvironmentBuilder struct { *Environment // contains filtered or unexported fields }
func NewEnvironmentBuilder ¶
func NewEnvironmentBuilder() *EnvironmentBuilder
func (*EnvironmentBuilder) Build ¶
func (eb *EnvironmentBuilder) Build() (*Environment, error)
func (*EnvironmentBuilder) WithConfigurationFile ¶
func (eb *EnvironmentBuilder) WithConfigurationFile(config string) *EnvironmentBuilder
func (*EnvironmentBuilder) WithName ¶
func (eb *EnvironmentBuilder) WithName(name string) *EnvironmentBuilder
func (*EnvironmentBuilder) WithRemoteConfiguration ¶
func (eb *EnvironmentBuilder) WithRemoteConfiguration(provider, uri string) *EnvironmentBuilder
type Microservice ¶
type Microservice struct { *Environment // contains filtered or unexported fields }
func (*Microservice) Broker ¶
func (m *Microservice) Broker() interfaces.Broker
func (*Microservice) Cache ¶
func (m *Microservice) Cache() interfaces.Cache
func (*Microservice) Close ¶
func (m *Microservice) Close()
func (*Microservice) Config ¶
func (m *Microservice) Config(path string, defaultValue interface{}) interface{}
func (*Microservice) Create ¶
func (m *Microservice) Create(key string, value interface{}) error
func (*Microservice) Debug ¶
func (m *Microservice) Debug(msg string)
func (*Microservice) Debugf ¶
func (m *Microservice) Debugf(msg string, args ...interface{})
func (*Microservice) Delete ¶
func (m *Microservice) Delete(key string) error
func (*Microservice) DeleteHandler ¶
func (m *Microservice) DeleteHandler(endpoint string, handler interface{})
func (*Microservice) Error ¶
func (m *Microservice) Error(msg string)
func (*Microservice) Errorf ¶
func (m *Microservice) Errorf(msg string, args ...interface{})
func (*Microservice) Errors ¶
func (m *Microservice) Errors() []error
func (*Microservice) Fatal ¶
func (m *Microservice) Fatal(msg string)
func (*Microservice) Fatalf ¶
func (m *Microservice) Fatalf(msg string, args ...interface{})
func (*Microservice) GetHandler ¶
func (m *Microservice) GetHandler(endpoint string, handler interface{})
func (*Microservice) HookShutDown ¶
func (m *Microservice) HookShutDown(fn func())
func (*Microservice) Info ¶
func (m *Microservice) Info(msg string)
func (*Microservice) Infof ¶
func (m *Microservice) Infof(msg string, args ...interface{})
func (*Microservice) List ¶
func (m *Microservice) List() ([]interface{}, error)
func (*Microservice) Middleware ¶
func (m *Microservice) Middleware(middleware func(*gin.Context))
func (*Microservice) PostHandler ¶
func (m *Microservice) PostHandler(endpoint string, handler interface{})
func (*Microservice) Process ¶
func (m *Microservice) Process(instance interface{}) (interface{}, error)
func (*Microservice) Publish ¶
func (m *Microservice) Publish(topic string, handler interface{}) error
func (*Microservice) PutHandler ¶
func (m *Microservice) PutHandler(endpoint string, handler interface{})
func (*Microservice) Read ¶
func (m *Microservice) Read(key string) (interface{}, error)
func (*Microservice) Registry ¶
func (m *Microservice) Registry() interfaces.Registry
func (*Microservice) Run ¶
func (m *Microservice) Run()
func (*Microservice) Running ¶
func (m *Microservice) Running() bool
func (*Microservice) StaticFilesFolder ¶
func (m *Microservice) StaticFilesFolder(uri, folder string)
func (*Microservice) Store ¶
func (m *Microservice) Store() interfaces.Store
func (*Microservice) Subscribe ¶
func (m *Microservice) Subscribe(topic string, callback nats.MsgHandler) error
func (*Microservice) SubscribeDefault ¶
func (m *Microservice) SubscribeDefault(handler nats.MsgHandler) error
func (*Microservice) Transport ¶
func (m *Microservice) Transport() interfaces.Transport
func (*Microservice) Update ¶
func (m *Microservice) Update(key string, value interface{}) error
func (*Microservice) Warn ¶
func (m *Microservice) Warn(msg string)
func (*Microservice) Warnf ¶
func (m *Microservice) Warnf(msg string, args ...interface{})
type MicroserviceBuilder ¶
type MicroserviceBuilder struct { *Microservice Exception }
func NewMicroserviceBuilder ¶
func NewMicroserviceBuilder(environment *Environment) *MicroserviceBuilder
func (*MicroserviceBuilder) Build ¶
func (mb *MicroserviceBuilder) Build() (*Microservice, error)
func (*MicroserviceBuilder) WithBroker ¶
func (mb *MicroserviceBuilder) WithBroker(broker interfaces.Broker) *MicroserviceBuilder
func (*MicroserviceBuilder) WithCache ¶
func (mb *MicroserviceBuilder) WithCache(cache interfaces.Cache) *MicroserviceBuilder
func (*MicroserviceBuilder) WithDiscovery ¶
func (mb *MicroserviceBuilder) WithDiscovery(discovery interfaces.Registry) *MicroserviceBuilder
func (*MicroserviceBuilder) WithPlugin ¶
func (mb *MicroserviceBuilder) WithPlugin(processor interfaces.Processor) *MicroserviceBuilder
func (*MicroserviceBuilder) WithStore ¶
func (mb *MicroserviceBuilder) WithStore(store interfaces.Store) *MicroserviceBuilder
func (*MicroserviceBuilder) WithSubscription ¶
func (mb *MicroserviceBuilder) WithSubscription(topic string, callback nats.MsgHandler) *MicroserviceBuilder
func (*MicroserviceBuilder) WithTransport ¶
func (mb *MicroserviceBuilder) WithTransport(transport interfaces.Transport) *MicroserviceBuilder
Click to show internal directories.
Click to hide internal directories.