MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / Bootstrap

Method Bootstrap

internal/store/postgresstore.go:147–158  ·  view source on GitHub ↗

Bootstrap synchronizes configuration and auth records between PostgreSQL and the local workspace.

(ctx context.Context, exampleConfigPath string)

Source from the content-addressed store, hash-verified

145
146// Bootstrap synchronizes configuration and auth records between PostgreSQL and the local workspace.
147func (s *PostgresStore) Bootstrap(ctx context.Context, exampleConfigPath string) error {
148 if err := s.EnsureSchema(ctx); err != nil {
149 return err
150 }
151 if err := s.syncConfigFromDatabase(ctx, exampleConfigPath); err != nil {
152 return err
153 }
154 if err := s.syncAuthFromDatabase(ctx); err != nil {
155 return err
156 }
157 return nil
158}
159
160// ConfigPath returns the managed configuration file path inside the spool directory.
161func (s *PostgresStore) ConfigPath() string {

Callers 1

mainFunction · 0.45

Calls 3

EnsureSchemaMethod · 0.95
syncAuthFromDatabaseMethod · 0.95

Tested by

no test coverage detected