zip

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 14 Imported by: 0

README

POSH zip provider

Usage

Configuration

zip:
  credentials:
    default:
      field: password
      item: teasdfadsfadsfadskjsmj34
      vault: zhkmc5znychsqasdfasdfadfa
      account: foomo

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

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

func NewCommand

func NewCommand(l log.Logger, zip *Zip, opts ...CommandOption) *Command

func (*Command) Complete

func (c *Command) Complete(ctx context.Context, r *readline.Readline) []goprompt.Suggest

func (*Command) Description

func (c *Command) Description() string

func (*Command) Execute

func (c *Command) Execute(ctx context.Context, r *readline.Readline) error

func (*Command) Help

func (c *Command) Help(ctx context.Context, r *readline.Readline) string

func (*Command) Name

func (c *Command) Name() string

type CommandOption

type CommandOption func(*Command)

type Config

type Config struct {
	Credentials map[string]onepassword.Secret `json:"credentials" yaml:"credentials"`
}

func (Config) Credential

func (c Config) Credential(name string) (onepassword.Secret, bool)

func (Config) CredentialNames

func (c Config) CredentialNames() []string

type Option

type Option func(*Zip) error

func WithConfigKey

func WithConfigKey(v string) Option

type Zip

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

func New

func New(l log.Logger, op *onepassword.OnePassword, opts ...Option) (*Zip, error)

func (*Zip) Config

func (c *Zip) Config() Config

func (*Zip) Create

func (c *Zip) Create(ctx context.Context, filename string) error

func (*Zip) CreateWithPassword

func (c *Zip) CreateWithPassword(ctx context.Context, filename, credential string) error

func (*Zip) Extract

func (c *Zip) Extract(ctx context.Context, filename string) error

func (*Zip) ExtractWithPassword

func (c *Zip) ExtractWithPassword(ctx context.Context, filename, credential string) error

func (*Zip) GetCredentialPassword

func (c *Zip) GetCredentialPassword(ctx context.Context, name string) (string, error)

Jump to

Keyboard shortcuts

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