repo
stringlengths
6
47
file_url
stringlengths
77
269
file_path
stringlengths
5
186
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-07 08:35:43
2026-01-07 08:55:24
truncated
bool
2 classes
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/installer.go
apis/installer.go
package apis import ( "database/sql" "errors" "fmt" "os" "strings" "time" "github.com/fatih/color" "github.com/pocketbase/dbx" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tools/osutils" ) // DefaultInstallerFunc is the default PocketBase installer function. // // It will attem...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_auth_verification_request_test.go
apis/record_auth_verification_request_test.go
package apis_test import ( "net/http" "strings" "testing" "time" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tests" ) func TestRecordRequestVerification(t *testing.T) { t.Parallel() scenarios := []tests.ApiScenario{ { Name: "not an auth collection", Method: ...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/serve.go
apis/serve.go
package apis import ( "context" "crypto/tls" "errors" "log" "net" "net/http" "path/filepath" "strings" "sync" "time" "github.com/fatih/color" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tools/hook" "github.com/pocketbase/pocketbase/tools/list" "github.com/pocketbase/pocket...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/middlewares.go
apis/middlewares.go
package apis import ( "errors" "fmt" "log/slog" "net/http" "net/url" "runtime" "slices" "strings" "time" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tools/hook" "github.com/pocketbase/pocketbase/tools/list" "github.com/pocketbase/pocketbase/tools/router" "github.com/pocketb...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/health_test.go
apis/health_test.go
package apis_test import ( "net/http" "testing" "github.com/pocketbase/pocketbase/tests" ) func TestHealthAPI(t *testing.T) { t.Parallel() scenarios := []tests.ApiScenario{ { Name: "GET health status (guest)", Method: http.MethodGet, // automatically matches also HEAD as a side-effect...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/file_test.go
apis/file_test.go
package apis_test import ( "net/http" "net/http/httptest" "os" "path" "path/filepath" "runtime" "sync" "testing" "github.com/pocketbase/pocketbase/apis" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tests" "github.com/pocketbase/pocketbase/tools/types" ) func TestFileToken(t *...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/middlewares_rate_limit.go
apis/middlewares_rate_limit.go
package apis import ( "errors" "sync" "time" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tools/hook" "github.com/pocketbase/pocketbase/tools/store" ) const ( DefaultRateLimitMiddlewareId = "pbRateLimit" DefaultRateLimitMiddlewarePriority = -1000 ) const ( rateLimitersSto...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/collection_import_test.go
apis/collection_import_test.go
package apis_test import ( "errors" "net/http" "strings" "testing" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tests" ) func TestCollectionsImport(t *testing.T) { t.Parallel() totalCollections := 16 scenarios := []tests.ApiScenario{ { Name: "unauthorized", ...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_crud_otp_test.go
apis/record_crud_otp_test.go
package apis_test import ( "net/http" "strings" "testing" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tests" ) func TestRecordCrudOTPList(t *testing.T) { t.Parallel() scenarios := []tests.ApiScenario{ { Name: "guest", Method: http.MethodGet, URL: "/api/collection...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_auth_password_reset_confirm.go
apis/record_auth_password_reset_confirm.go
package apis import ( "net/http" validation "github.com/go-ozzo/ozzo-validation/v4" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/core/validators" "github.com/pocketbase/pocketbase/tools/security" "github.com/spf13/cast" ) func recordConfirmPasswordReset(e *core.RequestEvent) error ...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/base_test.go
apis/base_test.go
package apis_test import ( "fmt" "net/http" "net/http/httptest" "os" "path/filepath" "testing" "github.com/pocketbase/pocketbase/apis" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tests" "github.com/pocketbase/pocketbase/tools/router" ) func TestWrapStdHandler(t *testing.T) { ...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/settings.go
apis/settings.go
package apis import ( "net/http" validation "github.com/go-ozzo/ozzo-validation/v4" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/forms" "github.com/pocketbase/pocketbase/tools/router" ) // bindSettingsApi registers the settings api endpoints. func bindSettingsApi(app core.App, rg *r...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_auth_with_oauth2_redirect.go
apis/record_auth_with_oauth2_redirect.go
package apis import ( "encoding/json" "errors" "net/http" "strings" "time" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tools/subscriptions" ) const ( oauth2SubscriptionTopic string = "@oauth2" oauth2RedirectFailurePath string = "../_/#/auth/oauth2-redi...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_auth_email_change_confirm.go
apis/record_auth_email_change_confirm.go
package apis import ( "net/http" validation "github.com/go-ozzo/ozzo-validation/v4" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tools/security" ) func recordConfirmEmailChange(e *core.RequestEvent) error { collection, err := findAuthCollection(e) if err != nil { return err } ...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_auth_refresh.go
apis/record_auth_refresh.go
package apis import ( "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tools/security" "github.com/spf13/cast" ) func recordAuthRefresh(e *core.RequestEvent) error { record := e.Auth if record == nil { return e.NotFoundError("Missing auth record context.", nil) } event := new(core.R...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/collection.go
apis/collection.go
package apis import ( "errors" "net/http" "strings" validation "github.com/go-ozzo/ozzo-validation/v4" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tools/router" "github.com/pocketbase/pocketbase/tools/search" "github.com/pocketbase/pocketbase/tools/security" ) // bindCollectionA...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_auth_methods.go
apis/record_auth_methods.go
package apis import ( "log/slog" "net/http" "slices" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tools/auth" "github.com/pocketbase/pocketbase/tools/security" "golang.org/x/oauth2" ) type otpResponse struct { Enabled bool `json:"enabled"` Duration int64 `json:"duration"` // i...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/realtime.go
apis/realtime.go
package apis import ( "context" "encoding/json" "errors" "fmt" "log/slog" "net/http" "strings" "time" validation "github.com/go-ozzo/ozzo-validation/v4" "github.com/pocketbase/dbx" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tools/hook" "github.com/pocketbase/pocketbase/tool...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_auth_impersonate_test.go
apis/record_auth_impersonate_test.go
package apis_test import ( "net/http" "strings" "testing" "github.com/pocketbase/pocketbase/tests" ) func TestRecordAuthImpersonate(t *testing.T) { t.Parallel() scenarios := []tests.ApiScenario{ { Name: "unauthorized", Method: http.MethodPost, URL: "/api/collections/...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_auth_email_change_request.go
apis/record_auth_email_change_request.go
package apis import ( "net/http" validation "github.com/go-ozzo/ozzo-validation/v4" "github.com/go-ozzo/ozzo-validation/v4/is" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/mails" ) func recordRequestEmailChange(e *core.RequestEvent) error { collection, err := findAuthCollection(e) ...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_auth_with_otp_test.go
apis/record_auth_with_otp_test.go
package apis_test import ( "net/http" "strings" "testing" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tests" "github.com/pocketbase/pocketbase/tools/types" ) func TestRecordAuthWithOTP(t *testing.T) { t.Parallel() scenarios := []tests.ApiScenario{ { Name: "not a...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/middlewares_cors.go
apis/middlewares_cors.go
package apis // ------------------------------------------------------------------- // This middleware is ported from echo/middleware to minimize the breaking // changes and differences in the API behavior from earlier PocketBase versions // (https://github.com/labstack/echo/blob/ec5b858dab6105ab4c3ed2627d1ebdfb6ae1ec...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_crud_mfa_test.go
apis/record_crud_mfa_test.go
package apis_test import ( "net/http" "strings" "testing" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tests" ) func TestRecordCrudMFAList(t *testing.T) { t.Parallel() scenarios := []tests.ApiScenario{ { Name: "guest", Method: http.MethodGet, URL: "/api/collection...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/logs_test.go
apis/logs_test.go
package apis_test import ( "net/http" "testing" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tests" ) func TestLogsList(t *testing.T) { t.Parallel() scenarios := []tests.ApiScenario{ { Name: "unauthorized", Method: http.MethodGet, URL: "/...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_auth.go
apis/record_auth.go
package apis import ( "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tools/router" ) // bindRecordAuthApi registers the auth record api endpoints and // the corresponding handlers. func bindRecordAuthApi(app core.App, rg *router.RouterGroup[*core.RequestEvent]) { // global oauth2 subscri...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/backup_upload.go
apis/backup_upload.go
package apis import ( "net/http" validation "github.com/go-ozzo/ozzo-validation/v4" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/core/validators" "github.com/pocketbase/pocketbase/tools/filesystem" ) func backupUpload(e *core.RequestEvent) error { fsys, err := e.App.NewBackupsFiles...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/middlewares_body_limit_test.go
apis/middlewares_body_limit_test.go
package apis_test import ( "bytes" "fmt" "net/http/httptest" "testing" "github.com/pocketbase/pocketbase/apis" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tests" ) func TestBodyLimitMiddleware(t *testing.T) { app, _ := tests.NewTestApp() defer app.Cleanup() pbRouter, err := a...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/middlewares_rate_limit_test.go
apis/middlewares_rate_limit_test.go
package apis_test import ( "net/http/httptest" "testing" "time" "github.com/pocketbase/pocketbase/apis" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tests" ) func TestDefaultRateLimitMiddleware(t *testing.T) { app, _ := tests.NewTestApp() defer app.Cleanup() app.Settings().Rate...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_auth_with_otp.go
apis/record_auth_with_otp.go
package apis import ( "errors" "fmt" validation "github.com/go-ozzo/ozzo-validation/v4" "github.com/pocketbase/pocketbase/core" ) func recordAuthWithOTP(e *core.RequestEvent) error { collection, err := findAuthCollection(e) if err != nil { return err } if !collection.OTP.Enabled { return e.ForbiddenErro...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/backup.go
apis/backup.go
package apis import ( "context" "net/http" "path/filepath" "time" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tools/router" "github.com/pocketbase/pocketbase/tools/routine" "github.com/pocketbase/pocketbase/tools/types" "github.com/spf13/cast" ) // bindBackupApi registers the f...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/settings_test.go
apis/settings_test.go
package apis_test import ( "crypto/ecdsa" "crypto/elliptic" "crypto/rand" "crypto/x509" "encoding/pem" "fmt" "net/http" "strings" "testing" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tests" ) func TestSettingsList(t *testing.T) { t.Parallel() scenarios := []tests.ApiScena...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/logs.go
apis/logs.go
package apis import ( "net/http" "github.com/pocketbase/dbx" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tools/router" "github.com/pocketbase/pocketbase/tools/search" ) // bindLogsApi registers the request logs api endpoints. func bindLogsApi(app core.App, rg *router.RouterGroup[*c...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_auth_with_oauth2.go
apis/record_auth_with_oauth2.go
package apis import ( "context" "database/sql" "encoding/json" "errors" "fmt" "log/slog" "maps" "net/http" "strings" "time" validation "github.com/go-ozzo/ozzo-validation/v4" "github.com/pocketbase/dbx" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tools/auth" "github.com/po...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_auth_email_change_confirm_test.go
apis/record_auth_email_change_confirm_test.go
package apis_test import ( "net/http" "strings" "testing" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tests" ) func TestRecordConfirmEmailChange(t *testing.T) { t.Parallel() scenarios := []tests.ApiScenario{ { Name: "not an auth collection", Method: h...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_crud.go
apis/record_crud.go
package apis import ( cryptoRand "crypto/rand" "errors" "fmt" "math/big" "net/http" "strings" "time" "github.com/pocketbase/dbx" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/forms" "github.com/pocketbase/pocketbase/tools/filesystem" "github.com/pocketbase/pocketbase/tools/infl...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_auth_password_reset_request.go
apis/record_auth_password_reset_request.go
package apis import ( "errors" "fmt" "net/http" "time" validation "github.com/go-ozzo/ozzo-validation/v4" "github.com/go-ozzo/ozzo-validation/v4/is" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/mails" "github.com/pocketbase/pocketbase/tools/routine" ) func recordRequestPasswordR...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_auth_email_change_request_test.go
apis/record_auth_email_change_request_test.go
package apis_test import ( "net/http" "strings" "testing" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tests" ) func TestRecordRequestEmailChange(t *testing.T) { t.Parallel() scenarios := []tests.ApiScenario{ { Name: "unauthorized", Method: http.Method...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/cron_test.go
apis/cron_test.go
package apis_test import ( "net/http" "testing" "time" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tests" "github.com/spf13/cast" ) func TestCronsList(t *testing.T) { t.Parallel() scenarios := []tests.ApiScenario{ { Name: "unauthorized", Method: http...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_helpers_test.go
apis/record_helpers_test.go
package apis_test import ( "encoding/json" "errors" "net/http" "net/http/httptest" "strings" "testing" "time" "github.com/pocketbase/pocketbase/apis" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tests" "github.com/pocketbase/pocketbase/tools/router" "github.com/pocketbase/pock...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/api_error_aliases.go
apis/api_error_aliases.go
package apis import "github.com/pocketbase/pocketbase/tools/router" // ApiError aliases to minimize the breaking changes with earlier versions // and for consistency with the JSVM binds. // ------------------------------------------------------------------- // ToApiError wraps err into ApiError instance (if not alre...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/collection_import.go
apis/collection_import.go
package apis import ( "errors" "net/http" validation "github.com/go-ozzo/ozzo-validation/v4" "github.com/pocketbase/pocketbase/core" ) func collectionsImport(e *core.RequestEvent) error { form := new(collectionsImportForm) err := e.BindBody(form) if err != nil { return firstApiError(err, e.BadRequestError(...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_auth_verification_confirm.go
apis/record_auth_verification_confirm.go
package apis import ( "net/http" validation "github.com/go-ozzo/ozzo-validation/v4" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tools/security" "github.com/spf13/cast" ) func recordConfirmVerification(e *core.RequestEvent) error { collection, err := findAuthCollection(e) if err !...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_helpers.go
apis/record_helpers.go
package apis import ( "database/sql" "errors" "fmt" "net/http" "strings" "time" "github.com/pocketbase/dbx" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/mails" "github.com/pocketbase/pocketbase/tools/router" "github.com/pocketbase/pocketbase/tools/routine" "github.com/pocketba...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_auth_with_password_test.go
apis/record_auth_with_password_test.go
package apis_test import ( "net/http" "strings" "testing" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tests" "github.com/pocketbase/pocketbase/tools/dbutils" ) func TestRecordAuthWithPassword(t *testing.T) { t.Parallel() updateIdentityIndex := func(collectionIdOrName string, fi...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_auth_verification_request.go
apis/record_auth_verification_request.go
package apis import ( "errors" "fmt" "net/http" "time" validation "github.com/go-ozzo/ozzo-validation/v4" "github.com/go-ozzo/ozzo-validation/v4/is" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/mails" "github.com/pocketbase/pocketbase/tools/routine" ) func recordRequestVerificat...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_crud_external_auth_test.go
apis/record_crud_external_auth_test.go
package apis_test import ( "net/http" "strings" "testing" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tests" ) func TestRecordCrudExternalAuthList(t *testing.T) { t.Parallel() scenarios := []tests.ApiScenario{ { Name: "guest", Method: http.MethodGet, ...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/backup_create.go
apis/backup_create.go
package apis import ( "context" "net/http" "regexp" validation "github.com/go-ozzo/ozzo-validation/v4" "github.com/pocketbase/pocketbase/core" ) func backupCreate(e *core.RequestEvent) error { if e.App.Store().Has(core.StoreKeyActiveBackup) { return e.BadRequestError("Try again later - another backup/restore...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/batch.go
apis/batch.go
package apis import ( "bytes" "encoding/json" "errors" "io" "mime/multipart" "net/http" "net/http/httptest" "regexp" "slices" "strconv" "strings" "time" validation "github.com/go-ozzo/ozzo-validation/v4" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tools/filesystem" "githu...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_auth_refresh_test.go
apis/record_auth_refresh_test.go
package apis_test import ( "net/http" "testing" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tests" ) func TestRecordAuthRefresh(t *testing.T) { t.Parallel() scenarios := []tests.ApiScenario{ { Name: "unauthorized", Method: http.MethodPost, URL: ...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/apis/record_auth_password_reset_confirm_test.go
apis/record_auth_password_reset_confirm_test.go
package apis_test import ( "net/http" "strings" "testing" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/tests" ) func TestRecordConfirmPasswordReset(t *testing.T) { t.Parallel() scenarios := []tests.ApiScenario{ { Name: "empty data", Method: http.MethodPo...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/mails/base.go
mails/base.go
// Package mails implements various helper methods for sending common // emails like forgotten password, verification, etc. package mails import ( "bytes" "text/template" ) // resolveTemplateContent resolves inline html template strings. func resolveTemplateContent(data any, content ...string) (string, error) { if...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/mails/record_test.go
mails/record_test.go
package mails_test import ( "html" "strings" "testing" "github.com/pocketbase/pocketbase/mails" "github.com/pocketbase/pocketbase/tests" ) func TestSendRecordAuthAlert(t *testing.T) { t.Parallel() testApp, _ := tests.NewTestApp() defer testApp.Cleanup() info := "<p>test_info</p>" user, _ := testApp.Find...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/mails/record.go
mails/record.go
package mails import ( "html" "html/template" "net/mail" "slices" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/mails/templates" "github.com/pocketbase/pocketbase/tools/mailer" ) // SendRecordAuthAlert sends a new device login alert to the specified auth record. func SendRecordAuth...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/mails/templates/layout.go
mails/templates/layout.go
package templates const Layout = ` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="viewport" content="width=device-w...
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/mails/templates/html_content.go
mails/templates/html_content.go
package templates // Available variables: // // ``` // HTMLContent template.HTML // ``` const HTMLBody = `{{define "content"}}{{.HTMLContent}}{{end}}`
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
pocketbase/pocketbase
https://github.com/pocketbase/pocketbase/blob/b1da83e5165f938453fbb21e748bca317b08239d/ui/embed.go
ui/embed.go
// Package ui handles the PocketBase Superuser frontend embedding. package ui import ( "embed" "io/fs" ) //go:embed all:dist var distDir embed.FS // DistDirFS contains the embedded dist directory files (without the "dist" prefix) var DistDirFS, _ = fs.Sub(distDir, "dist")
go
MIT
b1da83e5165f938453fbb21e748bca317b08239d
2026-01-07T08:35:43.517402Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/binder_test.go
binder_test.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "encoding/json" "errors" "fmt" "github.com/stretchr/testify/assert" "io" "math/big" "net/http" "net/http/httptest" "strconv" "strings" "testing" "time" ) func createTestContext(URL s...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
true
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/json.go
json.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "encoding/json" "fmt" "net/http" ) // DefaultJSONSerializer implements JSON encoding using encoding/json. type DefaultJSONSerializer struct{} // Serialize converts an interface into a json a...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/binder_external_test.go
binder_external_test.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors // run tests as external package to get real feel for API package echo_test import ( "encoding/base64" "fmt" "github.com/labstack/echo/v4" "log" "net/http" "net/http/httptest" ) func ExampleValueBinder_BindErro...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/group_fs.go
group_fs.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "io/fs" "net/http" ) // Static implements `Echo#Static()` for sub-routes within the Group. func (g *Group) Static(pathPrefix, fsRoot string) { subFs := MustSubFS(g.echo.Filesystem, fsRoot) g...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/bind_test.go
bind_test.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "bytes" "encoding/json" "encoding/xml" "errors" "fmt" "io" "mime/multipart" "net/http" "net/http/httptest" "net/http/httputil" "net/url" "reflect" "strconv" "strings" "testing" "t...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
true
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/echo_fs_test.go
echo_fs_test.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "github.com/stretchr/testify/assert" "io/fs" "net/http" "net/http/httptest" "os" "strings" "testing" ) func TestEcho_StaticFS(t *testing.T) { var testCases = []struct { name ...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/renderer.go
renderer.go
package echo import "io" // Renderer is the interface that wraps the Render function. type Renderer interface { Render(io.Writer, string, interface{}, Context) error } // TemplateRenderer is helper to ease creating renderers for `html/template` and `text/template` packages. // Example usage: // // e.Renderer = &ec...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/echo_test.go
echo_test.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "bytes" stdContext "context" "crypto/tls" "errors" "fmt" "io" "net" "net/http" "net/http/httptest" "net/url" "os" "reflect" "strings" "testing" "time" "github.com/stretchr/testif...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
true
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/echo_fs.go
echo_fs.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "fmt" "io/fs" "net/http" "net/url" "os" "path/filepath" "strings" ) type filesystem struct { // Filesystem is file system used by Static and File handlers to access files. // Defaults t...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/group.go
group.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "net/http" ) // Group is a set of sub-routes for a specified route. It can be used for inner // routes that share a common middleware or functionality that should be separate // from the parent...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/response.go
response.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "bufio" "errors" "fmt" "net" "net/http" ) // Response wraps an http.ResponseWriter and implements its interface to be used // by an HTTP handler to construct an HTTP response. // See: https...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/bind.go
bind.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "encoding" "encoding/xml" "errors" "fmt" "mime/multipart" "net/http" "reflect" "strconv" "strings" "time" ) // Binder is the interface that wraps the Bind method. type Binder interface...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/json_test.go
json_test.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "github.com/stretchr/testify/assert" "net/http" "net/http/httptest" "strings" "testing" ) // Note this test is deliberately simple as there's not a lot to test. // Just need to ensure it wr...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/group_test.go
group_test.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "net/http" "net/http/httptest" "os" "testing" "github.com/stretchr/testify/assert" ) // TODO: Fix me func TestGroup(t *testing.T) { g := New().Group("/group") h := func(Context) error { ...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/context_test.go
context_test.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "bytes" "crypto/tls" "encoding/json" "encoding/xml" "errors" "fmt" "io" "math" "mime/multipart" "net/http" "net/http/httptest" "net/url" "strings" "testing" "text/template" "time"...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/context_fs_test.go
context_fs_test.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "github.com/stretchr/testify/assert" "io/fs" "net/http" "net/http/httptest" "os" "testing" ) func TestContext_File(t *testing.T) { var testCases = []struct { name string w...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/renderer_test.go
renderer_test.go
package echo import ( "github.com/stretchr/testify/assert" "html/template" "net/http" "net/http/httptest" "strings" "testing" ) func TestRenderWithTemplateRenderer(t *testing.T) { e := New() req := httptest.NewRequest(http.MethodPost, "/", strings.NewReader(userJSON)) rec := httptest.NewRecorder() c := e.N...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/router.go
router.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "bytes" "fmt" "net/http" ) // Router is the registry of all registered routes for an `Echo` instance for // request matching and URL path parameter parsing. type Router struct { tree *node...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/echo.go
echo.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors /* Package echo implements high performance, minimalist Go web framework. Example: package main import ( "net/http" "github.com/labstack/echo/v4" "github.com/labstack/echo/v4/middleware" ) // Handler ...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
true
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/log.go
log.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "github.com/labstack/gommon/log" "io" ) // Logger defines the logging interface. type Logger interface { Output() io.Writer SetOutput(w io.Writer) Prefix() string SetPrefix(p string) Leve...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/binder_generic_test.go
binder_generic_test.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "cmp" "encoding/json" "fmt" "math" "net/http" "net/http/httptest" "strings" "testing" "time" "github.com/stretchr/testify/assert" ) // TextUnmarshalerType implements encoding.TextUnma...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
true
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/context.go
context.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "bytes" "encoding/xml" "fmt" "io" "mime/multipart" "net" "net/http" "net/url" "strings" "sync" ) // Context represents the context of the current HTTP request. It holds request and // ...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/router_test.go
router_test.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "net/http" "net/http/httptest" "strings" "testing" "github.com/stretchr/testify/assert" ) var ( staticRoutes = []*Route{ {"GET", "/", ""}, {"GET", "/cmd.html", ""}, {"GET", "/code.h...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
true
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/binder_generic.go
binder_generic.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "encoding" "encoding/json" "fmt" "strconv" "time" ) // TimeLayout specifies the format for parsing time values in request parameters. // It can be a standard Go time layout string or one of...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/context_generic_test.go
context_generic_test.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "testing" "github.com/stretchr/testify/assert" ) func TestContextGetOK(t *testing.T) { e := New() c := e.NewContext(nil, nil) c.Set("key", int64(123)) v, err := ContextGet[int64](c, "ke...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/group_fs_test.go
group_fs_test.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "github.com/stretchr/testify/assert" "io/fs" "net/http" "net/http/httptest" "os" "testing" ) func TestGroup_FileFS(t *testing.T) { var testCases = []struct { name string w...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/context_fs.go
context_fs.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "errors" "io" "io/fs" "net/http" "path/filepath" ) func (c *context) File(file string) error { return fsFile(c, file, c.echo.Filesystem) } // FileFS serves file from given file system. //...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/ip_test.go
ip_test.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "net" "net/http" "testing" "github.com/stretchr/testify/assert" ) func mustParseCIDR(s string) *net.IPNet { _, IPNet, err := net.ParseCIDR(s) if err != nil { panic(err) } return IPNet...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/binder.go
binder.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "encoding" "encoding/json" "fmt" "net/http" "strconv" "strings" "time" ) /** Following functions provide handful of methods for binding to Go native types from request query or path para...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
true
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/context_generic.go
context_generic.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import "errors" // ErrNonExistentKey is error that is returned when key does not exist var ErrNonExistentKey = errors.New("non existent key") // ErrInvalidKeyType is error that is returned when the valu...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/ip.go
ip.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "net" "net/http" "strings" ) /** By: https://github.com/tmshn (See: https://github.com/labstack/echo/pull/1478 , https://github.com/labstack/echox/pull/134 ) Source: https://echo.labstack.com...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/response_test.go
response_test.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package echo import ( "net/http" "net/http/httptest" "testing" "github.com/stretchr/testify/assert" ) func TestResponse(t *testing.T) { e := New() req := httptest.NewRequest(http.MethodGet, "/", nil) rec := h...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/middleware/static.go
middleware/static.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package middleware import ( "errors" "fmt" "html/template" "net/http" "net/url" "os" "path" "strings" "github.com/labstack/echo/v4" "github.com/labstack/gommon/bytes" ) // StaticConfig defines the config f...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/middleware/csrf.go
middleware/csrf.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package middleware import ( "crypto/subtle" "net/http" "slices" "strings" "time" "github.com/labstack/echo/v4" ) // CSRFConfig defines the config for CSRF middleware. type CSRFConfig struct { // Skipper defin...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/middleware/body_limit.go
middleware/body_limit.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package middleware import ( "fmt" "io" "net/http" "sync" "github.com/labstack/echo/v4" "github.com/labstack/gommon/bytes" ) // BodyLimitConfig defines the config for BodyLimit middleware. type BodyLimitConfig ...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/middleware/decompress_test.go
middleware/decompress_test.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package middleware import ( "bytes" "compress/gzip" "errors" "io" "net/http" "net/http/httptest" "strings" "sync" "testing" "github.com/labstack/echo/v4" "github.com/stretchr/testify/assert" ) func TestDe...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/middleware/middleware.go
middleware/middleware.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package middleware import ( "net/http" "regexp" "strconv" "strings" "github.com/labstack/echo/v4" ) // Skipper defines a function to skip middleware. Returning true skips processing // the middleware. type Skip...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/middleware/compress.go
middleware/compress.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package middleware import ( "bufio" "bytes" "compress/gzip" "io" "net" "net/http" "strings" "sync" "github.com/labstack/echo/v4" ) // GzipConfig defines the config for Gzip middleware. type GzipConfig struc...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/middleware/secure_test.go
middleware/secure_test.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package middleware import ( "net/http" "net/http/httptest" "testing" "github.com/labstack/echo/v4" "github.com/stretchr/testify/assert" ) func TestSecure(t *testing.T) { e := echo.New() req := httptest.NewReq...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/middleware/cors.go
middleware/cors.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package middleware import ( "net/http" "regexp" "strconv" "strings" "github.com/labstack/echo/v4" ) // CORSConfig defines the config for CORS middleware. type CORSConfig struct { // Skipper defines a function ...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/middleware/recover.go
middleware/recover.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package middleware import ( "fmt" "net/http" "runtime" "github.com/labstack/echo/v4" "github.com/labstack/gommon/log" ) // LogErrorFunc defines a function for custom logging in the middleware. type LogErrorFunc...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/middleware/decompress.go
middleware/decompress.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package middleware import ( "compress/gzip" "io" "net/http" "sync" "github.com/labstack/echo/v4" ) // DecompressConfig defines the config for Decompress middleware. type DecompressConfig struct { // Skipper de...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/middleware/proxy.go
middleware/proxy.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package middleware import ( "context" "crypto/tls" "fmt" "io" "math/rand" "net" "net/http" "net/http/httputil" "net/url" "regexp" "strings" "sync" "time" "github.com/labstack/echo/v4" ) // TODO: Handle...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false
labstack/echo
https://github.com/labstack/echo/blob/482bb46fe5c7eb7c9fd7bec7d3128433dea21bee/middleware/rate_limiter.go
middleware/rate_limiter.go
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: © 2015 LabStack LLC and Echo contributors package middleware import ( "math" "net/http" "sync" "time" "github.com/labstack/echo/v4" "golang.org/x/time/rate" ) // RateLimiterStore is the interface to be implemented by custom stores. type RateLimiterSto...
go
MIT
482bb46fe5c7eb7c9fd7bec7d3128433dea21bee
2026-01-07T08:36:24.147689Z
false