Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) DiscardTemplate(ctx context.Context, hash string) error
- func (c *Client) FinalizeTemplate(ctx context.Context, hash string) error
- func (c *Client) GetTestDatabase(ctx context.Context, hash string) (models.TestDatabase, error)
- func (c *Client) InitializeTemplate(ctx context.Context, hash string) (models.TemplateDatabase, error)
- func (c *Client) ResetAllTracking(ctx context.Context) error
- func (c *Client) ReturnTestDatabase(ctx context.Context, hash string, id int) error
- func (c *Client) SetupTemplate(ctx context.Context, hash string, init func(conn string) error) error
- func (c *Client) SetupTemplateWithDBClient(ctx context.Context, hash string, init func(db *sql.DB) error) error
- type ClientConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrManagerNotReady = errors.New("manager not ready") ErrTemplateAlreadyInitialized = errors.New("template is already initialized") ErrTemplateNotFound = errors.New("template not found") ErrDatabaseDiscarded = errors.New("database was discarded (typically failed during initialize/finalize)") ErrTestNotFound = errors.New("test database not found") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func DefaultClientFromEnv ¶
func NewClient ¶
func NewClient(config ClientConfig) (*Client, error)
func (*Client) DiscardTemplate ¶
func (*Client) FinalizeTemplate ¶
func (*Client) GetTestDatabase ¶
func (*Client) InitializeTemplate ¶
func (*Client) ReturnTestDatabase ¶
func (*Client) SetupTemplate ¶
type ClientConfig ¶
func DefaultClientConfigFromEnv ¶
func DefaultClientConfigFromEnv() ClientConfig
Click to show internal directories.
Click to hide internal directories.