Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheConfig ¶
type CacheDriver ¶
type CacheDriver interface {
// Build a cache container, it doesn't wait for the cache to be ready, the Ready method needs to be called if
// you want to check the container status.
Build() error
// Config get cache configuration.
Config() CacheConfig
// Fresh the cache.
Fresh() error
// Image gets the cache image.
Image(image Image)
// Ready checks if the cache is ready, the Build method needs to be called first.
Ready() error
// Reuse the existing cache container.
Reuse(containerID string, port int) error
// Shutdown the cache.
Shutdown() error
}
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 ¶
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() string
// 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
// Reuse the existing database container.
Reuse(containerID string, port int) error
// Shutdown the database.
Shutdown() error
}
type ImageConfig ¶
type ImageDriver ¶
type ImageDriver interface {
// Build the image.
Build() error
// Config gets the image configuration.
Config() ImageConfig
// Ready checks if the image is ready by the given function until the given duration, default is 1 minute.
Ready(func() error, ...time.Duration) error
// Shutdown the image.
Shutdown() error
}
Click to show internal directories.
Click to hide internal directories.