Documentation
¶
Index ¶
- Variables
- func Base64Decode(str string) ([]byte, error)
- func Base64Encode(data []byte) string
- func SaltKeyPass(ctx context.Context, client *p.Client, password []byte) ([]byte, error)
- type FileStore
- type Manager
- type Session
- func SessionFromCredentials(ctx context.Context, options []proton.Option, creds *SessionCredentials) (*Session, error)
- func SessionFromLogin(ctx context.Context, options []proton.Option, username string, password string) (*Session, error)
- func SessionFromRefresh(ctx context.Context, options []proton.Option, creds *SessionCredentials) (*Session, error)
- type SessionConfig
- type SessionCredentials
- type SessionOptions
- type SessionStore
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Base64Decode ¶
func Base64Encode ¶
Types ¶
type FileStore ¶
type FileStore struct {
CacheDir bool
// contains filtered or unexported fields
}
func NewFileStore ¶
func (*FileStore) Load ¶
func (fs *FileStore) Load() (*SessionConfig, error)
func (*FileStore) Save ¶
func (fs *FileStore) Save(session *SessionConfig) error
type Session ¶
type Session struct {
Client *proton.Client
Auth proton.Auth
MaxWorkers int
UserKeyRing *crypto.KeyRing
// contains filtered or unexported fields
}
func SessionFromCredentials ¶
func SessionFromCredentials(ctx context.Context, options []proton.Option, creds *SessionCredentials) (*Session, error)
Create Session from provided Session credentials. Returns a populated session object
func SessionFromLogin ¶
func SessionFromLogin(ctx context.Context, options []proton.Option, username string, password string) (*Session, error)
Create Session using provided Login Information, returns pointer to session object
func SessionFromRefresh ¶
func SessionFromRefresh(ctx context.Context, options []proton.Option, creds *SessionCredentials) (*Session, error)
Create Session using the provided AuthToken and RefreshToken, returns a populated session object
type SessionConfig ¶
type SessionCredentials ¶
type SessionOptions ¶
type SessionOptions struct {
MaxWorkers int
}
type SessionStore ¶
type SessionStore interface {
Load() (*SessionConfig, error)
Save(session *SessionConfig) error
Delete() error
List() ([]string, error)
Switch(account string) error
}
Click to show internal directories.
Click to hide internal directories.