MCPcopy Create free account

hub / github.com/akilans/golang-mini-projects / functions

Functions99 in github.com/akilans/golang-mini-projects

↓ 15 callersFunctionjsonMessageByte
response as json format
04-bookstore-api/main.go:29
↓ 13 callersFunctioncheck
check for any error
07-ssh-sftp-agent/main.go:16
↓ 12 callersFunctioncheckIfError
Common function to check any error
14_akit-ops/main.go:21
↓ 8 callersFunctionjsonMessageByte
response message struct as json format
11-jwt-golang/main.go:29
↓ 7 callersFunctioncheck
check for any error
02-organize-folder/main.go:11
↓ 7 callersFunctioncheck
check for any error
10-golang-ssh-concurrent-file-uploder/main.go:27
↓ 5 callersFunctioncheckError
(err error)
01-bookstore-cli-flag-json/books.go:11
↓ 5 callersFunctiongetBooks
Get books - returns books and error
04-bookstore-api/books.go:9
↓ 5 callersFunctionjsonMessageByte
response message struct as json format
rest-api-to-exec-shell/main.go:26
↓ 4 callersFunctiongetBooks
get all the books
01-bookstore-cli-flag-json/books.go:20
↓ 3 callersFunctiongetBookById
Get books - returns book, book index and error
04-bookstore-api/books.go:23
↓ 3 callersFunctionsaveBooks
save books to books.json file
04-bookstore-api/books.go:43
↓ 3 callersFunctiontriggerEmail
alert user by sending an email
03-web-monitor/main.go:115
↓ 2 callersFunctionIsBookExists
check book exits or not
12-fiber-book-rest/models/booksModel.go:71
↓ 2 callersMethodUploadFileToServer
Upload file to remote SSH server
10-golang-ssh-concurrent-file-uploder/main.go:68
↓ 2 callersFunctionalertUser
(web string, err error, webStatusSlice *[]webStatus)
03-web-monitor/main.go:82
↓ 2 callersFunctioncheckError
print logs in console
04-bookstore-api/main.go:36
↓ 2 callersFunctionhandleAddBook
add or update a book logic
01-bookstore-cli-flag-json/books.go:91
↓ 2 callersFunctionsaveBooks
save books to books.json file
01-bookstore-cli-flag-json/books.go:32
↓ 1 callersFunctionAuth
Middleware auth handler
11-jwt-golang/main.go:82
↓ 1 callersFunctionCreateJWT
Create JWT token Function to create JWT token
12-fiber-book-rest/controllers/usersController.go:181
↓ 1 callersFunctionCreateJWT
Function to create JWT token
11-jwt-golang/main.go:43
↓ 1 callersFunctionSyncDB
Migrate tables
12-fiber-book-rest/models/booksModel.go:92
↓ 1 callersFunctionValidateBookStruct
validate book payload
12-fiber-book-rest/controllers/booksController.go:23
↓ 1 callersFunctionValidateJWT
Function to validate JWT Get the token from user and validate it
11-jwt-golang/main.go:67
↓ 1 callersFunctionValidateLoginUserStruct
(user Login)
12-fiber-book-rest/controllers/usersController.go:43
↓ 1 callersFunctionValidateUserStruct
validate user payload
12-fiber-book-rest/controllers/usersController.go:28
↓ 1 callersFunctioncheckError
print logs in console
06-system-monitor/info.go:13
↓ 1 callersFunctioncheckForPreviousAlert
check for the web is in webstatus slice
03-web-monitor/main.go:133
↓ 1 callersFunctioncheckForReminderInterval
to when it trigger email last last time triggered email + reminder interval > current timem then return true then update time
03-web-monitor/main.go:156
↓ 1 callersFunctioncloneRepo
clone the provided repo
14_akit-ops/git.go:11
↓ 1 callersFunctioncreateDefaultFolders
function to create default folders such as Images, Music, Docs, Others, Videos
02-organize-folder/main.go:44
↓ 1 callersFunctioncreateUpdateDeployment
Create / Update deployment function
14_akit-ops/createUpdate.go:52
↓ 1 callersFunctioncreateUpdateService
Create / Update service function
14_akit-ops/createUpdate.go:15
↓ 1 callersFunctiondetectChanges
Detect any changes in the repo
14_akit-ops/git.go:21
↓ 1 callersFunctiongeneratePassword
(passwordLength int, minSpecialChar int, minUpperChar int, minNumberChar int)
05-random-password-flag/main.go:65
↓ 1 callersFunctiongeneratePassword
()
05-random-password/main.go:57
↓ 1 callersFunctiongetCpuInfo
get cpu info it returns cpuNumCores, cpuPercentage
06-system-monitor/info.go:46
↓ 1 callersFunctiongetHostInfo
get host info It returns hostName, architecture, operationSystem
06-system-monitor/info.go:35
↓ 1 callersFunctiongetMemInfo
Get memory info It returns total, free memory in MB and used memory percentage
06-system-monitor/info.go:22
↓ 1 callersFunctionhandleDeleteBook
(deleteCmd *flag.FlagSet, id *string)
01-bookstore-cli-flag-json/books.go:133
↓ 1 callersFunctionhandleGetBooks
get all the books logic
01-bookstore-cli-flag-json/books.go:46
↓ 1 callersFunctionlistDeployments
Function to list all the Deployments in the specific namespace
13-k8s-client-go/main.go:41
↓ 1 callersFunctionlistPods
Function to list all the pods in the specific namespace
13-k8s-client-go/main.go:22
↓ 1 callersFunctionorganizeFolder
function to Oraganize folders
02-organize-folder/main.go:56
↓ 1 callersMethodsshDemoWithPassword
SSH auth with Password
10-golang-ssh-concurrent-file-uploder/main.go:122
↓ 1 callersFunctionsshDemoWithPrivateKey
()
07-ssh-sftp-agent/main.go:118
↓ 1 callersMethodsshDemoWithPrivateKey
SSH auth with Private Key
10-golang-ssh-concurrent-file-uploder/main.go:138
FunctionAddBook
add a book
12-fiber-book-rest/models/booksModel.go:42
FunctionAddBookHandler
Add a new book function * Get new book inputs from user validate it Store in the DB */
12-fiber-book-rest/controllers/booksController.go:60
FunctionAddUser
add user
12-fiber-book-rest/models/usersModel.go:12
FunctionAddUserHandler
Add User Handler * Get email and password from user Validate email and password based on Login struct rules hash the password using bcrypt Store email
12-fiber-book-rest/controllers/usersController.go:65
FunctionCheckHashPassword
Compare password
12-fiber-book-rest/helpers/utils.go:21
FunctionConnectDB
Connect to DB
12-fiber-book-rest/initializers/db.go:14
FunctionDeleteBookByID
Delete a book by id
12-fiber-book-rest/models/booksModel.go:81
FunctionDeleteBookHandler
Delete books function * Validate provided book id in the URL If book doesn't exists send book not found message else delete a book */
12-fiber-book-rest/controllers/booksController.go:179
FunctionGenerateHashPassword
Generate Hash Password
12-fiber-book-rest/helpers/utils.go:15
FunctionGetBookByID
Get book details
12-fiber-book-rest/models/booksModel.go:62
FunctionGetBookHandler
Get book by id function * Validate provided book id in the URL Get book details from DB If no book returned send book not found message else give book
12-fiber-book-rest/controllers/booksController.go:97
FunctionGetBooks
add a book Get books
12-fiber-book-rest/models/booksModel.go:32
FunctionGetDB
Get DB connection
12-fiber-book-rest/initializers/db.go:29
FunctionGetUserByEmail
add user
12-fiber-book-rest/models/usersModel.go:22
FunctionHomeHandler
Handle home route
11-jwt-golang/main.go:130
FunctionJwtError
Custom error message for invalid JWT
12-fiber-book-rest/controllers/usersController.go:204
FunctionListBooksHandler
List books function
12-fiber-book-rest/controllers/booksController.go:39
FunctionLoadEnvs
Load ENV variables from .env file
12-fiber-book-rest/initializers/env.go:10
FunctionLogError
Log erros
12-fiber-book-rest/helpers/utils.go:10
FunctionLoginHandler
Login Handler * Get email and password from user Validate email and password based on Login struct rules get user details by provided email id if not
12-fiber-book-rest/controllers/usersController.go:132
FunctionLoginHandler
Handle login
11-jwt-golang/main.go:103
FunctionRoutes
Define all routes and handlers call
12-fiber-book-rest/routes/routes.go:12
FunctionSecureHandler
Handle secure route
11-jwt-golang/main.go:135
FunctionUpdateBook
Update a book
12-fiber-book-rest/models/booksModel.go:52
FunctionUpdateBookHandler
Update a book by id function * Validate provided book id in the URL Get book details from DB If no book returned send book not found message else upda
12-fiber-book-rest/controllers/booksController.go:129
FunctionexecuteShell
Allow only POST method Validate Payload - It should contain command and argument Parse the post data and execute the command in the payload
rest-api-to-exec-shell/main.go:36
FunctiongetSysInfo
(w http.ResponseWriter, r *http.Request)
06-system-monitor/main.go:40
FunctionhandleAddBook
add book handler
04-bookstore-api/main.go:109
FunctionhandleDeleteBookById
delete book by id handler
04-bookstore-api/main.go:192
FunctionhandleGetBookById
get book by id handler
04-bookstore-api/main.go:86
FunctionhandleGetBooks
List all the books handler
04-bookstore-api/main.go:70
FunctionhandleUpdateBook
update book handler
04-bookstore-api/main.go:144
Functioninit
Init function to connect to DB, get DB connection and migrate tables
12-fiber-book-rest/models/booksModel.go:23
Functionmain
()
03-web-monitor/main.go:47
Functionmain
()
08-file-folder-zip/main.go:22
Functionmain
()
01-bookstore-cli-flag-json/main.go:18
Functionmain
Main function
12-fiber-book-rest/main.go:13
Functionmain
()
05-random-password-flag/main.go:19
Functionmain
()
07-ssh-sftp-agent/main.go:38
Functionmain
()
09-pack-mod-demo/main.go:11
Functionmain
main function starts here
06-system-monitor/main.go:27
Functionmain
main function starts here
04-bookstore-api/main.go:44
Functionmain
()
14_akit-ops/main.go:27
Functionmain
Main function Start the server
rest-api-to-exec-shell/main.go:68
Functionmain
Main function
02-organize-folder/main.go:19
Functionmain
()
13-k8s-client-go/main.go:59
Functionmain
Main function
10-golang-ssh-concurrent-file-uploder/main.go:35
Functionmain
()
playground/main.go:5
Functionmain
()
05-random-password/main.go:24
Functionmain
()
11-jwt-golang/main.go:139
FunctionsshDemoWithPassword
()
07-ssh-sftp-agent/main.go:103