opmsk

package module
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: MIT Imports: 7 Imported by: 0

README

opmsk

build

Mask 1Password CLI password using ANSI color.

cf. https://developer.1password.com/docs/cli/get-started/

Installation

brew install winebarrel/opmsk/opmsk

Usage

op item get <item> --format json | opmsk

Masked values are displayed when selected with the mouse.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mask

func Mask(in io.Reader, out io.Writer) error

Types

type Item

type Item struct {
	ID                    string        `json:"id"`
	Title                 string        `json:"title"`
	Tags                  []string      `json:"tags"`
	Version               int           `json:"version"`
	Vault                 ItemVault     `json:"vault"`
	Category              string        `json:"category"`
	LastEditedBy          string        `json:"last_edited_by"`
	CreatedAt             time.Time     `json:"created_at"`
	UpdatedAt             time.Time     `json:"updated_at"`
	AdditionalInformation string        `json:"additional_information"`
	Urls                  []ItemUrl     `json:"urls"`
	Sections              []ItemSection `json:"sections"`
	Fields                []ItemField   `json:"fields"`
}

type ItemField added in v0.3.1

type ItemField struct {
	ID    string  `json:"id"`
	Type  string  `json:"type"`
	Label *string `json:"label"`
	Value *string `json:"value"`
	TOTP  string  `json:"totp"`
}

type ItemSection

type ItemSection struct {
	ID    string `json:"id"`
	Label string `json:"label"`
}

type ItemUrl

type ItemUrl struct {
	Primary bool   `json:"primary"`
	Href    string `json:"href"`
}

type ItemVault

type ItemVault struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type OutputItem

type OutputItem struct {
	ID       string
	Title    string
	Vault    string
	Tags     string
	Category string
	Fields   []OutputItemField
	Urls     []string
}

type OutputItemField

type OutputItemField struct {
	Label  string
	Value  string
	Offset string
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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