Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dhax/go-base
/ functions
Functions
190 in github.com/dhax/go-base
⨍
Functions
190
◇
Types & classes
53
↓ 1 callers
Function
logMessage
(m Message)
email/mockMailer.go:11
↓ 1 callers
Function
newAccountListResponse
(a *[]pwdless.Account, count int)
api/admin/accounts.go:95
↓ 1 callers
Method
parse
parse parses the corrsponding template and content
email/mailer.go:36
↓ 1 callers
Function
parseTemplates
()
email/mailer.go:74
↓ 1 callers
Method
purgeExpired
()
auth/pwdless/logintoken.go:82
↓ 1 callers
Function
randStringBytes
(n int)
auth/pwdless/logintoken.go:92
↓ 1 callers
Method
router
()
api/admin/accounts.go:43
Function
AuthenticateRefreshJWT
AuthenticateRefreshJWT checks validity of refresh tokens and is only used for access token refresh and logout requests. It responds with 401 Unauthori
auth/jwt/authenticator.go:66
Function
Authenticator
Authenticator is a default authentication middleware to enforce access from the Verifier middleware request context values. The Authenticator sends a
auth/jwt/authenticator.go:35
Method
BeforeDelete
BeforeDelete hook executed before database delete operation.
auth/pwdless/account.go:46
Method
BeforeInsert
BeforeInsert hook executed before database insert operation.
auth/pwdless/account.go:30
Method
BeforeInsert
BeforeInsert hook executed before database insert operation.
auth/jwt/token.go:23
Method
BeforeInsert
BeforeInsert hook executed before database insert operation.
models/profile.go:22
Method
BeforeUpdate
BeforeUpdate hook executed before database update operation.
auth/pwdless/account.go:40
Method
BeforeUpdate
BeforeUpdate hook executed before database update operation.
auth/jwt/token.go:33
Method
BeforeUpdate
BeforeUpdate hook executed before database update operation.
models/profile.go:28
Method
Bind
(r *http.Request)
auth/pwdless/api.go:151
Method
Bind
(r *http.Request)
api/app/account.go:81
Method
Create
Create creates a new account.
database/admAccountStore.go:96
Method
CreateOrUpdateToken
CreateOrUpdateToken creates or updates an existing refresh token.
database/authStore.go:66
Method
CreateOrUpdateToken
CreateOrUpdateToken mock creates or updates a refresh token.
auth/pwdless/mockAuthStore.go:54
Method
Delete
Delete account.
database/admAccountStore.go:154
Method
Delete
Delete an account.
database/accountStore.go:47
Method
Delete
(*pwdless.Account)
api/app/account.go:27
Method
DeleteToken
DeleteToken deletes a refresh token.
database/authStore.go:81
Method
DeleteToken
DeleteToken deletes a jwt refresh token.
database/accountStore.go:88
Method
DeleteToken
DeleteToken mock deletes a refresh token.
auth/pwdless/mockAuthStore.go:60
Method
Get
Get gets an profile by account ID.
database/profileStore.go:24
Method
Get
Get account by ID.
database/admAccountStore.go:135
Method
Get
Get an account by ID.
database/accountStore.go:26
Method
Get
(id int)
api/app/account.go:25
Method
GetAccount
GetAccount returns an account by ID.
database/authStore.go:25
Method
GetAccount
GetAccount mock returns an account by ID.
auth/pwdless/mockAuthStore.go:30
Method
GetAccountByEmail
GetAccountByEmail returns an account by email.
database/authStore.go:35
Method
GetAccountByEmail
GetAccountByEmail mock returns an account by email.
auth/pwdless/mockAuthStore.go:36
Method
GetToken
GetToken returns refresh token by token identifier.
database/authStore.go:56
Method
GetToken
GetToken mock returns an account and refresh token by token identifier.
auth/pwdless/mockAuthStore.go:48
Method
List
List applies a filter and returns paginated array of matching results and total count.
database/admAccountStore.go:83
Function
LogEntrySetField
LogEntrySetField adds a field to the request scoped logrus.FieldLogger.
logging/logger.go:119
Function
LogEntrySetFields
LogEntrySetFields adds multiple fields to the request scoped logrus.FieldLogger.
logging/logger.go:126
Method
NewLogEntry
NewLogEntry sets default request log fields.
logging/logger.go:54
Method
Panic
Panic prints stack trace
logging/logger.go:102
Method
PurgeExpiredToken
PurgeExpiredToken deletes expired refresh token.
database/authStore.go:90
Method
PurgeExpiredToken
PurgeExpiredToken mock deletes expired refresh token.
auth/pwdless/mockAuthStore.go:66
Method
Router
Router provides admin application routes.
api/admin/api.go:44
Method
Send
(m Message)
email/mockMailer.go:25
Method
Send
Send sends the mail via smtp.
email/smtp.go:50
Function
TestAuthResource_login
(t *testing.T)
auth/pwdless/api_test.go:57
Function
TestAuthResource_logout
(t *testing.T)
auth/pwdless/api_test.go:278
Function
TestAuthResource_refresh
(t *testing.T)
auth/pwdless/api_test.go:185
Function
TestAuthResource_token
(t *testing.T)
auth/pwdless/api_test.go:115
Function
TestMain
(m *testing.M)
auth/pwdless/api_test.go:31
Method
Update
Update updates profile.
database/profileStore.go:41
Method
Update
Update account.
database/admAccountStore.go:145
Method
Update
Update an account.
database/accountStore.go:37
Method
Update
(*pwdless.Account)
api/app/account.go:26
Method
UpdateAccount
UpdateAccount upates account data related to pwdlessentication.
database/authStore.go:46
Method
UpdateAccount
UpdateAccount mock upates account data related to authentication.
auth/pwdless/mockAuthStore.go:42
Method
UpdateToken
UpdateToken updates a jwt refresh token.
database/accountStore.go:78
Method
accountCtx
(next http.Handler)
api/app/account.go:57
Method
accountCtx
(next http.Handler)
api/admin/accounts.go:56
Method
create
(w http.ResponseWriter, r *http.Request)
api/admin/accounts.go:117
Method
delete
(w http.ResponseWriter, r *http.Request)
api/app/account.go:122
Method
delete
(w http.ResponseWriter, r *http.Request)
api/admin/accounts.go:162
Method
deleteToken
(w http.ResponseWriter, r *http.Request)
api/app/account.go:167
Function
formatAsDate
(t time.Time)
email/mailer.go:90
Function
formatAsDuration
(t time.Time)
email/mailer.go:95
Method
get
(w http.ResponseWriter, r *http.Request)
api/app/account.go:96
Method
get
(w http.ResponseWriter, r *http.Request)
api/app/profile.go:79
Method
get
(w http.ResponseWriter, r *http.Request)
api/admin/accounts.go:136
Function
init
()
database/migrations/1_initial.go:36
Function
init
()
database/migrations/3_add_profile_table.go:24
Function
init
()
database/migrations/main.go:18
Function
init
()
cmd/gendoc.go:34
Function
init
()
cmd/migrate.go:19
Function
init
()
cmd/root.go:32
Function
init
()
cmd/serve.go:25
Function
initConfig
initConfig reads in config file and ENV variables if set.
cmd/root.go:48
Method
list
(w http.ResponseWriter, r *http.Request)
api/admin/accounts.go:103
Method
login
(w http.ResponseWriter, r *http.Request)
auth/pwdless/api.go:100
Method
logout
(w http.ResponseWriter, r *http.Request)
auth/pwdless/api.go:279
Function
main
()
main.go:5
Method
profileCtx
(next http.Handler)
api/app/profile.go:46
Method
refresh
(w http.ResponseWriter, r *http.Request)
auth/pwdless/api.go:223
Method
router
()
api/app/profile.go:38
Method
token
(w http.ResponseWriter, r *http.Request)
auth/pwdless/api.go:159
Method
update
(w http.ResponseWriter, r *http.Request)
api/app/account.go:101
Method
update
(w http.ResponseWriter, r *http.Request)
api/app/profile.go:84
Method
update
(w http.ResponseWriter, r *http.Request)
api/admin/accounts.go:141
Method
updateToken
(w http.ResponseWriter, r *http.Request)
api/app/account.go:141
← previous
101–190 of 190, ranked by callers