MCPcopy Create free account

hub / github.com/Done-0/gin-scaffold / functions

Functions229 in github.com/Done-0/gin-scaffold

↓ 34 callersMethodError
Error error string representation
internal/utils/errorx/internal/stack.go:35
↓ 25 callersMethodSelect
Select selects the next available provider context, non-blocking, skips rate-limited instances
internal/ai/internal/selector/selector.go:59
↓ 19 callersFunctionNew
New creates a new selector instance
internal/ai/internal/selector/selector.go:50
↓ 16 callersFunctionFail
Fail creates error response
internal/utils/vo/vo_utils.go:46
↓ 16 callersFunctionNew
New creates new error based on error code
internal/utils/errorx/error_utils.go:28
↓ 12 callersMethodClose
()
internal/queue/queue.go:18
↓ 12 callersMethodGetTemplate
(ctx context.Context, path string, vars *map[string]any)
internal/ai/internal/prompter/types.go:13
↓ 10 callersFunctionSuccess
Success successful response
internal/utils/vo/vo_utils.go:34
↓ 9 callersMethodCreateTemplate
(ctx context.Context, path string, tmpl *Template)
internal/ai/internal/prompter/types.go:16
↓ 8 callersFunctionRegister
Register registers predefined error code information
internal/utils/errorx/code/register.go:14
↓ 7 callersFunctionGetConfig
GetConfig gets configuration
configs/configs.go:191
↓ 7 callersFunctionKV
KV creates key-value parameter option
internal/utils/errorx/error_utils.go:23
↓ 5 callersFunctioncreateTestConfig
()
internal/ai/internal/selector/selector_test.go:15
↓ 4 callersMethodCode
()
internal/utils/errorx/internal/status.go:15
↓ 4 callersMethodDeleteTemplate
(ctx context.Context, path string)
internal/ai/internal/prompter/types.go:18
↓ 4 callersMethodListTemplates
(ctx context.Context, prefix string)
internal/ai/internal/prompter/types.go:15
↓ 4 callersMethodLogger
()
internal/logger/logger.go:15
↓ 3 callersMethodAs
As supports Go errors.As()
internal/utils/errorx/internal/status.go:93
↓ 3 callersMethodClose
()
internal/db/db.go:17
↓ 3 callersMethodDB
()
internal/db/db.go:15
↓ 3 callersMethodInitialize
()
internal/i18n/i18n.go:15
↓ 3 callersFunctionRegister
Register registers error code definition
internal/utils/errorx/error_utils.go:33
↓ 3 callersMethodSelectWithWait
SelectWithWait selects the next provider context, blocking wait, aligns with Go's rateLimiter.Wait
internal/ai/internal/selector/selector.go:159
↓ 3 callersFunctionT
T translates a message key with template parameters
internal/utils/i18n/i18n_utils.go:14
↓ 3 callersFunctionsetupTestContext
()
internal/utils/vo/vo_utils_test.go:25
↓ 3 callersFunctionstack
stack gets current call stack information
internal/utils/errorx/internal/stack.go:40
↓ 2 callersMethodChatStream
(ctx context.Context, req *types.ChatRequest)
internal/ai/internal/provider/provider.go:15
↓ 2 callersFunctionNew
New initializes configuration - ENV=prod uses production configuration
configs/configs.go:160
↓ 2 callersFunctionNew
New creates a new Gemini provider instance from context
internal/ai/internal/provider/gemini/gemini.go:25
↓ 2 callersFunctionNew
New creates a new DeepSeek provider instance from context
internal/ai/internal/provider/deepseek/deepseek.go:29
↓ 2 callersFunctionNew
New creates a new OpenAI provider instance from context
internal/ai/internal/provider/openai/openai.go:32
↓ 2 callersFunctionNew
()
internal/ai/internal/prompter/prompter.go:20
↓ 2 callersMethodReset
Reset resets all counters and limiters
internal/ai/internal/selector/selector.go:250
↓ 2 callersFunctionSaveJSONFile
SaveJSONFile saves data to a JSON file with proper formatting
internal/utils/file/json_utils.go:29
↓ 2 callersMethodScan
Scan implements sql.Scanner interface
internal/model/base/base.go:30
↓ 2 callersMethodStreamToClient
(c *gin.Context, events <-chan *Event)
internal/sse/sse.go:16
↓ 2 callersFunctionValidate
Validate parameter validator
internal/utils/validator/validator_utils.go:20
↓ 2 callersMethodconnectToDB
connectToDB establishes a connection to the specified database
internal/db/internal/connection.go:19
↓ 2 callersMethodensureSQLiteDBExists
ensureSQLiteDBExists ensures SQLite database exists, creates if it doesn't exist
internal/db/internal/setup.go:86
↓ 2 callersFunctiongetStatusByCode
getStatusByCode gets status error based on error code
internal/utils/errorx/internal/status.go:192
↓ 1 callersMethodChat
(ctx context.Context, req *types.ChatRequest)
internal/ai/internal/provider/provider.go:14
↓ 1 callersMethodClient
()
internal/redis/redis.go:15
↓ 1 callersMethodClose
()
internal/logger/logger.go:17
↓ 1 callersMethodClose
()
internal/redis/redis.go:17
↓ 1 callersFunctionGenerateID
GenerateID generates snowflake algorithm ID
internal/utils/snowflake/snowflake_utils.go:20
↓ 1 callersFunctionGetAllModels
GetAllModels gets and registers all models for database migration
internal/model/get_all_models.go:11
↓ 1 callersMethodGetTemplate
(ctx context.Context, path string, vars *map[string]any)
internal/ai/internal/prompter/prompter.go:24
↓ 1 callersMethodHandle
(ctx context.Context, msg *sarama.ConsumerMessage)
internal/queue/internal/consumer.go:17
↓ 1 callersFunctionLoadJSONFile
LoadJSONFile loads and validates a JSON file
internal/utils/file/json_utils.go:15
↓ 1 callersMethodMsg
Get error code
internal/utils/errorx/error_utils.go:14
↓ 1 callersFunctionNew
New registers application routes
pkg/router/router.go:14
↓ 1 callersFunctionNew
New registers all middleware to the Gin engine
internal/middleware/middleware.go:15
↓ 1 callersFunctionNew
New creates a Gin middleware for CORS management
internal/middleware/cors/cors.go:16
↓ 1 callersFunctionNew
New creates a new logger manager instance
internal/logger/logger.go:21
↓ 1 callersFunctionNew
New creates a new i18n manager instance
internal/i18n/i18n.go:20
↓ 1 callersFunctionNew
New creates a new AI manager instance
internal/ai/ai.go:27
↓ 1 callersFunctionNew
New creates a new AI manager
internal/ai/internal/manager.go:28
↓ 1 callersFunctionNew
New creates a new Redis manager instance
internal/redis/redis.go:21
↓ 1 callersFunctionNew
New creates SSE manager
internal/sse/sse.go:25
↓ 1 callersFunctionNew
New creates a new database manager instance
internal/db/db.go:21
↓ 1 callersFunctionNewByCode
NewByCode creates new error based on error code
internal/utils/errorx/internal/status.go:151
↓ 1 callersFunctionNewConsumer
NewConsumer creates a new Kafka consumer instance
internal/queue/internal/consumer.go:29
↓ 1 callersFunctionNewContainer
Injectors from wire.go: NewContainer initializes the complete application container using Wire
pkg/wire/wire_gen.go:24
↓ 1 callersFunctionNewManager
NewManager creates a new logger manager instance
internal/logger/internal/manager.go:30
↓ 1 callersFunctionNewManager
NewManager creates a new i18n manager instance
internal/i18n/internal/manager.go:26
↓ 1 callersFunctionNewManager
NewManager creates a new Redis manager instance
internal/redis/internal/manager.go:25
↓ 1 callersFunctionNewManager
(*configs.Config)
internal/sse/internal/manager.go:17
↓ 1 callersFunctionNewManager
NewManager creates a new database manager instance
internal/db/internal/manager.go:29
↓ 1 callersFunctionNewProducer
NewProducer creates a new Kafka producer instance
internal/queue/internal/producer.go:21
↓ 1 callersFunctionNewTestController
NewTestController creates test controller
pkg/serve/controller/test_controller.go:27
↓ 1 callersFunctionNewTestService
NewTestService creates test service implementation
pkg/serve/service/impl/test_service_impl.go:33
↓ 1 callersFunctionParam
Param creates parameter replacement option
internal/utils/errorx/internal/status.go:124
↓ 1 callersMethodParams
Get extra information
internal/utils/errorx/error_utils.go:16
↓ 1 callersFunctionRegister
Register registers error code definition
internal/utils/errorx/internal/register.go:24
↓ 1 callersFunctionRegisterTestRoutes
RegisterTestRoutes registers test module routes
pkg/router/routes/test_routes.go:13
↓ 1 callersFunctionReplace
Replace parses and executes a Go template with the given variables and custom functions.
internal/utils/template/template_utils.go:20
↓ 1 callersFunctionStart
Start starts the HTTP server with graceful shutdown handling
cmd/gin_server.go:25
↓ 1 callersMethodTestError
(c *gin.Context)
pkg/serve/service/test_service.go:21
↓ 1 callersMethodTestHello
(c *gin.Context)
pkg/serve/service/test_service.go:17
↓ 1 callersMethodTestI18n
(c *gin.Context)
pkg/serve/service/test_service.go:23
↓ 1 callersMethodTestLogger
(c *gin.Context)
pkg/serve/service/test_service.go:18
↓ 1 callersMethodTestLong
(c *gin.Context, req *dto.TestLongRequest)
pkg/serve/service/test_service.go:22
↓ 1 callersMethodTestPing
(c *gin.Context)
pkg/serve/service/test_service.go:16
↓ 1 callersMethodTestRedis
(c *gin.Context, req *dto.TestRedisRequest)
pkg/serve/service/test_service.go:19
↓ 1 callersMethodTestStream
(c *gin.Context, req *dto.TestStreamRequest)
pkg/serve/service/test_service.go:24
↓ 1 callersMethodTestSuccess
(c *gin.Context)
pkg/serve/service/test_service.go:20
↓ 1 callersMethodUpdateTemplate
(ctx context.Context, path string, tmpl *Template)
internal/ai/internal/prompter/types.go:17
↓ 1 callersMethodValue
Value implements driver.Valuer interface
internal/model/base/base.go:43
↓ 1 callersFunctioncompareStructs
compareStructs compares structs and collects changes
configs/configs.go:233
↓ 1 callersMethodensureDBExists
ensureDBExists ensures the database exists, creates it if it doesn't exist
internal/db/internal/setup.go:72
↓ 1 callersMethodensureMySQLDBExists
ensureMySQLDBExists ensures MySQL database exists, creates if it doesn't exist
internal/db/internal/setup.go:126
↓ 1 callersMethodensurePostgresDBExists
ensurePostgresDBExists ensures PostgreSQL database exists, creates if it doesn't exist
internal/db/internal/setup.go:107
↓ 1 callersMethodgetDialector
getDialector returns the appropriate database dialector based on configuration
internal/db/internal/connection.go:44
↓ 1 callersMethodgetMySQLDialector
getMySQLDialector returns MySQL dialector
internal/db/internal/connection.go:77
↓ 1 callersMethodgetPostgresDialector
getPostgresDialector returns PostgreSQL dialector
internal/db/internal/connection.go:68
↓ 1 callersMethodgetSQLiteDialector
getSQLiteDialector returns SQLite dialector and ensures directory exists
internal/db/internal/connection.go:58
↓ 1 callersMethodgetSystemDBName
getSystemDBName returns the system database name for the current dialect
internal/db/internal/setup.go:60
↓ 1 callersMethodmigrate
migrate performs database auto migration
internal/db/internal/migration.go:14
↓ 1 callersFunctionmonitorConfigChanges
monitorConfigChanges monitors configuration changes
configs/configs.go:204
↓ 1 callersMethodsetupDatabase
setupDatabase handles database initialization based on dialect
internal/db/internal/setup.go:16
next →1–100 of 229, ranked by callers