Versions in this module Expand all Collapse all v1 v1.13.2 Feb 10, 2021 v1.13.1 Feb 9, 2021 Changes in this version + func GetCorrelationIDFromRequest(r *http.Request) string + type App struct + Config *config.Config + DB *gorm.DB + Name string + Router *mux.Router + func New(appName string, appConfigDefaults map[string]interface{}, ...) *App + func NewWithEnvValues(appName string, appConfigDefaults map[string]interface{}) *App + func (app *App) DispatchEvent(token string, corelationID string, topic string, payload interface{}) + func (app *App) GetConnectionString() string + func (app *App) Initialize(routeSpecifiers []RouteSpecifier) + func (app *App) Logger(module string) *zerolog.Logger + func (app *App) MigrateDB() + func (app *App) NewExecutionContext(uow *repository.UnitOfWork, token *security.JwtToken, correlationID string, ...) microappCtx.ExecutionContext + func (app *App) NewExecutionContextWithCustomToken(uow *repository.UnitOfWork, tenantID uuid.UUID, userID uuid.UUID, ...) microappCtx.ExecutionContext + func (app *App) NewExecutionContextWithSystemToken(uow *repository.UnitOfWork, correlationID string, action string) microappCtx.ExecutionContext + func (app *App) NewUnitOfWork(readOnly bool) *repository.UnitOfWork + func (app *App) Start() + func (app *App) StartSecure(securityCert string, securityKey string) + func (app *App) Stop() + type RouteSpecifier interface + RegisterRoutes func(router *mux.Router) + type TestApp struct + func NewTestApp(appName string, controllerRouteProvider func(*App) []RouteSpecifier, ...) *TestApp + func (testApp *TestApp) AddAssociations(entity interface{}, associationName string, associations ...interface{}) error + func (testApp *TestApp) AssertEqualWithFieldsToCheck(t *testing.T, expected interface{}, actual interface{}, fieldsToChk []string, ...) + func (testApp *TestApp) AssertEqualWithFieldsToIgnore(t *testing.T, expected interface{}, actual interface{}, ...) + func (testApp *TestApp) AssertErrorResponse(t *testing.T, response *httptest.ResponseRecorder, expectedErrorKey string, ...) + func (testApp *TestApp) AssertXTotalCount(t *testing.T, response *httptest.ResponseRecorder, expectedXTotalCount int) + func (testApp *TestApp) CallAPI(httpMethod string, apiURL string, token string, req interface{}) *httptest.ResponseRecorder + func (testApp *TestApp) Check(t *testing.T, name string, expected, actual interface{}, failNow bool) + func (testApp *TestApp) CheckResponseCode(t *testing.T, expected, actual int) + func (testApp *TestApp) ExecuteRequest(req *http.Request) *httptest.ResponseRecorder + func (testApp *TestApp) GetAdminToken(tenantID string, userID string, scope []string) string + func (testApp *TestApp) GetAll(out interface{}, preloads []string, whereClause string, ...) error + func (testApp *TestApp) GetByID(out interface{}, preloads []string, id string) error + func (testApp *TestApp) GetFullAdminToken(tenantID string, userID string, username string, name string, ...) string + func (testApp *TestApp) GetFullToken(tenantID string, userID string, username string, name string, ...) string + func (testApp *TestApp) GetStandardAdminToken(tenantID string, userID string, username string, name string, scope []string) string + func (testApp *TestApp) GetStandardToken(tenantID string, userID string, username string, name string, scope []string) string + func (testApp *TestApp) GetToken(tenantID string, userID string, scope []string) string + func (testApp *TestApp) Initialize() + func (testApp *TestApp) PrepareEmptyTables() + func (testApp *TestApp) SaveToDB(entity interface{}) error + func (testApp *TestApp) SetControllerRouteProviderAndInitialize(controllerRouteProvider func(*App) []RouteSpecifier) + func (testApp *TestApp) Stop()