Documentation
¶
Index ¶
- Constants
- Variables
- func CheckServer(ctx context.Context, dsn string) (int, error)
- func DefaultName(at time.Time, site string) string
- func Describe(num int) string
- func Ready(ctx context.Context, dsn string, force bool) (holdsData bool, err error)
- func TooOld(found int) error
- type CreateOptions
- type CreateResult
- type Entry
- type Files
- type Manifest
- type Report
- type RestoreOptions
- type RestoreResult
- type Table
Constants ¶
View Source
const ( // Format is the version of the layout inside the archive, not of pwikit. It // changes only when an older build could no longer read a newer file. Format = 1 ManifestName = "manifest.json" Extension = ".pwbak" )
View Source
const MinimumPGVersion = 140000
A newer server is not refused, since nothing in the schema depends on what the versions above this one changed.
Variables ¶
View Source
var ErrNotEmpty = errors.New("the database already holds data")
Functions ¶
func CheckServer ¶
This only answers for a server somebody else runs. The bundled one is read off its own data directory before it is even started.
Types ¶
type CreateOptions ¶
type CreateResult ¶
func Create ¶
func Create(ctx context.Context, opts CreateOptions) (CreateResult, error)
type Manifest ¶
type Manifest struct {
Format int `json:"format"`
CreatedAt time.Time `json:"created_at"`
Pwikit string `json:"pwikit_version"`
PGVersion int `json:"pg_version"`
Migrations []string `json:"migrations"`
// Site is empty for a whole instance and the slug when one site was taken
// out on its own.
Site string `json:"site,omitempty"`
KeptPasswords bool `json:"kept_passwords,omitempty"`
Tables map[string]Table `json:"tables"`
Files Files `json:"files"`
}
func ReadManifestOf ¶
type Report ¶
type RestoreOptions ¶
Click to show internal directories.
Click to hide internal directories.