trusted

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: AGPL-3.0-or-later Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToConfig

func ToConfig(tcfg *Config) *backend.Config

Types

type Config

type Config struct {
	Name     string
	Type     string // Should be one of: backend.Type*
	Local    bool
	DataPath string // Used by backend.FileSystem, other local backends

	Custom map[string]interface{} `json:",omitempty"` // Used by Dropbox, Webserver, other backends

	Path string
}

Config represents a trusted backend.Config file. Trivial other differences aside (namely the New and Path fields), it contains all the same fields as a backend.Config, except the 'Key' field is excluded here.

func FromConfig

func FromConfig(config *backend.Config) *Config

type Configs

type Configs []*Config

func FromConfigs

func FromConfigs(configs []*backend.Config) Configs

type FileRow

type FileRow struct {
	FilePath  string   `json:"file_path"`
	PlainTags []string `json:"plaintags"` // types.Row.PlainTags()
}

type FileRowUpdate

type FileRowUpdate struct {
	FilePath     string `json:"file_path"`
	OldVersionID string `json:"old_version_id_tag"`
}

type Row

type Row struct {
	Unencrypted []byte   `json:"unencrypted"` // types.Row.Decrypted()
	PlainTags   []string `json:"plaintags"`   // types.Row.PlainTags()
}

func FromRow

func FromRow(row *types.Row) *Row

type RowUpdate

type RowUpdate struct {
	Unencrypted  []byte `json:"unencrypted"` // types.Row.Decrypted()
	OldVersionID string `json:"old_version_id_tag"`
}

type Rows

type Rows []*Row

func FromRows

func FromRows(rows types.Rows) Rows

func FromRows2D

func FromRows2D(rrows []types.Rows) []Rows

type StringRow

type StringRow struct {
	String    string   `json:"string"`
	PlainTags []string `json:"plaintags"`
}

type TagPair

type TagPair struct {
	Random string `json:"random"`
	Plain  string `json:"plain"`
}

func FromTagPair

func FromTagPair(pair *types.TagPair) *TagPair

type TagPairs

type TagPairs []*TagPair

func FromTagPairs

func FromTagPairs(pairs types.TagPairs) TagPairs

Jump to

Keyboard shortcuts

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