Documentation
¶
Index ¶
- type Action
- type ActionsObject
- type ActionsObjectFactory
- type BusinesParamBuilder
- type BusinessParam
- type BusinessParamFactory
- type BusinessParamFactoryParamter
- type Reducer
- type StateManagement
- type StateManagementFactory
- type StateManagementFactoryParamter
- type Store
- type StoreError
- type StoreErrorType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionsObject ¶
type ActionsObject interface { GetActions() []Action GetActionsNames() []string Contains(action Action) bool ContainsByName(actionName string) bool GetActionByName(name string) Action }
func NewActionsObject ¶
func NewActionsObject(catcher errors.ErrorCatcher, actions interface{}) ActionsObject
type ActionsObjectFactory ¶ added in v1.1.0
type ActionsObjectFactory interface {
Create(actions interface{}) ActionsObject
}
func NewActionsObjectFactory ¶ added in v1.1.0
func NewActionsObjectFactory(container dependencyinjection.Container) ActionsObjectFactory
type BusinesParamBuilder ¶ added in v1.0.0
type BusinesParamBuilder interface { SetInitialState(interface{}) BusinesParamBuilder SetActions(interface{}) BusinesParamBuilder SetSelector(selector string) BusinesParamBuilder On(action Action, function interface{}) BusinesParamBuilder SetActionsLogicByObject(object interface{}) BusinesParamBuilder GetBusinessParam() BusinessParam }
func NewBusinessParamBuilder ¶ added in v0.0.22
func NewBusinessParamBuilder(logger logs.Logger, aactionsObjectFactory ActionsObjectFactory, businessParamFactory BusinessParamFactory) BusinesParamBuilder
type BusinessParam ¶ added in v0.0.22
type BusinessParam interface { GetActionsObject() ActionsObject GetReducer() Reducer GetInitialState() interface{} GetSelector() string }
func NewBusinessParam ¶ added in v0.0.22
func NewBusinessParam(initialState interface{}, reducer Reducer, actionObject ActionsObject, selector string) BusinessParam
type BusinessParamFactory ¶ added in v1.1.0
type BusinessParamFactory interface {
Create(parameter BusinessParamFactoryParamter) BusinessParam
}
func NewBusinessParamFactory ¶ added in v1.1.0
func NewBusinessParamFactory(container dependencyinjection.Container) BusinessParamFactory
type BusinessParamFactoryParamter ¶ added in v1.1.0
type BusinessParamFactoryParamter struct { InitialState interface{} Reducer Reducer ActionsObject ActionsObject Selector string }
type StateManagement ¶ added in v1.1.0
type StateManagement interface { Subscribe(subscription *func(state interface{})) UnSubscribe(subscription *func(state interface{})) GetState() interface{} SetState(newState interface{}) }
func NewStateManager ¶ added in v1.1.0
func NewStateManager(initialState interface{}, selector string, storePublisher eventsmanager.Publisher, subscriptions eventsmanager.Subscriptions, selectorPublisher eventsmanager.Publisher) StateManagement
type StateManagementFactory ¶ added in v1.1.0
type StateManagementFactory interface {
Create(parameter StateManagementFactoryParamter) StateManagement
}
func NewStateManagementFactory ¶ added in v1.1.0
func NewStateManagementFactory(container dependencyinjection.Container) StateManagementFactory
type StateManagementFactoryParamter ¶ added in v1.1.0
type StateManagementFactoryParamter struct { InitialState interface{} Selector string StorePublisher eventsmanager.Publisher }
type Store ¶
type Store interface { GetState() interface{} Dispatch(Action) Subscribe(*func()) Unsubscribe(*func()) AddReducer(BusinessParam) RemoveReducer(string) GetStateOf(string) interface{} SubscribeTo(string, *func(interface{})) UnsubscribeFrom(string, *func(interface{})) }
func NewStore ¶
func NewStore(errorDefer errors.ErrorDefer, subscriptions eventsmanager.Subscriptions, publisher eventsmanager.Publisher, stateManagementFactory StateManagementFactory) Store
type StoreError ¶ added in v1.0.0
type StoreError interface { errors.CustomError GetErrorType() StoreErrorType }
type StoreErrorType ¶ added in v1.0.0
type StoreErrorType uint8
const ( UnexpectedStoreError StoreErrorType = iota AnyReducerForThisActionError EmptySelectorError AnyStateBySelectorError MultipleReducerForSelectorError MultipleReducerForActionsObjectError )
Source Files
¶
Click to show internal directories.
Click to hide internal directories.