model

package
v0.0.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2024 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupItem added in v0.0.11

type BackupItem struct {
	ID  int    `json:"-"`
	Tag string `json:"tag"`
}

type Database

type Database struct {
	Name     string `survey:"name"`
	Password string `survey:"password"`
	Hint     string `survey:"hint"`
}

type DetailItem

type DetailItem struct {
	ID         int    `json:"-"`
	Title      string `json:"title"`
	Account    string `json:"account"`
	Password   string `json:"password"`
	Comment    string `json:"comment"`
	ModifiedAt string `json:"modifiedAt"`
}

type ObjectStorage added in v0.0.11

type ObjectStorage interface {
	Init() error
	GetDirPath() string
	UploadFile(key string, localFilePath string) bool
	DownloadFile(key string, localFilePath string) bool
	// If file in oss is newer than localfile?
	// if newer > 0, file in oss is newer than localfile
	// if newer == 0 file in oss is new as localfile
	// if newer < 0 localfile is newer than file in oss
	Compare(key string, localFilePath string) (newer int, err error)
	// modify Mtime of local file to consistent with file in oss
	AdjustMTime(key string, localFilePath string) error
	ListKeys(prefix string) ([]string, error)
	Delete(key string) error
}

type SimpleItem

type SimpleItem struct {
	ID           int `json:"id"`
	Title        string
	IVCiphertext string // base64 encoded
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL