clihelper

package
v0.0.0-...-e78ca02 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProductServiceName = "GophKeeper"
	DefaultTimeout     = time.Second * 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Helper

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

func NewHelper

func NewHelper(logger *log.Logger, serverClient *client.GrpcClient, storage *Storage) *Helper

func (*Helper) AddBytes

func (h *Helper) AddBytes(cCtx *cli.Context) error

func (*Helper) AddCard

func (h *Helper) AddCard(cCtx *cli.Context) error

func (*Helper) AddPassword

func (h *Helper) AddPassword(cCtx *cli.Context) error

func (*Helper) AddText

func (h *Helper) AddText(cCtx *cli.Context) error

func (*Helper) GetAllSecrets

func (h *Helper) GetAllSecrets(cCtx *cli.Context) error

func (*Helper) GetSecret

func (h *Helper) GetSecret(cCtx *cli.Context) error

func (*Helper) Init

func (h *Helper) Init(cCtx *cli.Context) error

func (*Helper) Login

func (h *Helper) Login(cCtx *cli.Context) error

func (*Helper) Register

func (h *Helper) Register(cCtx *cli.Context) error

func (*Helper) RemoveSecret

func (h *Helper) RemoveSecret(cCtx *cli.Context) error

type Storage

type Storage struct {
	*clipb.Storage
	// contains filtered or unexported fields
}

func NewStorage

func NewStorage(path string, ignoreErrors bool) (*Storage, error)

func (*Storage) LoginInterceptor

func (s *Storage) LoginInterceptor(ctx *cli.Context) error

func (*Storage) Save

func (s *Storage) Save() error

func (*Storage) TokenIsValid

func (s *Storage) TokenIsValid(ctx context.Context) bool

func (*Storage) TokenIsValidError

func (s *Storage) TokenIsValidError(_ context.Context) error

Jump to

Keyboard shortcuts

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