items

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	Name  string  `toml:"name" json:"name"`
	Value string  `toml:"value,omitempty" json:"value,omitempty"`
	Dump  string  `toml:"dump,omitempty" json:"dump,omitempty"`
	Note  string  `toml:"note,omitempty" json:"note,omitempty"`
	Item  []*Item `toml:"Item,omitempty" json:"Item,omitempty"`
}

Item - item in Packets

func NewItem

func NewItem(name, value, note, dump string) *Item

NewItem returns Item instance

func NewItemDump

func NewItemDump(name, dump, note string) *Item

NewItemDump returns Item instance for dump

func (*Item) AddSub

func (i *Item) AddSub(a *Item)

AddSub add sub-item in item.

type Packets

type Packets struct {
	Packet []*Item
}

Packets - OpenPGP packets

func NewPackets

func NewPackets() *Packets

NewPackets returns NewPackets instance

func (*Packets) AddPacket

func (p *Packets) AddPacket(a *Item)

AddPacket add item in Packets.

func (*Packets) MarshalJSON

func (p *Packets) MarshalJSON() (string, error)

MarshalJSON returns JSON format string

func (*Packets) MarshalTOML

func (p *Packets) MarshalTOML() (string, error)

MarshalTOML returns TOML format string

Jump to

Keyboard shortcuts

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