Documentation
¶
Index ¶
- func Close(c io.Closer)
- func CycleUntilComplete[R CompletableJob](interval time.Duration, producer func() (R, error)) (R, error)
- func DumpErrorsMap(registry map[string]error, w io.Writer)
- func DumpJSON(v any, w io.Writer)
- func Fail(msg string, args ...any)
- func MustCreateProvCredENV(providerName string, withRequiredAccessToken bool, ...) *credscanning.ProviderCredentials
- func MustCreateProvCredJSON(filePath string, withRequiredAccessToken bool, ...) *credscanning.ProviderCredentials
- func NewAPIKeyClient(ctx context.Context, reader *credscanning.ProviderCredentials, ...) common.AuthenticatedHTTPClient
- func NewBasicAuthClient(ctx context.Context, reader *credscanning.ProviderCredentials) common.AuthenticatedHTTPClient
- func NewCustomAuthClient(ctx context.Context, reader *credscanning.ProviderCredentials, ...) common.AuthenticatedHTTPClient
- func NewOauth2Client(ctx context.Context, reader *credscanning.ProviderCredentials, ...) common.AuthenticatedHTTPClient
- func SetupLogging()
- func Timestamp(timeText string) time.Time
- type CompletableJob
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CycleUntilComplete ¶
func CycleUntilComplete[R CompletableJob]( interval time.Duration, producer func() (R, error), ) (R, error)
CycleUntilComplete will invoke producer function every interval. Once the producer gives non-nil value the cycle will come to an end. Either due to concrete error or result value.
func MustCreateProvCredENV ¶
func MustCreateProvCredENV(providerName string, withRequiredAccessToken bool, customFields ...credscanning.Field, ) *credscanning.ProviderCredentials
MustCreateProvCredENV can be used by tests supplying variables via environment.
func MustCreateProvCredJSON ¶
func MustCreateProvCredJSON(filePath string, withRequiredAccessToken bool, customFields ...credscanning.Field, ) *credscanning.ProviderCredentials
func NewAPIKeyClient ¶
func NewAPIKeyClient( ctx context.Context, reader *credscanning.ProviderCredentials, provider providers.Provider, ) common.AuthenticatedHTTPClient
func NewBasicAuthClient ¶
func NewBasicAuthClient( ctx context.Context, reader *credscanning.ProviderCredentials, ) common.AuthenticatedHTTPClient
func NewCustomAuthClient ¶
func NewCustomAuthClient( ctx context.Context, reader *credscanning.ProviderCredentials, provider providers.Provider, fields ...credscanning.Field, ) common.AuthenticatedHTTPClient
func NewOauth2Client ¶
func NewOauth2Client( ctx context.Context, reader *credscanning.ProviderCredentials, configProvider func(*credscanning.ProviderCredentials) *oauth2.Config, ) common.AuthenticatedHTTPClient
Types ¶
type CompletableJob ¶
type CompletableJob interface {
IsStatusDone() bool
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Package testroutines holds a collection of common test procedures.
|
Package testroutines holds a collection of common test procedures. |
Click to show internal directories.
Click to hide internal directories.