Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssertableJSON ¶ added in v1.15.0
type AssertableJSON interface { Count(key string, value int) AssertableJSON First(key string, callback func(AssertableJSON)) AssertableJSON Each(key string, callback func(AssertableJSON)) AssertableJSON Has(key string) AssertableJSON HasAll(keys []string) AssertableJSON HasAny(keys []string) AssertableJSON HasWithScope(key string, length int, callback func(AssertableJSON)) AssertableJSON Json() map[string]any Missing(key string) AssertableJSON MissingAll(keys []string) AssertableJSON Where(key string, value any) AssertableJSON WhereNot(key string, value any) AssertableJSON }
type Database ¶
type Database interface { DatabaseDriver // Migrate runs the database migrations. Migrate() error // Seed runs the database seeds. Seed(seeders ...seeder.Seeder) error }
type DatabaseConfig ¶ added in v1.14.0
type DatabaseDriver ¶
type DatabaseDriver interface { // Build a database container, it doesn't wait for the database to be ready, the Ready method needs to be called if // you want to check the container status. Build() error // Config get database configuration. Config() DatabaseConfig // Database returns a new instance with a new database, the Build method needs to be called first. Database(name string) (DatabaseDriver, error) // Driver gets the database driver name. Driver() database.Driver // Fresh the database. Fresh() error // Image gets the database image. Image(image Image) // Ready checks if the database is ready, the Build method needs to be called first. Ready() error // Shutdown the database. Shutdown() error }
type TestRequest ¶ added in v1.15.0
type TestRequest interface { Get(uri string) (TestResponse, error) Post(uri string, body io.Reader) (TestResponse, error) Put(uri string, body io.Reader) (TestResponse, error) Delete(uri string, body io.Reader) (TestResponse, error) Patch(uri string, body io.Reader) (TestResponse, error) Head(uri string) (TestResponse, error) Options(uri string) (TestResponse, error) Bind(value any) TestRequest FlushHeaders() TestRequest WithBasicAuth(username, password string) TestRequest WithContext(ctx context.Context) TestRequest WithCookies(cookies map[string]string) TestRequest WithCookie(key, value string) TestRequest WithHeader(key, value string) TestRequest WithHeaders(headers map[string]string) TestRequest WithoutHeader(key string) TestRequest WithToken(token string, ttype ...string) TestRequest WithoutToken() TestRequest WithSession(attributes map[string]any) TestRequest }
type TestResponse ¶ added in v1.15.0
type TestResponse interface { Content() (string, error) Cookie(name string) *http.Cookie Cookies() []*http.Cookie Headers() http.Header IsServerError() bool IsSuccessful() bool Json() (map[string]any, error) Session() (map[string]any, error) AssertStatus(status int) TestResponse AssertOk() TestResponse AssertCreated() TestResponse AssertAccepted() TestResponse AssertNoContent(status ...int) TestResponse AssertMovedPermanently() TestResponse AssertFound() TestResponse AssertNotModified() TestResponse AssertPartialContent() TestResponse AssertTemporaryRedirect() TestResponse AssertBadRequest() TestResponse AssertPaymentRequired() TestResponse AssertForbidden() TestResponse AssertNotFound() TestResponse AssertMethodNotAllowed() TestResponse AssertNotAcceptable() TestResponse AssertConflict() TestResponse AssertRequestTimeout() TestResponse AssertGone() TestResponse AssertUnsupportedMediaType() TestResponse AssertUnprocessableEntity() TestResponse AssertTooManyRequests() TestResponse AssertInternalServerError() TestResponse AssertHeader(headerName, value string) TestResponse AssertHeaderMissing(string) TestResponse AssertCookie(name, value string) TestResponse AssertCookieExpired(string) TestResponse AssertCookieNotExpired(string) TestResponse AssertCookieMissing(string) TestResponse AssertSuccessful() TestResponse AssertServerError() TestResponse AssertDontSee([]string, ...bool) TestResponse AssertSee([]string, ...bool) TestResponse AssertSeeInOrder([]string, ...bool) TestResponse AssertJson(map[string]any) TestResponse AssertExactJson(map[string]any) TestResponse AssertJsonMissing(map[string]any) TestResponse AssertFluentJson(func(json AssertableJSON)) TestResponse }
Click to show internal directories.
Click to hide internal directories.