Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/dzungtran/echo-rest-api
/ functions
Functions
302 in github.com/dzungtran/echo-rest-api
⨍
Functions
302
◇
Types & classes
81
↓ 46 callers
Function
Log
()
pkg/logger/zap.go:76
↓ 28 callers
Method
Error
(args ...interface{})
pkg/logger/zap.go:39
↓ 17 callers
Method
Errorf
(template string, args ...interface{})
pkg/logger/zap.go:37
↓ 15 callers
Function
Wrap
(fn EchoHandlerFunc)
pkg/wrapper/wrap.go:44
↓ 14 callers
Function
NewError
NewError creates a new error response
pkg/utils/errors.go:25
↓ 11 callers
Function
Translate
Translate response
pkg/wrapper/wrap.go:53
↓ 10 callers
Method
DBX
()
infrastructure/datastore/sql.go:23
↓ 9 callers
Function
IsSliceContains
(itemSlice []T, searchItem T)
pkg/utils/generics.go:7
↓ 8 callers
Method
Auth
()
pkg/middlewares/middleware.go:53
↓ 8 callers
Function
CueValidateObject
Becareful with json ommitempty options. Prefer use CueValidateJson for raw payload before marshal to struct
pkg/utils/cue.go:106
↓ 8 callers
Method
Fatalf
(template string, args ...interface{})
pkg/logger/zap.go:45
↓ 8 callers
Method
GetByID
(ctx context.Context, id int64)
modules/core/usecases/org.go:22
↓ 6 callers
Function
IsDuplicatedError
(err error)
pkg/utils/errors.go:88
↓ 6 callers
Function
isRuneInRange
(chr rune, fromRune rune, toRune rune)
pkg/utils/strings.go:149
↓ 5 callers
Function
CheckPoliciesContext
(c echo.Context, callOpts ...CallOPAInputOption)
pkg/authz/opa.go:258
↓ 5 callers
Method
Fatal
(args ...interface{})
pkg/logger/zap.go:47
↓ 5 callers
Function
GetUserFromContext
(c echo.Context)
pkg/contexts/utils.go:10
↓ 5 callers
Function
NewNotFoundError
NewNotFoundError creates a new error response representing a resource-not-found error (HTTP 404)
pkg/utils/errors.go:76
↓ 4 callers
Method
Delete
(ctx context.Context, id int64)
modules/core/usecases/org.go:25
↓ 4 callers
Method
Errorw
(msg string, keysAndValues ...interface{})
pkg/logger/zap.go:38
↓ 4 callers
Method
Fatalw
(msg string, keysAndValues ...interface{})
pkg/logger/zap.go:46
↓ 4 callers
Method
Fetch
(ctx context.Context, req dto.SearchOrgsReq)
modules/core/usecases/org.go:23
↓ 4 callers
Method
GetByID
(ctx context.Context, id int64)
modules/core/usecases/user.go:18
↓ 4 callers
Method
GetByID
(ctx context.Context, id int64)
modules/projects/usecases/project.go:18
↓ 4 callers
Function
GetHttpStatusCodeByErrorType
(err error, defaultCode int)
pkg/utils/errors.go:97
↓ 4 callers
Method
Info
(args ...interface{})
pkg/logger/zap.go:27
↓ 4 callers
Function
WithInputExtraData
(key string, data interface{})
pkg/authz/opa.go:181
↓ 3 callers
Function
CheckPolicies
(user *domains.UserWithRoles, callOpts ...CallOPAInputOption)
pkg/authz/opa.go:200
↓ 3 callers
Method
CheckPolicies
()
pkg/middlewares/middleware.go:89
↓ 3 callers
Method
Close
()
pkg/sql-tools/builder.go:14
↓ 3 callers
Method
Created
(payload EventPayload)
pkg/hook/subscriber.go:4
↓ 3 callers
Method
Debugw
(msg string, keysAndValues ...interface{})
pkg/logger/zap.go:30
↓ 3 callers
Method
Deleted
(payload EventPayload)
pkg/hook/subscriber.go:6
↓ 3 callers
Function
GetResourceIdFromParam
(c echo.Context, paramName string)
pkg/utils/request.go:19
↓ 3 callers
Function
IsCueError
(err error)
pkg/utils/errors.go:83
↓ 3 callers
Function
ToScreamingDelimited
ToScreamingDelimited Converts a string to SCREAMING.DELIMITED.SNAKE.CASE (in this case `del = '.'; screaming = true`) or delimited.snake.case (in this
pkg/utils/strings.go:107
↓ 3 callers
Method
Updated
(payload EventPayload)
pkg/hook/subscriber.go:5
↓ 3 callers
Function
WithInputRequestEndpoint
(reqEndpoint string)
pkg/authz/opa.go:170
↓ 3 callers
Function
WithInputRequestMethod
(reqMethod string)
pkg/authz/opa.go:159
↓ 3 callers
Function
addWordBoundariesToNumbers
(s string)
pkg/utils/strings.go:241
↓ 3 callers
Function
readRegoFiles
(dfs embed.FS, folderName string, filesContent map[string]string)
pkg/authz/opa.go:108
↓ 2 callers
Function
BuildDIContainer
( mdbi *datastore.MasterDbInstance, sdbi *datastore.SlaveDbInstance, conf *config.AppConfig, )
cmd/api/di/di.go:18
↓ 2 callers
Method
CheckPoliciesWithRequestPayload
NOTES: everywhen we call this function, we should pass a new instance of payloadInst to avoid race condition
pkg/middlewares/middleware.go:174
↓ 2 callers
Method
Create
(ctx context.Context, request dto.CreateUserReq)
modules/core/usecases/user.go:17
↓ 2 callers
Method
Create
(ctx context.Context, request dto.CreateProjectReq)
modules/projects/usecases/project.go:17
↓ 2 callers
Method
CreateWithTx
(ctx context.Context, tx *sqlx.Tx, org *domains.Org)
modules/core/repositories/org.go:24
↓ 2 callers
Method
DBX
()
infrastructure/datastore/sql.go:15
↓ 2 callers
Method
Debugf
(template string, args ...interface{})
pkg/logger/zap.go:29
↓ 2 callers
Method
Delete
(ctx context.Context, id int64)
modules/projects/usecases/project.go:21
↓ 2 callers
Method
DeleteById
(ctx context.Context, id int64)
modules/core/repositories/org.go:28
↓ 2 callers
Method
Fetch
(ctx context.Context, req dto.SearchProjectsReq)
modules/projects/usecases/project.go:19
↓ 2 callers
Function
GenerateLongUUID
()
pkg/utils/uuid.go:12
↓ 2 callers
Method
GetByCode
(ctx context.Context, code string)
modules/core/usecases/user.go:22
↓ 2 callers
Method
GetByEmail
(ctx context.Context, email string)
modules/core/usecases/user.go:23
↓ 2 callers
Method
Infof
(template string, args ...interface{})
pkg/logger/zap.go:25
↓ 2 callers
Function
NewMasterDbInstance
(databaseURL string)
infrastructure/datastore/sql.go:27
↓ 2 callers
Function
NewSqlXInstance
NewDatabase will create new database instance
infrastructure/datastore/sql.go:40
↓ 2 callers
Method
Register
(ctx context.Context, request dto.CreateUserReq)
modules/core/usecases/user.go:24
↓ 2 callers
Function
RegisterModules
(e *echo.Echo, container *dig.Container)
cmd/api/di/di.go:38
↓ 2 callers
Method
Render
(w io.Writer, name string, data interface{}, c echo.Context)
cmd/api/main.go:27
↓ 2 callers
Function
RequireResourceIdInParam
(paramName string)
pkg/middlewares/functions.go:12
↓ 2 callers
Function
StringSlice
StringSlice -- slice string by separate
pkg/utils/strings.go:69
↓ 2 callers
Function
ToDelimited
ToDelimited Converts a string to delimited.snake.case (in this case `del = '.'`)
pkg/utils/strings.go:102
↓ 2 callers
Function
ToKebab
ToKebab Converts a string to kebab-case
pkg/utils/strings.go:92
↓ 2 callers
Function
ToSnake
ToSnake Converts a string to snake_case
pkg/utils/strings.go:82
↓ 2 callers
Method
Update
(ctx context.Context, id int64, request dto.UpdateOrgReq)
modules/core/usecases/org.go:24
↓ 2 callers
Method
Update
(ctx context.Context, org *domains.Org, fieldsToUpdate []string)
modules/core/repositories/org.go:27
↓ 2 callers
Method
Update
(ctx context.Context, id int64, request dto.UpdateProjectReq)
modules/projects/usecases/project.go:20
↓ 2 callers
Method
Validate
(i interface{})
config/app.go:43
↓ 2 callers
Function
WithInputOrg
(org *domains.Org)
pkg/authz/opa.go:192
↓ 2 callers
Function
appliedFieldSelectOption
(callOptions []CallOptionMapValues)
pkg/sql-tools/query_builder.go:195
↓ 2 callers
Method
fetchUserFromAuth
(ctx context.Context, code, email string)
pkg/middlewares/middleware.go:211
↓ 2 callers
Function
getKeyFromTag
getKeyFromTag -- get db key from struct db tag
pkg/sql-tools/query_builder.go:208
↓ 2 callers
Function
toCamelInitCase
Converts a string to CamelCase
pkg/utils/strings.go:166
↓ 1 callers
Method
CheckPoliciesWithOrg
()
pkg/middlewares/middleware.go:107
↓ 1 callers
Method
CheckPoliciesWithProject
()
pkg/middlewares/middleware.go:140
↓ 1 callers
Method
Create
(ctx context.Context, request dto.CreateOrgReq)
modules/core/usecases/org.go:21
↓ 1 callers
Method
Create
(ctx context.Context, req dto.CreateUserReq)
modules/core/usecases/user.go:40
↓ 1 callers
Function
CueValidateJson
CueValidateJson - Simple func to validate json by cue definitions Parameters: - schemaName: Main cue schema name to eval - cueDef: Cue document, conta
pkg/utils/cue.go:70
↓ 1 callers
Method
DeleteById
(ctx context.Context, id int64)
modules/projects/repositories/project.go:27
↓ 1 callers
Function
Execute
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the r
tools/mod/cmd/root.go:21
↓ 1 callers
Method
Fetch
(ctx context.Context, req dto.SearchUsersReq)
modules/core/usecases/user.go:19
↓ 1 callers
Method
FireBaseAuth
(next echo.HandlerFunc)
pkg/middlewares/firebase_auth.go:14
↓ 1 callers
Function
GetCoreTemplates
()
cmd/api/di/di.go:77
↓ 1 callers
Function
GetEchoLogConfig
(appConf *AppConfig)
config/echo.go:9
↓ 1 callers
Function
GetFunctionName
(i interface{})
pkg/utils/fault_tolerance.go:11
↓ 1 callers
Function
GetOrgFromContext
(c echo.Context)
pkg/contexts/utils.go:19
↓ 1 callers
Method
GetOrgIds
()
modules/core/domains/user_org.go:32
↓ 1 callers
Function
GetProjectFromContext
(c echo.Context)
pkg/contexts/utils.go:27
↓ 1 callers
Method
Init
()
pkg/sql-tools/transaction.go:18
↓ 1 callers
Function
InitAppConfig
()
config/app.go:50
↓ 1 callers
Function
InitWithOptions
(cnf ...CallLogOption)
pkg/logger/zap.go:111
↓ 1 callers
Method
Invite
(ctx context.Context, id int64, request dto.InviteUsers)
modules/core/usecases/org.go:26
↓ 1 callers
Function
IsStringContainsAnyKeywords
(s string, keywords []string)
pkg/utils/strings.go:46
↓ 1 callers
Function
IsStringSliceCaseInsensitiveContains
IsStringSliceCaseInsensitiveContains -- check slice contain string
pkg/utils/strings.go:37
↓ 1 callers
Function
LcFirst
LcFirst Lower case first char
pkg/utils/strings.go:160
↓ 1 callers
Function
NewAuthHandler
(g *echo.Group, middManager *middlewares.MiddlewareManager, userUsecase usecases.UserUsecase, appCfgs *config.
modules/core/handlers/auth.go:17
↓ 1 callers
Function
NewOrgHandler
NewOrgHandler will initialize the org resources endpoint
modules/core/handlers/org.go:25
↓ 1 callers
Function
NewProjectHandler
NewProjectHandler will initialize the project resources endpoint
modules/projects/handlers/project.go:24
↓ 1 callers
Function
NewSlaveDbInstance
(databaseURL string)
infrastructure/datastore/sql.go:33
next →
1–100 of 302, ranked by callers