client

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package client provides functionalities to interact with GophKeeper, a secure password manager.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionFunc

type ActionFunc func()

ActionFunc represents a function that performs an action.

type Client

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

Client represents a GophKeeper client.

func NewClient

func NewClient(ctx context.Context, service *services.Service, enc *encription.Enc,
	opt *config.Options, userID int, token string, sessionStart time.Time, getTimeWithoutTimeZone func() time.Time) *Client

NewClient initializes a new GophKeeper client.

func (*Client) ClearSession

func (c *Client) ClearSession()

ClearSession clears the current session by resetting user ID and context, and removing session data file.

func (*Client) Close

func (c *Client) Close()

Close closes the GophKeeper client.

func (*Client) DeleteData

func (c *Client) DeleteData()

DeleteData allows the user to delete data from a specified table. It prompts the user to choose a table, then prompts for the entry to delete, and deletes the selected entry from the table. It continues this process until the user decides to stop.

func (*Client) Logout

func (c *Client) Logout()

Logout terminates the current session by clearing session data.

func (*Client) Start

func (c *Client) Start(version, buildTime string)

Start starts the GophKeeper client.

Jump to

Keyboard shortcuts

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