Documentation
¶
Index ¶
- Constants
- Variables
- func AnalyzeCode(tr *taskrunner.TaskRunner, dir string)
- func AssertDeepStackErrorFromRequest(t *testing.T, err error, expectedResponseBodyErrorMessage string)
- func BuildWholeGoProject(Tr *taskrunner.TaskRunner, directory string)
- func Close(r Closable)
- func CollectBuildTags(dir string) ([]string, error)
- func DoesMatchSaltedHash(clearText, saltedHash string) bool
- func FindDir(dirName string) (string, error)
- func GenerateCookie() (*http.Cookie, error)
- func GenerateSecret() (string, error)
- func GetSHA256Hash(plainText string) string
- func GetTimeInSevenDays() time.Time
- func MapOf(expectedErrors ...string) map[string]any
- func NewFileHandler(level slog.Level) *slog.JSONHandler
- func RemoveDir(path string)
- func RunMigrations(migrationsDir, host, port string) error
- func SaltAndHash(clearText string) (string, error)
- func SendJsonResponse(w http.ResponseWriter, data any)
- func SetCookieHeaders(req *http.Request, c *ComponentClient)
- func UnpackResponse[T any](object any) (*T, error)
- func UnzipToTempDir(zipBytes []byte) (string, error)
- func WaitForPostgresDb(host, port string) (*sql.DB, error)
- func WriteResponseError(w http.ResponseWriter, expectedErrors map[string]any, err error, ...)
- func ZipDirectoryToBytes(dirPath string) ([]byte, error)
- type Closable
- type ComponentClient
Constants ¶
View Source
const ( DirectoryField = "directory" SizeInBytesField = "size_in_bytes" FolderToFindField = "folder_to_find" InitialDirField = "initial_directory" HostField = "host" CurrentAttemptField = "current_attempt" MaximumAttemptsFields = "maximum_attempts" PortField = "port" )
Variables ¶
View Source
var ( Logger = deepstack.NewDeepStackLogger(slog.LevelInfo) OperationFailedError = "Operation failed" )
Functions ¶
func AnalyzeCode ¶ added in v0.0.56
func AnalyzeCode(tr *taskrunner.TaskRunner, dir string)
func AssertDeepStackErrorFromRequest ¶ added in v0.0.132
func BuildWholeGoProject ¶ added in v0.0.131
func BuildWholeGoProject(Tr *taskrunner.TaskRunner, directory string)
this function is meant to detect compile errors in the test code with build tags
func CollectBuildTags ¶ added in v0.0.68
func DoesMatchSaltedHash ¶ added in v0.0.45
func GenerateCookie ¶ added in v0.0.22
func GenerateSecret ¶ added in v0.0.126
func GetSHA256Hash ¶ added in v0.0.116
func GetTimeInSevenDays ¶ added in v0.0.93
func NewFileHandler ¶ added in v0.0.128
func NewFileHandler(level slog.Level) *slog.JSONHandler
func RunMigrations ¶ added in v0.0.50
func SaltAndHash ¶ added in v0.0.23
func SendJsonResponse ¶
func SendJsonResponse(w http.ResponseWriter, data any)
func SetCookieHeaders ¶ added in v0.0.35
func SetCookieHeaders(req *http.Request, c *ComponentClient)
func UnpackResponse ¶ added in v0.0.32
func UnzipToTempDir ¶ added in v0.0.42
UnzipToTempDir unzips the given zip bytes to a temporary directory and returns the path to the directory.
func WaitForPostgresDb ¶ added in v0.0.51
func WriteResponseError ¶ added in v0.0.130
func ZipDirectoryToBytes ¶ added in v0.0.30
Types ¶
type ComponentClient ¶
type ComponentClient struct {
Cookie *http.Cookie
SetCookieHeader bool
RootUrl string
Origin string
VerifyCertificate bool
}
func (*ComponentClient) DoRequest ¶
func (c *ComponentClient) DoRequest(path string, payload any) ([]byte, error)
func (*ComponentClient) DoRequestWithFullResponse ¶
Click to show internal directories.
Click to hide internal directories.