Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial #71

Open
wants to merge 109 commits into
base: main
Choose a base branch
from

add badaas-orm tutorial docs

83f5e8a
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Open

Tutorial #71

add badaas-orm tutorial docs
83f5e8a
Select commit
Loading
Failed to load commit list.
GitHub Actions / Unit Tests Report succeeded Aug 29, 2023 in 0s

Unit Tests Report ✅

Tests passed successfully

✅ unit-tests.xml

110 tests were completed in 35s with 110 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
github.com/ditrit/badaas 6✅ 29ms
github.com/ditrit/badaas/configuration 33✅ 13ms
github.com/ditrit/badaas/controllers 4✅ 13ms
github.com/ditrit/badaas/httperrors 8✅ 5ms
github.com/ditrit/badaas/logger 3✅ 6ms
github.com/ditrit/badaas/mocks/configuration 0ms
github.com/ditrit/badaas/mocks/controllers 0ms
github.com/ditrit/badaas/mocks/httperrors 0ms
github.com/ditrit/badaas/mocks/orm/condition 0ms
github.com/ditrit/badaas/mocks/orm/logger 0ms
github.com/ditrit/badaas/mocks/orm/model 0ms
github.com/ditrit/badaas/mocks/orm/operator 0ms
github.com/ditrit/badaas/mocks/orm/query 0ms
github.com/ditrit/badaas/mocks/persistence/repository 0ms
github.com/ditrit/badaas/mocks/router/middlewares 0ms
github.com/ditrit/badaas/mocks/services/sessionservice 0ms
github.com/ditrit/badaas/mocks/services/userservice 0ms
github.com/ditrit/badaas/orm 4✅ 7ms
github.com/ditrit/badaas/orm/condition 0ms
github.com/ditrit/badaas/orm/dynamic 0ms
github.com/ditrit/badaas/orm/errors 0ms
github.com/ditrit/badaas/orm/logger 5✅ 4ms
github.com/ditrit/badaas/orm/logger/gormzap 5✅ 5ms
github.com/ditrit/badaas/orm/model 2✅ 5ms
github.com/ditrit/badaas/orm/mysql 0ms
github.com/ditrit/badaas/orm/operator 0ms
github.com/ditrit/badaas/orm/preload 0ms
github.com/ditrit/badaas/orm/psql 0ms
github.com/ditrit/badaas/orm/query 0ms
github.com/ditrit/badaas/orm/sql 0ms
github.com/ditrit/badaas/orm/sqlite 0ms
github.com/ditrit/badaas/orm/unsafe 0ms
github.com/ditrit/badaas/persistence 0ms
github.com/ditrit/badaas/persistence/database 0ms
github.com/ditrit/badaas/persistence/gormfx 0ms
github.com/ditrit/badaas/persistence/models 3✅ 407ms
github.com/ditrit/badaas/persistence/models/conditions 0ms
github.com/ditrit/badaas/persistence/models/dto 0ms
github.com/ditrit/badaas/persistence/repository 0ms
github.com/ditrit/badaas/router 2✅ 10ms
github.com/ditrit/badaas/router/middlewares 1✅ 10ms
github.com/ditrit/badaas/services 0ms
github.com/ditrit/badaas/services/auth/protocols/basicauth 2✅ 374ms
github.com/ditrit/badaas/services/sessionservice 18✅ 13ms
github.com/ditrit/badaas/services/userservice 6✅ 550ms
github.com/ditrit/badaas/utils 7✅ 4ms
github.com/ditrit/badaas/utils/validators 1✅ 9ms

✅ github.com/ditrit/badaas

✅ TestInvokeFunctionsWithProvidedValues
✅ TestAddModulesAreExecuted
✅ TestCreateSuperUser
✅ TestCreateSuperUser_UserExists
✅ TestCreateSuperUser_UserServiceError
✅ TestCreateServer

✅ github.com/ditrit/badaas/configuration

✅ TestInitCommandsInitializerSetsAllKeysWithoutError
✅ TestInitCommandsInitializerReturnsErrorWhenErrorOnKeySet
✅ TestDatabaseConfigurationNewDBConfig
✅ TestDatabaseConfigurationGetPort
✅ TestDatabaseConfigurationGetHost
✅ TestDatabaseConfigurationGetUsername
✅ TestDatabaseConfigurationGetPassword
✅ TestDatabaseConfigurationGetSSLMode
✅ TestDatabaseConfigurationGetDBName
✅ TestDatabaseConfigurationGetRetryTime
✅ TestDatabaseConfigurationGetRetry
✅ TestDatabaseConfigurationLog
✅ TestHTTPServerConfigurationNewHttpServerConfiguration
✅ TestHTTPServerConfigurationGetPort
✅ TestHTTPServerConfigurationGetHost
✅ TestHTTPServerConfigurationGetAddr
✅ TestHTTPServerConfigurationGetMaxTimeout
✅ TestHTTPServerConfigurationLog
✅ TestInitializationConfigurationInitializationConfiguration
✅ TestInitializationConfigurationGetInit
✅ TestInitializationConfigurationLog
✅ TestLoggerConfigurationNewLoggerConfiguration
✅ TestLoggerConfigurationLoggerGetMode
✅ TestLoggerConfigurationLoggerRequestTemplate
✅ TestLoggerConfigurationLog
✅ TestPaginationConfigurationNewPaginationConfiguration
✅ TestPaginationConfigurationGetMaxElemPerPage
✅ TestPaginationConfigurationLog
✅ TestSessionConfigurationNewSessionConfiguration
✅ TestSessionConfigurationGetSessionDuration
✅ TestSessionConfigurationGetPullInterval
✅ TestSessionConfigurationGetRollInterval
✅ TestSessionConfigurationLog

✅ github.com/ditrit/badaas/controllers

✅ Test_BasicLoginHandler_MalformedRequest
✅ Test_BasicLoginHandler_UserNotFound
✅ Test_BasicLoginHandler_LoginFailed
✅ Test_BasicLoginHandler_LoginSuccess

✅ github.com/ditrit/badaas/httperrors

✅ TestTojson
✅ TestLog
✅ TestError
✅ TestWrite
✅ TestLogger
✅ TestNewErrorNotFound
✅ TestNewInternalServerError
✅ TestNewUnauthorizedError

✅ github.com/ditrit/badaas/logger

✅ TestInitializeDevelopmentLogger
✅ TestInitializeProductionLogger
✅ TestInitializeProductionLoggerNoConf

✅ github.com/ditrit/badaas/orm

✅ TestCreatePostgreDSN
✅ TestCreateMySQLDSN
✅ TestCreateSQLiteDSN
✅ TestCreateSQLServerDSN

✅ github.com/ditrit/badaas/orm/logger

✅ TestTraceError
✅ TestTraceSlowQuery
✅ TestTraceQueryExec
✅ TestTraceSlowTransaction
✅ TestTraceTransactionExec

✅ github.com/ditrit/badaas/orm/logger/gormzap

✅ TestTraceError
✅ TestTraceSlowQuery
✅ TestTraceQueryExec
✅ TestTraceSlowTransaction
✅ TestTraceTransactionExec

✅ github.com/ditrit/badaas/orm/model

✅ TestParseCorrectUUID
✅ TestParseIncorrectUUID

✅ github.com/ditrit/badaas/persistence/models

✅ TestNewSession
✅ TestExpired
✅ TestCanBeRolled

✅ github.com/ditrit/badaas/router

✅ TestAddInfoRoutes
✅ TestAddLoginRoutes

✅ github.com/ditrit/badaas/router/middlewares

✅ TestMiddlewareLogger

✅ github.com/ditrit/badaas/services/auth/protocols/basicauth

✅ TestSaltAndHashPassword
✅ TestCheckUserPassword

✅ github.com/ditrit/badaas/services/sessionservice

✅ TestLogInUser
✅ TestLogInUserDbError
✅ TestIsValid
✅ TestIsValid_SessionNotFound
✅ TestLogOutUser
✅ TestLogOutUserDbError
✅ TestLogOutUser_SessionNotFound
✅ TestRollSession
✅ TestRollSession_Expired
✅ TestRollSession_falseUUID
✅ TestRollSession_sessionNotFound
✅ Test_pullFromDB
✅ Test_pullFromDB_repoError
✅ Test_removeExpired
✅ Test_removeExpired_RepositoryError
✅ Test_get
✅ TestSessionCtx
✅ TestSessionCtxPanic

✅ github.com/ditrit/badaas/services/userservice

✅ TestNewUserService
✅ TestNewUserServiceDatabaseError
✅ TestNewUserServiceEmailNotValid
✅ TestGetUser
✅ TestGetUserNoUserFound
✅ TestGetUserWrongPassword

✅ github.com/ditrit/badaas/utils

✅ TestIntToSecond
✅ TestFindFirst/#00
✅ TestFindFirst/#01
✅ TestFindFirst/#02
✅ TestFindFirst/#03
✅ TestFindFirst/#04
✅ TestFindFirst

✅ github.com/ditrit/badaas/utils/validators

✅ TestValidEmail