Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SwishHQ/spread
/ functions
Functions
548 in github.com/SwishHQ/spread
⨍
Functions
548
◇
Types & classes
106
↓ 34 callers
Function
NewBundleService
(appService AppService, versionService VersionService, environmentService EnvironmentService, bundleRepository
src/service/bundle_service.go:47
↓ 31 callers
Function
ErrorResponse
(c *fiber.Ctx, message string)
utils/response.go:22
↓ 21 callers
Function
SuccessResponse
(c *fiber.Ctx, data interface{})
utils/response.go:10
↓ 20 callers
Function
NewVersionService
(versionRepository repository.VersionRepository)
src/service/version_service.go:28
↓ 19 callers
Function
NewEnvironmentService
(appService AppService, environmentRepository repository.EnvironmentRepository)
src/service/environment_service.go:29
↓ 16 callers
Function
NewUserService
(userRepository repository.UserRepository)
src/service/user_service.go:28
↓ 15 callers
Function
NewAppService
(appRepository repository.AppRepository)
src/service/app_service.go:25
↓ 15 callers
Function
NewClientService
(appService AppService, environmentService EnvironmentService, bundleService BundleService, versionService Ver
src/service/client_service.go:27
↓ 12 callers
Function
GetEnv
(key, defaultValue string)
config/config.go:25
↓ 11 callers
Function
NewAuthKeyService
(authKeyRepository repository.AuthKeyRepository)
src/service/auth_key.service.go:21
↓ 10 callers
Function
BindAndValidate
BindAndValidate binds the request body to the struct and validates it how to use: err := BindAndValidate(c, &App{}) if err != nil { fmt.Println(er
utils/validator.go:38
↓ 8 callers
Method
Create
(user *types.CreateUserRequest)
src/service/user_service.go:18
↓ 8 callers
Method
GetById
(ctx context.Context, id primitive.ObjectID)
src/repository/app_repository.go:16
↓ 8 callers
Method
Rollback
(rollbackRequest *types.RollbackRequest)
src/service/bundle_service.go:25
↓ 8 callers
Function
UnauthorizedResponse
(c *fiber.Ctx, message string)
utils/response.go:29
↓ 7 callers
Method
GetEnvironmentByKey
(ctx context.Context, key string)
src/service/environment_service.go:19
↓ 7 callers
Function
ValidationErrorResponse
(c *fiber.Ctx, errors []string)
utils/response.go:36
↓ 6 callers
Method
CheckUpdate
(environmentKey string, appVersion string, bundleHash string)
src/service/client_service.go:15
↓ 6 callers
Method
CreateEnvironment
(environmentRequest *types.CreateEnvironmentRequest)
src/service/environment_service.go:17
↓ 6 callers
Method
GetBundleByLabelAndEnvironmentId
(label string, environmentId primitive.ObjectID)
src/service/bundle_service.go:28
↓ 5 callers
Method
Count
(ctx context.Context)
src/service/user_service.go:21
↓ 5 callers
Method
CreateApp
(ctx context.Context, appName string, os string)
src/service/app_service.go:15
↓ 5 callers
Method
CreateNewBundle
(createNewBundleRequest *types.CreateNewBundleRequest, createdBy string)
src/service/bundle_service.go:26
↓ 5 callers
Method
GetAppById
(ctx context.Context, id string)
src/service/app_service.go:18
↓ 5 callers
Method
GetUser
(id string)
src/service/user_service.go:20
↓ 5 callers
Method
GetVersionByEnvironmentIdAndAppVersion
(ctx context.Context, environmentId primitive.ObjectID, appVersion string)
src/service/version_service.go:17
↓ 5 callers
Method
GetVersionByEnvironmentIdAndVersionId
(ctx context.Context, versionId primitive.ObjectID, environmentId primitive.ObjectID)
src/service/version_service.go:18
↓ 5 callers
Method
Login
(user *types.LoginUserRequest)
src/service/user_service.go:19
↓ 5 callers
Method
UpdateVersionCurrentBundleIdByVersionId
(ctx context.Context, id primitive.ObjectID, currentBundleId primitive.ObjectID)
src/service/version_service.go:16
↓ 4 callers
Method
AddActive
(ctx context.Context, id primitive.ObjectID)
src/service/bundle_service.go:33
↓ 4 callers
Method
CreateAuthKey
(name string, username string)
src/service/auth_key.service.go:12
↓ 4 callers
Method
GetAppByName
(ctx context.Context, appName string)
src/service/app_service.go:16
↓ 4 callers
Method
GetByAuthKey
(key string)
src/service/auth_key.service.go:13
↓ 4 callers
Method
GetEnvironmentByAppIdAndEnvironmentId
(ctx context.Context, appId primitive.ObjectID, environmentId string)
src/service/environment_service.go:21
↓ 4 callers
Method
GetEnvironmentByAppIdAndName
(ctx context.Context, appId primitive.ObjectID, environmentName string)
src/service/environment_service.go:18
↓ 4 callers
Method
GetLatestVersionByEnvironmentId
(ctx context.Context, environmentId primitive.ObjectID)
src/service/version_service.go:19
↓ 4 callers
Method
Insert
(ctx context.Context, app *model.App)
src/repository/app_repository.go:13
↓ 4 callers
Method
ReportStatusDeploy
(reportStatusRequest *types.ReportStatusDeployRequest)
src/service/client_service.go:16
↓ 3 callers
Method
AddFailed
(ctx context.Context, id primitive.ObjectID)
src/service/bundle_service.go:34
↓ 3 callers
Method
AddInstalled
(ctx context.Context, id primitive.ObjectID)
src/service/bundle_service.go:35
↓ 3 callers
Method
CreateVersion
(ctx context.Context, version *model.Version)
src/service/version_service.go:15
↓ 3 callers
Method
DecrementActive
(ctx context.Context, id primitive.ObjectID)
src/service/bundle_service.go:36
↓ 3 callers
Function
FormatVersionStr
given a version string, return a number example: 1.2.3 -> 10203 how it works: 1. split the version string by "." 2. reverse the array 3. for each elem
utils/common.go:93
↓ 3 callers
Method
GetAllAuthKeys
(ctx context.Context)
src/service/auth_key.service.go:14
↓ 3 callers
Method
GetAllVersionsByEnvironmentId
(ctx context.Context, environmentId primitive.ObjectID)
src/service/version_service.go:20
↓ 3 callers
Method
GetBundleByHashAndVersionId
(hash string, versionId primitive.ObjectID)
src/service/bundle_service.go:29
↓ 3 callers
Method
GetBundleById
(id primitive.ObjectID)
src/service/bundle_service.go:27
↓ 3 callers
Method
GetBundlesByVersionId
(versionId primitive.ObjectID)
src/service/bundle_service.go:30
↓ 3 callers
Method
GetByVersionId
(ctx context.Context, versionId primitive.ObjectID)
src/service/version_service.go:21
↓ 3 callers
Method
ReportStatusDownload
(reportStatusRequest *types.ReportStatusDownloadRequest)
src/service/client_service.go:17
↓ 3 callers
Function
fetchEnvironments
()
web/src/views/dashboard/versions/VersionView.tsx:101
↓ 3 callers
Function
getFieldError
(field: string)
web/src/components/modal/AddAppModal.tsx:52
↓ 3 callers
Function
handleInputChange
(field: keyof SetupFormData)
web/src/views/setup/SetupView.tsx:30
↓ 2 callers
Method
CreateBundle
(ctx context.Context, bundle *model.Bundle)
src/repository/bundle_repository.go:15
↓ 2 callers
Method
GetAll
(ctx context.Context)
src/repository/app_repository.go:15
↓ 2 callers
Method
GetAllEnvironmentsByAppId
(ctx context.Context, appId primitive.ObjectID)
src/service/environment_service.go:20
↓ 2 callers
Method
GetApps
(ctx context.Context)
src/service/app_service.go:17
↓ 2 callers
Function
GetBaseBucketUrl
(env string)
utils/common.go:158
↓ 2 callers
Method
GetByAppIdAndName
(ctx context.Context, appId primitive.ObjectID, name string)
src/repository/environment_repository.go:17
↓ 2 callers
Method
GetByName
(ctx context.Context, name string)
src/repository/app_repository.go:14
↓ 2 callers
Method
GetByUsername
(ctx context.Context, username string)
src/repository/user_repository.go:15
↓ 2 callers
Method
ToggleActive
(bundleId primitive.ObjectID)
src/service/bundle_service.go:32
↓ 2 callers
Method
ToggleMandatory
(bundleId primitive.ObjectID)
src/service/bundle_service.go:31
↓ 2 callers
Function
copyToClipboard
(text: string, event: React.MouseEvent)
web/src/views/dashboard/versions/VersionView.tsx:237
↓ 2 callers
Function
fetchApps
()
web/src/api/hooks/useApps.ts:20
↓ 2 callers
Function
fetchAuthKeys
()
web/src/api/hooks/useAuthKeys.ts:9
↓ 2 callers
Function
formatErrorMessage
(message: string | string[])
web/src/api/client.ts:7
↓ 2 callers
Function
formatFileSize
(bytes: number)
web/src/views/dashboard/bundles/BundleView.tsx:262
↓ 2 callers
Function
handleDownload
(bundleId: string)
web/src/views/dashboard/bundles/BundleView.tsx:246
↓ 2 callers
Function
handleOsChange
(os: AppOS)
web/src/components/modal/AddAppModal.tsx:44
↓ 2 callers
Function
toggleBundleRequired
(bundleId: string)
web/src/views/dashboard/bundles/BundleView.tsx:212
↓ 2 callers
Function
toggleBundleStatus
(bundleId: string)
web/src/views/dashboard/bundles/BundleView.tsx:153
↓ 1 callers
Function
AuthKeyMiddleware
(c *fiber.Ctx, authKeyService service.AuthKeyService)
middleware/auth_key.go:10
↓ 1 callers
Function
AuthMiddleware
(c *fiber.Ctx, userService service.UserService)
middleware/auth.go:15
↓ 1 callers
Method
CheckUpdate
(c *fiber.Ctx)
src/controller/client_controller.go:13
↓ 1 callers
Method
CreateApp
(c *fiber.Ctx)
src/controller/app_controller.go:15
↓ 1 callers
Method
CreateAuthKey
(c *fiber.Ctx)
src/controller/auth_key.controller.go:12
↓ 1 callers
Method
CreateEnvironment
(c *fiber.Ctx)
src/controller/environment_controller.go:14
↓ 1 callers
Method
CreateNewBundle
(c *fiber.Ctx)
src/controller/bundle_controller.go:16
↓ 1 callers
Function
Execute
()
cmd/root.go:29
↓ 1 callers
Function
GenerateAuthKey
generate a random auth key how it works: 1. seed the random number generator 2. create a character array 3. create a byte array 4. for each element in
utils/common.go:26
↓ 1 callers
Method
GetAllAuthKeys
(c *fiber.Ctx)
src/controller/auth_key.controller.go:13
↓ 1 callers
Method
GetAllByAppId
(ctx context.Context, appId primitive.ObjectID)
src/repository/environment_repository.go:18
↓ 1 callers
Method
GetAllByEnvironmentId
(ctx context.Context, environmentId primitive.ObjectID)
src/repository/version_repository.go:20
↓ 1 callers
Method
GetAllByVersionId
(c *fiber.Ctx)
src/controller/bundle_controller.go:17
↓ 1 callers
Method
GetAllEnvironmentsByAppId
(c *fiber.Ctx)
src/controller/environment_controller.go:15
↓ 1 callers
Method
GetAppById
(c *fiber.Ctx)
src/controller/app_controller.go:17
↓ 1 callers
Method
GetApps
(c *fiber.Ctx)
src/controller/app_controller.go:16
↓ 1 callers
Method
GetBundleByHashAndVersionId
(hash string, versionId primitive.ObjectID)
src/service/bundle_service.go:306
↓ 1 callers
Method
GetByEnvironmentIdAndAppVersion
(ctx context.Context, deploymentId primitive.ObjectID, appVersion string)
src/repository/version_repository.go:16
↓ 1 callers
Method
GetByHashAndVersionId
(ctx context.Context, hash string, versionId primitive.ObjectID)
src/repository/bundle_repository.go:17
↓ 1 callers
Method
GetByIdAndAppId
(ctx context.Context, id primitive.ObjectID, appId primitive.ObjectID)
src/repository/environment_repository.go:19
↓ 1 callers
Method
GetByIdAndEnvironmentId
(ctx context.Context, id primitive.ObjectID, environmentId primitive.ObjectID)
src/repository/version_repository.go:22
↓ 1 callers
Method
GetByKey
(ctx context.Context, key string)
src/repository/environment_repository.go:16
↓ 1 callers
Method
GetByLabelAndEnvironmentId
(ctx context.Context, label string, environmentId primitive.ObjectID)
src/repository/bundle_repository.go:22
↓ 1 callers
Method
GetBySequenceIdEnvironmentIdAndVersionId
(ctx context.Context, sequenceId int64, environmentId primitive.ObjectID, versionId primitive.ObjectID)
src/repository/bundle_repository.go:21
↓ 1 callers
Method
GetByVersionId
(c *fiber.Ctx)
src/controller/version_controller.go:12
↓ 1 callers
Method
GetNextSeqByEnvironmentIdAndVersionId
(ctx context.Context, environmentId primitive.ObjectID, versionId primitive.ObjectID)
src/repository/bundle_repository.go:20
↓ 1 callers
Function
MongoConnection
ConnectDB initializes the database connection
pkg/db.go:14
↓ 1 callers
Function
NewAppController
(appService service.AppService)
src/controller/app_controller.go:24
next →
1–100 of 548, ranked by callers