Documentation
¶
Index ¶
- type EmbedMDConfig
- type EmbedMDService
- func (s *EmbedMDService) Connect(spec *datastore.Spec) (datastore.RepoSet, error)
- func (s *EmbedMDService) Initialize(ctx context.Context, spec *datastore.Spec) (datastore.RepoSet, error)
- func (s *EmbedMDService) Reconnect(spec *datastore.Spec) (datastore.RepoSet, error)
- func (s *EmbedMDService) RunMigrations(spec *datastore.Spec) error
- func (s EmbedMDService) Type() string
- type ErrMissingType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmbedMDConfig ¶
type EmbedMDConfig struct {
DatabaseType string
DatabaseDSN string
TLSConfig *tls.TLSConfig
// DB is an already connected database instance that, if provided, will
// be used instead of making a new connection.
DB *gorm.DB
}
func (*EmbedMDConfig) Validate ¶
func (c *EmbedMDConfig) Validate() error
type EmbedMDService ¶
type EmbedMDService struct {
// contains filtered or unexported fields
}
func NewEmbedMDService ¶
func NewEmbedMDService(cfg *EmbedMDConfig) (*EmbedMDService, error)
func (*EmbedMDService) Initialize ¶ added in v0.3.18
func (s *EmbedMDService) Initialize(ctx context.Context, spec *datastore.Spec) (datastore.RepoSet, error)
Initialize runs migrations and registers required types before constructing repositories. PostgreSQL initialization is serialized across processes and observes ctx; repositories retain the original database handle, not ctx.
func (*EmbedMDService) RunMigrations ¶
func (s *EmbedMDService) RunMigrations(spec *datastore.Spec) error
func (EmbedMDService) Type ¶
func (s EmbedMDService) Type() string
type ErrMissingType ¶
type ErrMissingType string
func (ErrMissingType) Error ¶
func (t ErrMissingType) Error() string
Click to show internal directories.
Click to hide internal directories.