Documentation
¶
Overview ¶
Package testfixture provides local targets without using user services.
Index ¶
- Constants
- func CleanupContext() (context.Context, context.CancelFunc)
- func EnsureLocalPKI(dir string) error
- type Certificates
- type Database
- func (f *Database) AdoptRestored(ctx context.Context) error
- func (f *Database) Cleanup(ctx context.Context, id, nonce string) error
- func (f *Database) Close(ctx context.Context) error
- func (f *Database) EnableMTLS(ctx context.Context, dir string) (string, Certificates, error)
- func (f *Database) RenameSource(ctx context.Context) error
- type Targets
- type TestContext
Constants ¶
const HealthProto = `` /* 202-byte string literal not displayed */
const HealthTypesProto = `` /* 213-byte string literal not displayed */
const LocalHBA = `` /* 255-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func CleanupContext ¶
func CleanupContext() (context.Context, context.CancelFunc)
func EnsureLocalPKI ¶
Types ¶
type Certificates ¶
type Certificates struct {
CA, Client, Key string
Server tls.Certificate
Pool *x509.CertPool
}
func IssueLocalClient ¶
func IssueLocalClient(dir, role string) (Certificates, error)
func NewCertificates ¶
func NewCertificates() (Certificates, error)
func (Certificates) ServerTLS ¶
func (c Certificates) ServerTLS() *tls.Config
type Database ¶
type Database struct {
ID, Nonce string
Namespace dbscope.Namespace
AppURL, ReaderURL, TargetURL string
AppRole, ReaderRole, TargetRole, TargetSchema string
// contains filtered or unexported fields
}
Database owns schemas and restricted roles in the existing qag database. AdminURL is kept private: it must never be passed to the app or SQL runner.
func (*Database) EnableMTLS ¶
EnableMTLS grants a certificate-only role access to this fixture's target.