Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dd3v/cloud.snippets.ninja
/ functions
Functions
248 in github.com/dd3v/cloud.snippets.ninja
⨍
Functions
248
◇
Types & classes
58
↓ 81 callers
Function
Time
(year int)
internal/test/time.go:5
↓ 26 callers
Method
With
With returns a logger based off the root logger and decorates it with the given context and arguments.
pkg/log/log.go:16
↓ 17 callers
Function
MockAuthHeader
MockAuthHeader returns an HTTP header that can pass the authentication check by MockAuthHandler.
internal/test/router.go:54
↓ 12 callers
Function
NewService
NewService - ...
internal/snippet/service.go:42
↓ 11 callers
Method
Error
Error uses fmt.Sprint to construct and log a message at ERROR level
pkg/log/log.go:22
↓ 10 callers
Function
Endpoint
Endpoint - ...
internal/test/endpoint.go:25
↓ 10 callers
Method
GetByID
(ctx context.Context, id int)
internal/user/service.go:12
↓ 10 callers
Function
MockRouter
MockRouter creates a routing.Router for testing APIs.
internal/test/router.go:26
↓ 10 callers
Method
Value
()
internal/entity/snippet.go:46
↓ 9 callers
Method
Delete
(context context.Context, id int)
internal/snippet/service.go:15
↓ 8 callers
Method
Create
(ctx context.Context, user entity.User)
internal/user/service.go:13
↓ 8 callers
Method
GetID
()
internal/auth/middleware.go:13
↓ 8 callers
Method
Validate
()
internal/auth/request.go:13
↓ 7 callers
Method
Info
Info uses fmt.Sprint to construct and log a message at INFO level
pkg/log/log.go:20
↓ 7 callers
Function
NewService
NewService - ...
internal/auth/service.go:69
↓ 6 callers
Function
NewForTests
()
pkg/log/log.go:43
↓ 6 callers
Function
NewHTTPHandler
NewHTTPHandler - ...
internal/snippet/http.go:19
↓ 6 callers
Function
NewService
NewService - ...
internal/user/service.go:31
↓ 5 callers
Method
Errorf
Errorf uses fmt.Sprintf to construct and log a message at ERROR level
pkg/log/log.go:28
↓ 5 callers
Method
Update
(context context.Context, snippet entity.Snippet)
internal/snippet/service.go:14
↓ 4 callers
Method
Exists
(ctx context.Context, field string, value string)
internal/user/service.go:14
↓ 4 callers
Method
GetLimit
()
pkg/query/pagination.go:5
↓ 4 callers
Function
InternalServerError
InternalServerError - HTTP 500
internal/errors/response.go:77
↓ 4 callers
Function
NewHTTPHandler
NewHTTPHandler - ...
internal/auth/http.go:12
↓ 4 callers
Function
NewPagination
(page int, limit int)
pkg/query/pagination.go:14
↓ 4 callers
Function
NewSort
(sortBy string, orderBy string)
pkg/query/sort.go:13
↓ 3 callers
Function
BadRequest
BadRequest - HTTP 400
internal/errors/response.go:55
↓ 3 callers
Method
CountByUserID
(context context.Context, userID int, filter map[string]string)
internal/snippet/service.go:17
↓ 3 callers
Method
CreateSession
(ctx context.Context, session entity.Session)
internal/auth/service.go:36
↓ 3 callers
Function
Database
Database - ...
internal/test/db.go:16
↓ 3 callers
Method
DeleteSessionByRefreshToken
(ctx context.Context, refreshToken string)
internal/auth/service.go:38
↓ 3 callers
Function
Forbidden
Forbidden - HTTP 403
internal/errors/response.go:44
↓ 3 callers
Method
GetOwnerID
()
internal/entity/snippet.go:71
↓ 3 callers
Method
GetSessionByRefreshToken
(ctx context.Context, refreshToken string)
internal/auth/service.go:37
↓ 3 callers
Method
GetUserID
(ctx context.Context)
internal/rbac/rbac.go:38
↓ 3 callers
Function
NewHTTPHandler
NewHTTPHandler -
internal/user/http.go:17
↓ 3 callers
Method
QueryByUserID
(context.Context, int, map[string]string, query.Sort, query.Pagination)
internal/snippet/service.go:12
↓ 3 callers
Method
StatusCode
StatusCode - returns http status code
internal/errors/response.go:18
↓ 3 callers
Function
TruncateTable
TruncateTable - ...
internal/test/db.go:35
↓ 3 callers
Method
Validate
Validate - ...
internal/user/request.go:29
↓ 3 callers
Method
isOwner
(userID int, ownerID int)
internal/rbac/rbac.go:31
↓ 3 callers
Method
validate
()
internal/snippet/request.go:44
↓ 2 callers
Method
DB
()
pkg/dbcontext/dbcontext.go:25
↓ 2 callers
Method
Delete
(ctx context.Context, id int)
internal/user/service.go:22
↓ 2 callers
Method
GetTags
(ctx context.Context, userID int)
internal/snippet/service.go:16
↓ 2 callers
Function
Handler
Handler - error handler HTTP middleware
internal/errors/middleware.go:16
↓ 2 callers
Method
Infof
Infof uses fmt.Sprintf to construct and log a message at INFO level
pkg/log/log.go:26
↓ 2 callers
Function
Load
(path string)
internal/config/config.go:17
↓ 2 callers
Method
Login
(ctx context.Context, credentials authCredentials)
internal/auth/service.go:28
↓ 2 callers
Method
Logout
(ctx context.Context, refreshToken string)
internal/auth/service.go:30
↓ 2 callers
Function
New
(db *dbx.DB)
pkg/dbcontext/dbcontext.go:21
↓ 2 callers
Function
NewRepository
(db *dbcontext.DB)
internal/snippet/repository.go:19
↓ 2 callers
Function
NewRepository
NewRepository - ...
internal/auth/repository.go:17
↓ 2 callers
Function
NewRepository
(db *dbcontext.DB)
internal/user/repository.go:16
↓ 2 callers
Function
NotFound
NotFound - HTTP 404
internal/errors/response.go:33
↓ 2 callers
Method
Refresh
(ctx context.Context, credentials refreshCredentials)
internal/auth/service.go:29
↓ 2 callers
Function
Unauthorized
Unauthorized - HTTP 401
internal/errors/response.go:66
↓ 2 callers
Method
Update
(ctx context.Context, user entity.User)
internal/user/service.go:21
↓ 2 callers
Method
buildExpression
(key string, value string)
internal/snippet/repository.go:85
↓ 2 callers
Method
generateAccessToken
(userID int)
internal/auth/service.go:182
↓ 2 callers
Method
generateRefreshToken
()
internal/auth/service.go:192
↓ 2 callers
Method
validate
()
internal/snippet/request.go:66
↓ 1 callers
Method
CanDeleteSnippet
(ctx context.Context, snippet entity.Snippet)
internal/snippet/service.go:32
↓ 1 callers
Method
CanUpdateSnippet
(ctx context.Context, snippet entity.Snippet)
internal/snippet/service.go:33
↓ 1 callers
Method
CanViewSnippet
(ctx context.Context, snippet entity.Snippet)
internal/snippet/service.go:31
↓ 1 callers
Function
CompareHashAndPassword
CompareHashAndPassword - ...
pkg/security/hash.go:14
↓ 1 callers
Method
Create
(context context.Context, snippet entity.Snippet)
internal/snippet/service.go:13
↓ 1 callers
Method
DeleteSessionByUserID
(ctx context.Context, userID int)
internal/auth/service.go:40
↓ 1 callers
Method
DeleteSessionByUserIDAndUserAgent
(ctx context.Context, userID int, userAgent string)
internal/auth/service.go:39
↓ 1 callers
Function
GenerateHashFromPassword
GenerateHashFromPassword - ...
pkg/security/hash.go:8
↓ 1 callers
Function
GenerateValidationError
GenerateValidationError - ...
internal/errors/response.go:93
↓ 1 callers
Method
GetByID
(ctx context.Context, id int)
internal/snippet/service.go:11
↓ 1 callers
Method
GetByID
(ctx context.Context, id int)
internal/user/repository.go:22
↓ 1 callers
Function
GetJWTMiddleware
GetJWTMiddleware returns a JWT-based authentication middleware. Ozzo routing
internal/auth/middleware.go:18
↓ 1 callers
Method
GetOffset
()
pkg/query/pagination.go:6
↓ 1 callers
Method
GetOrderBy
()
pkg/query/sort.go:5
↓ 1 callers
Method
GetPage
()
pkg/query/pagination.go:4
↓ 1 callers
Method
GetSessionByRefreshToken
(ctx context.Context, refreshToken string)
internal/auth/repository.go:33
↓ 1 callers
Method
GetSortBy
()
pkg/query/sort.go:4
↓ 1 callers
Method
GetUserByLoginOrEmail
(ctx context.Context, value string)
internal/auth/service.go:35
↓ 1 callers
Function
Handler
(logger log.Logger)
pkg/accesslog/middleware.go:12
↓ 1 callers
Function
New
(outputPaths []string)
pkg/log/log.go:35
↓ 1 callers
Function
New
()
internal/rbac/rbac.go:14
↓ 1 callers
Method
Validate
()
internal/auth/request.go:24
↓ 1 callers
Method
Validate
()
internal/auth/request.go:34
↓ 1 callers
Function
WithRequest
(ctx context.Context, request *http.Request)
pkg/log/log.go:62
↓ 1 callers
Function
WithUser
WithUser returns a context that contains the user identity from the given JWT.
internal/auth/middleware.go:33
↓ 1 callers
Function
WithUser
WithUser returns a context that contains the user identity from the given JWT.
internal/test/router.go:36
↓ 1 callers
Function
buildResponseWithError
(err error)
internal/errors/middleware.go:33
↓ 1 callers
Method
filterConditions
()
internal/snippet/request.go:22
↓ 1 callers
Function
getRequestID
(req *http.Request)
pkg/log/log.go:72
↓ 1 callers
Function
newList
()
internal/snippet/request.go:40
↓ 1 callers
Function
stringEquals
(str string)
internal/user/request.go:18
Method
CanDeleteSnippet
(ctx context.Context, snippet entity.Snippet)
internal/rbac/rbac.go:27
Method
CanDeleteSnippet
(ctx context.Context, snippet entity.Snippet)
internal/test/rbac.go:24
Method
CanUpdateSnippet
(ctx context.Context, snippet entity.Snippet)
internal/rbac/rbac.go:22
Method
CanUpdateSnippet
(ctx context.Context, snippet entity.Snippet)
internal/test/rbac.go:20
Method
CanViewSnippet
(ctx context.Context, snippet entity.Snippet)
internal/rbac/rbac.go:18
Method
CanViewSnippet
(ctx context.Context, snippet entity.Snippet)
internal/test/rbac.go:16
Method
CountByUserID
(ctx context.Context, userID int, filter map[string]string)
internal/snippet/repository.go:60
next →
1–100 of 248, ranked by callers