model

package
v3.19.6 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OPAccount

type OPAccount struct {
	ID string `json:"id"`
}

OPAccount represents an Account.

func ParseAccount

func ParseAccount(jsonItem string) (*OPAccount, error)

ParseAccount will parse an account from JSON.

type OPField

type OPField struct {
	ID    string `json:"id"`
	Type  string `json:"type"`
	Label string `json:"label,omitempty"`
	Value string `json:"value,omitempty"`
}

OPField represents a Field.

type OPItem

type OPItem struct {
	ID       string     `json:"id,omitempty"`
	Vault    *OPVault   `json:"vault,omitempty"`
	Title    string     `json:"title"`
	Category string     `json:"category"`
	Fields   []*OPField `json:"fields"`
	Tags     []string   `json:"tags"`
	URLs     []*OPURL   `json:"urls"`
}

OPItem represents an Item.

func ParseItem

func ParseItem(jsonItem string) (*OPItem, error)

ParseItem will parse an item from JSON.

func (c *OPItem) ShareLink(accountID string) string

type OPURL

type OPURL struct {
	Primary bool   `json:"primary"`
	HRef    string `json:"href"`
}

OPURL represents a URL.

type OPVault

type OPVault struct {
	ID string `json:"id"`
}

OPVault represents a Vault.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳