Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DialectFromConfig ¶
DialectFromConfig returns the sole configured database dialect name, or "" if unset.
func Import ¶
func Import(ctx context.Context, v2Pool service.StatementPool, hashValidator crypto.HashValidator, dialect string, paths []string) error
Import loads bootstrap users from JSON files into the database. dialect is the configured database dialect name (e.g. "postgres"); used to reject unsupported backends.
Types ¶
type Document ¶
type Document struct {
Header Header `json:"header"`
Attributes map[domain.AttributeKey]json.RawMessage `json:"attributes"`
Authenticators map[domain.AttributeKey]json.RawMessage `json:"authenticators"`
}
Document is the on-disk shape for a single bootstrap user (one file per user).
type Header ¶
type Header struct {
ProjectID string `json:"project_id"`
TeamID string `json:"team_id,omitempty"`
SchemaURL string `json:"schema_url"`
ID string `json:"id"`
}
Header holds users-table metadata.
type PasswordAuthenticator ¶
type PasswordAuthenticator struct {
EncodedHash string `json:"encoded_hash"`
ChangeRequired bool `json:"change_required"`
}
PasswordAuthenticator is the only supported authenticator for bootstrap import.
Click to show internal directories.
Click to hide internal directories.