Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pace/bricks
/ functions
Functions
1,579 in github.com/pace/bricks
⨍
Functions
1,579
◇
Types & classes
614
↓ 279 callers
Method
Errorf
Errorf logs an error message with the test
test/livetest/test_proxy.go:60
↓ 227 callers
Method
Fatal
Fatal logs the passed message in the context of the test and fails the test
test/livetest/test_proxy.go:85
↓ 194 callers
Method
Context
Context returns the livetest context. Useful for passing timeout and/or logging constraints from the test executor to the individual case
test/livetest/test_proxy.go:49
↓ 173 callers
Method
Fatalf
Fatalf logs the passed message in the context of the test and fails the test
test/livetest/test_proxy.go:91
↓ 129 callers
Method
String
String formats all external dependencies. The format is "name:duration[,name:duration]..." and sorted by name.
http/middleware/external_dependency.go:102
↓ 126 callers
Method
Err
Err returns the error if one of the work queue items failed
pkg/synctx/work_queue.go:72
↓ 124 callers
Method
Name
Name returns the name of the test
test/livetest/test_proxy.go:107
↓ 122 callers
Method
WithContext
WithContext allows storing the PatternRedactor inside a context for passing it on
pkg/redact/context.go:10
↓ 118 callers
Method
Handler
Handler will parse the bearer token, introspect it, and put the token and other relevant information back in the context.
http/oauth2/oauth2.go:33
↓ 101 callers
Method
Set
(v string)
cmd/pb/main.go:122
↓ 93 callers
Method
Get
Get returns the value stored under the key and its remaining ttl. If there is no value stored, ErrNotFound is returned. If the ttl is zero, the value
pkg/cache/cache.go:21
↓ 83 callers
Function
WriteError
WriteError writes a jsonapi error message to the client
http/jsonapi/runtime/error.go:80
↓ 76 callers
Method
WriteHeader
(statusCode int)
http/jsonapi/runtime/marshalling_test.go:232
↓ 75 callers
Method
Run
Run manages distributed lock-based leadership. This method is designed to continually monitor and maintain the leadership status of the calling pod, e
maintenance/failover/failover.go:132
↓ 68 callers
Method
Finish
Finish allows to be used easily with go contexts
pkg/synctx/wg.go:15
↓ 61 callers
Function
Ctx
Ctx returns the logger for the passed context
maintenance/log/log.go:118
↓ 58 callers
Method
Close
()
maintenance/metric/jsonapi/jsonapi.go:163
↓ 57 callers
Method
Now
Now returns the current time with the set timezone or local time if timezone is not set
locale/locale.go:85
↓ 56 callers
Function
Handle
Handle logs the given error and reports it to sentry.
maintenance/errors/error.go:135
↓ 56 callers
Function
HandleError
HandleError reports the passed error to sentry
maintenance/errors/error.go:126
↓ 55 callers
Function
HandleRequest
HandleRequest should be called with defer to recover panics in request handlers
maintenance/errors/error.go:118
↓ 52 callers
Function
ScanParameters
ScanParameters scans the request using the given path parameter objects in case an error is encountered a 400 along with a jsonapi errors object is se
http/jsonapi/runtime/parameters.go:57
↓ 50 callers
Method
String
()
tools/testserver/math/math.pb.go:41
↓ 50 callers
Function
ValidateParameters
ValidateParameters checks the given struct and returns true if the struct is valid according to the specification (declared with go-validator struct t
http/jsonapi/runtime/validation.go:32
↓ 46 callers
Method
ServeHTTP
ServeHTTP adds the locale to the request context
locale/http.go:36
↓ 45 callers
Method
Add
(ctx context.Context, in *Input, opts ...grpc.CallOption)
tools/testserver/math/math_grpc.pb.go:21
↓ 42 callers
Method
Type
()
cmd/pb/main.go:132
↓ 41 callers
Method
Forget
Forget removes the value stored under the key. No error is returned if there is no value stored.
pkg/cache/cache.go:25
↓ 40 callers
Method
Header
()
http/jsonapi/runtime/marshalling_test.go:228
↓ 40 callers
Function
Marshal
Marshal the given data and writes them into the response writer, sets the content-type and code as well
http/jsonapi/runtime/marshalling.go:99
↓ 39 callers
Method
Error
Error implements the error interface
http/jsonapi/runtime/error.go:48
↓ 39 callers
Method
Parse
Parse a external dependency value
http/middleware/external_dependency.go:113
↓ 38 callers
Method
AuthorizeOAuth2
(r *http.Request, w http.ResponseWriter, scope string)
http/jsonapi/generator/internal/securitytest/open-api_test.go:17
↓ 38 callers
Method
Error
Error implements the `Error` interface.
http/jsonapi/errors.go:53
↓ 38 callers
Function
UnmarshalPayload
UnmarshalPayload converts an io into a struct instance using jsonapi tags on struct fields. This method supports single request payloads only, at the
http/jsonapi/request.go:96
↓ 34 callers
Function
MarshalPayload
MarshalPayload writes a jsonapi response for one or many records. The related records are sideloaded into the "included" array. If this method is give
http/jsonapi/response.go:69
↓ 28 callers
Method
Run
(ctx context.Context)
pkg/routine/instance.go:27
↓ 27 callers
Method
GetState
GetState returns the current state. That is whether the check is healthy or the error occurred.
maintenance/health/servicehealthcheck/connection_state.go:36
↓ 26 callers
Function
validatePattern
(t *testing.T, p *regexp.Regexp, s string, expected bool)
pkg/redact/pattern_test.go:13
↓ 25 callers
Method
Use
Use adds a chainable round tripper to the round tripper chain. It returns the updated round tripper chain.
http/transport/chainable.go:58
↓ 24 callers
Method
ServeHTTP
(w http.ResponseWriter, r *http.Request)
maintenance/health/health.go:22
↓ 23 callers
Function
Unmarshal
Unmarshal processes the request content and fills passed data struct with the correct jsonapi content. After un-marshaling the struct will be validate
http/jsonapi/runtime/marshalling.go:19
↓ 22 callers
Method
Error
()
maintenance/errors/error.go:60
↓ 22 callers
Method
Error
Error logs an error message with the test
test/livetest/test_proxy.go:54
↓ 22 callers
Method
Put
Put stores the value under the key. Any existing value is overwritten. If ttl is given, the cache automatically forgets the value after the duration.
pkg/cache/cache.go:15
↓ 19 callers
Function
GetTokenFromContext
GetTokenFromContext returns the token, if it is stored in the context, and true if the token is present.
http/security/helper.go:46
↓ 19 callers
Method
SetErrorState
SetErrorState sets the state to not healthy.
maintenance/health/servicehealthcheck/connection_state.go:25
↓ 18 callers
Function
Fatal
Fatal implements log Fatal interface
maintenance/log/log_api.go:10
↓ 18 callers
Function
Logger
Logger returns the current logger instance
maintenance/log/log.go:123
↓ 17 callers
Method
WithValue
WithValue adds custom state variables to the runtime context.
http/jsonapi/runtime.go:54
↓ 15 callers
Method
Timezone
Timezone of the locale
locale/locale.go:58
↓ 14 callers
Function
FromCtx
FromCtx returns the locale from the context. The returned locale is always not nil.
locale/context.go:22
↓ 14 callers
Method
Language
Language of the locale
locale/locale.go:48
↓ 14 callers
Method
Value
Value returns a state variable in the runtime context.
http/jsonapi/runtime.go:61
↓ 14 callers
Function
Warnf
Warnf implements logrus Warnf interface
maintenance/log/logrus_api.go:27
↓ 13 callers
Method
Len
Len is the number of elements in the collection.
http/jsonapi/generator/route.go:32
↓ 13 callers
Function
NewLocale
NewLocale creates a new locale based on the passed accepted and language and timezone
locale/locale.go:40
↓ 13 callers
Function
Output
Output duplicates the current logger and sets w as its output.
maintenance/log/log.go:144
↓ 13 callers
Method
addGoDoc
(typeName, description string)
http/jsonapi/generator/generate_helper.go:17
↓ 12 callers
Method
HasTimezone
HasTimezone returns true if the timezone is defined, false otherwise
locale/locale.go:63
↓ 12 callers
Function
RegisterHealthCheck
RegisterHealthCheck registers a required HealthCheck. The name must be unique. If the health check satisfies the Initializable interface, it is initia
maintenance/health/servicehealthcheck/healthcheck.go:75
↓ 12 callers
Method
RoundTrip
RoundTrip executes a single HTTP transaction via Transport()
http/transport/dump_round_tripper.go:121
↓ 12 callers
Method
Wait
Wait waits until all worker functions are done, one worker is failing or the context is canceled
pkg/synctx/work_queue.go:56
↓ 12 callers
Function
goNameHelper
(name string)
http/jsonapi/generator/generate_helper.go:204
↓ 11 callers
Function
Fatalf
Fatalf implements log Fatalf interface
maintenance/log/log_api.go:20
↓ 11 callers
Function
WithContext
WithContext returns context with enabled logger. This overwrites a logger that is set on the context already use this if you are not inside a request
maintenance/log/log.go:139
↓ 11 callers
Method
WriteHeader
WriteHeader captures the status code for metric submission and collects the pace_api_http_request_total counter and pace_api_http_request_duration_sec
maintenance/metric/jsonapi/jsonapi.go:105
↓ 10 callers
Function
Chain
Chain returns a round tripper chain with the specified chainable round trippers and http.DefaultTransport as transport. The transport can be overriden
http/transport/chainable.go:45
↓ 10 callers
Function
ContextWithToken
ContextWithToken creates a new Context with the token
http/security/helper.go:41
↓ 10 callers
Method
Exec
(ctx context.Context, dest ...interface{})
backend/postgres/health.go:15
↓ 10 callers
Function
ExternalDependencyContextFromContext
ExternalDependencyContextFromContext returns the external dependencies context or nil
http/middleware/external_dependency.go:76
↓ 10 callers
Function
HandleWithCtx
HandleWithCtx should be called with defer to recover panics in goroutines
maintenance/errors/error.go:210
↓ 10 callers
Method
HasLanguage
HasTimezone returns true if the language is defined, false otherwise
locale/locale.go:53
↓ 10 callers
Method
Map
Map maps the value, this function decides if the value is allowed and translates it to a database column name, the function returns the database colum
http/jsonapi/runtime/standard_params.go:43
↓ 10 callers
Method
SkipNow
SkipNow skips the test immediately
test/livetest/test_proxy.go:121
↓ 9 callers
Function
New
New returns an error that formats as the given text.
maintenance/errors/error.go:224
↓ 9 callers
Function
NewDumpRoundTripper
NewDumpRoundTripper return the roundtripper with configured options
http/transport/dump_round_tripper.go:80
↓ 9 callers
Function
addValidator
(tags map[string]string, validator string)
http/jsonapi/generator/generate_helper.go:179
↓ 8 callers
Method
AddDependency
(name string, duration time.Duration)
http/middleware/external_dependency.go:90
↓ 8 callers
Method
Duration
Duration returns the duration of the requested backoff and resets all others.
pkg/routine/backoff.go:23
↓ 8 callers
Method
Fail
Fail marks the test as failed
test/livetest/test_proxy.go:66
↓ 8 callers
Method
Final
Final sets the transport of the round tripper chain, which is used to make the actual request. Final should be called at the end of the chain. If not
http/transport/chainable.go:78
↓ 8 callers
Function
Handler
Handler simply return the prometheus http handler. The handler will expose all of the collectors and metrics that are attached to the prometheus defau
maintenance/metric/handler.go:15
↓ 8 callers
Function
Req
Req returns the logger for the passed request
maintenance/log/log.go:113
↓ 8 callers
Function
RequestIDFromContext
RequestIDFromContext returns a unique request id or an empty string if there is none
maintenance/log/log.go:93
↓ 8 callers
Function
RoundTripConfig
(dumpOptions ...string)
http/transport/dump_round_tripper.go:57
↓ 8 callers
Method
SetTransport
SetTransport sets the RoundTripper to make HTTP requests
http/transport/dump_round_tripper.go:98
↓ 8 callers
Method
Title
()
maintenance/errors/bricks.go:42
↓ 8 callers
Function
WithLocale
WithLocale creates a new context with the passed locale
locale/context.go:16
↓ 8 callers
Method
WriteHeader
(status int)
http/middleware/metrics.go:87
↓ 8 callers
Function
resetHealthChecks
remove all previous health checks
maintenance/health/servicehealthcheck/healthcheck_test.go:186
↓ 8 callers
Function
testRequest
execute a test request on the given handler and assert the expected response code and body.
maintenance/health/servicehealthcheck/healthcheck_test.go:157
↓ 7 callers
Function
FromContext
(ctx context.Context)
pkg/tracking/utm/context.go:46
↓ 7 callers
Method
GetValue
GetValue returns the bearer token
http/security/helper.go:13
↓ 7 callers
Function
Handler
Handler returns a middleware that handles all of the logging aspects of any incoming http request. Optionally several path prefixes like "/health" can
maintenance/log/handler.go:27
↓ 7 callers
Method
IsEnabled
(option string)
http/transport/dump_options.go:21
↓ 7 callers
Function
SimpleExec
SimpleExec executes the command and uses the parent process STDIN,STDOUT,STDERR
internal/service/helper.go:81
↓ 7 callers
Function
Until
Until executes the given function fn until duration d is passed or context is canceled. The constaints of the Default configuration apply.
http/longpoll/longpoll.go:35
↓ 7 callers
Function
expBody
expBody will expect the response body to equal to the passed expected body.
maintenance/health/servicehealthcheck/healthcheck_test.go:148
↓ 7 callers
Function
prepareContext
(ctx context.Context)
grpc/server.go:170
next →
1–100 of 1,579, ranked by callers