api

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Username string
	Password string
}

Client is our Lastpass (lpass) wrapper client.

func (*Client) Create

func (c *Client) Create(s Secret) (Secret, error)

Create is used to create a new resource and generate ID.

func (*Client) CreateNodeType

func (c *Client) CreateNodeType(name string, template string, nodetype string) (Secret, error)

Create a secret of type node-type

func (*Client) Delete

func (c *Client) Delete(id string) error

Delete secret in upstream db

func (*Client) Login

func (c *Client) Login() error

perhaps we should call Login only once providerConfigure()

func (*Client) Read

func (c *Client) Read(id string) ([]Secret, error)

Fetch secrets from upstream

func (*Client) Update

func (c *Client) Update(s Secret) error

Update is called to update secret with upstream

func (*Client) UpdateNodeType

func (c *Client) UpdateNodeType(id string, template string) error

Update is called to update secret with upstream

type Secret

type Secret struct {
	Fullname        string            `json:"fullname"`
	Group           string            `json:"group"`
	ID              string            `json:"id"`
	LastModifiedGmt string            `json:"last_modified_gmt"`
	LastTouch       string            `json:"last_touch"`
	Name            string            `json:"name"`
	Note            string            `json:"note"`
	Password        string            `json:"password"`
	Share           string            `json:"share"`
	URL             string            `json:"url"`
	Username        string            `json:"username"`
	CustomFields    map[string]string `json:"custom_fields"`
}

Secret describes a Lastpass object.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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