Documentation
¶
Index ¶
- Variables
- func DoesMatchSaltedHash(clearText, saltedHash string) bool
- func Execute(commandStr string)
- func ExecuteShellCommand(shellCommand string) error
- func FindDir(dirName string) string
- func GenerateCookie() (*http.Cookie, error)
- func GetCorsDisablingHandler(next http.Handler) http.Handler
- func GetErrMsg(actualStatusCode int, respBodyMsg string) string
- func GetTimeIn30Days() time.Time
- func Hash(clearText string) (string, error)
- func RunMigrations(migrationsDir, host string)
- func SaltAndHash(clearText string) (string, error)
- func SendJsonResponse(w http.ResponseWriter, data interface{})
- func SetCookieHeaders(req *http.Request, c *ComponentClient)
- func UnpackResponse[T any](object interface{}) (*T, error)
- func UnzipToTempDir(zipBytes []byte) (string, error)
- func WaitForPostgresDb(host string) (*sql.DB, error)
- func ZipDirectoryToBytes(dirPath string) ([]byte, error)
- type ChangePasswordForm
- type ComponentClient
- type SingleInteger
- type SingleString
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger = shared.ProvideLogger(os.Getenv("LOG_LEVEL"))
Functions ¶
func DoesMatchSaltedHash ¶ added in v0.0.45
func ExecuteShellCommand ¶ added in v0.0.45
func GenerateCookie ¶ added in v0.0.22
func GetCorsDisablingHandler ¶ added in v0.0.21
GetCorsDisablingHandler This is necessary to allow cross-origin requests.
func GetTimeIn30Days ¶ added in v0.0.22
func RunMigrations ¶ added in v0.0.50
func RunMigrations(migrationsDir, host string)
func SaltAndHash ¶ added in v0.0.23
func SendJsonResponse ¶
func SendJsonResponse(w http.ResponseWriter, data interface{})
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
TODO To be tested UnzipToTempDir unzips the given zip bytes to a temporary directory and returns the path to the directory.
func ZipDirectoryToBytes ¶ added in v0.0.30
Types ¶
type ChangePasswordForm ¶
type ChangePasswordForm struct {
OldPassword string `json:"old_password"`
NewPassword string `json:"new_password"`
}
TODO to be removed
type ComponentClient ¶
type ComponentClient struct {
User string
Password string
NewPassword string
Cookie *http.Cookie
SetCookieHeader bool
RootUrl string
Origin string
VerifyCertificate bool
}
func (*ComponentClient) DoRequest ¶
func (c *ComponentClient) DoRequest(path string, payload interface{}, expectedMessage string) ([]byte, error)
func (*ComponentClient) DoRequestWithFullResponse ¶
type SingleInteger ¶ added in v0.0.33
type SingleInteger struct {
Value int `json:"value"`
}
type SingleString ¶
type SingleString struct {
Value string `json:"value"`
}
Click to show internal directories.
Click to hide internal directories.