internal

package
v0.0.0-...-e48b7a3 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopySubStruct

func CopySubStruct(source any, destination any) error

CopyStruct copies a subset of the source structure into the target * structure. The rules for this copy are pretty straight forward. All * fields found in the target MUST be also found in the source, and they * must also be of the same type as those fields found in the source. This * presents a behavior found in C/C++, Nim and other languages.

func UserPrompt

func UserPrompt(prompt string, password bool) (string, error)

Prompt user for inputs. If `password` is true then the method will * disable echo'ing the password to the terminal.

Types

type FileStore

type FileStore struct {
	// contains filtered or unexported fields
}

The SessionStore is used to cache the session information. This allows * a session to be restarted inbetween commands without having to login * with a username and password. * * FIXME While using a local file store is fine during development, it is * not a very viable long-term solution for production use. Various * solutions exist for securely storing secrets that will handle automatic * interaction with the user. OSX even supports such a solution for the * entire platform. * * In the long run we should see about supporting the default local secrets * store for whatever platform we're running on, while also allowing the user * to configure their own secrets agent. * * Ref: https://github.com/keybase/go-keychain

func NewFileStore

func NewFileStore(filename string, account string) *FileStore

func (*FileStore) Delete

func (fs *FileStore) Delete() error

func (*FileStore) List

func (fs *FileStore) List() ([]string, error)

func (*FileStore) Load

func (fs *FileStore) Load() (*proton.SessionConfig, error)

func (*FileStore) Save

func (fs *FileStore) Save(session *proton.SessionConfig) error

func (*FileStore) Switch

func (fs *FileStore) Switch(account string) error

Jump to

Keyboard shortcuts

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