cmd

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetJSON added in v0.0.2

func GetJSON(boxList *List, outData *[]byte) error

func GetXML added in v0.0.2

func GetXML(boxList *List, outData *[]byte) error

func GetYAML added in v0.0.2

func GetYAML(boxList *List, outData *[]byte) error

func ParseXML

func ParseXML(data []byte, boxList *List) error

func ReadXML

func ReadXML(file string, textData *[]byte) error

func WriteToFile added in v0.0.2

func WriteToFile(outData *[]byte, file string) error

Types

type Address

type Address struct {
	XMLName      xml.Name `xml:"address" json:"-" yaml:"-"`
	Code         int      `xml:"code,omitempty" json:"code,omitempty" yaml:"code,omitempty"`
	City         string   `xml:"city,omitempty" json:"city,omitempty" yaml:"city,omitempty"`
	District     string   `xml:"district,omitempty" json:"district,omitempty" yaml:"district,omitempty"`
	Street       string   `xml:"street,omitempty" json:"street,omitempty" yaml:"street,omitempty"`
	Cp           string   `xml:"cp,omitempty" json:"cp,omitempty" yaml:"cp,omitempty"`
	Co           string   `xml:"co,omitempty" json:"co,omitempty" yaml:"co,omitempty"`
	Ce           string   `xml:"ce,omitempty" json:"ce,omitempty" yaml:"ce,omitempty"`
	Zip          string   `xml:"zip,omitempty" json:"zip,omitempty" yaml:"zip,omitempty"`
	Region       string   `xml:"region,omitempty" json:"region,omitempty" yaml:"region,omitempty"`
	AddressPoint int      `xml:"addressPoint,omitempty" json:"addressPoint,omitempty" yaml:"addressPoint,omitempty"`
	State        string   `xml:"state,omitempty" json:"state,omitempty" yaml:"state,omitempty"`
	FullAddress  string   `xml:"fullAddress,omitempty" json:"fullAddress,omitempty" yaml:"fullAddress,omitempty"`
}

type Box

type Box struct {
	XMLName   xml.Name  `xml:"box" json:"-" yaml:"-"`
	ID        string    `xml:"id,omitempty" json:"id,omitempty" yaml:"id,omitempty"`
	Type      string    `xml:"type,omitempty" json:"type,omitempty" yaml:"type,omitempty"`
	Subtype   int       `xml:"subtype,omitempt" json:"subtype,omitempty" yaml:"subtype,omitempty"`
	Name      Name      `xml:"name" json:"name" yaml:"name"`
	Ico       string    `xml:"ico,omitempty" json:"ico,omitempty" yaml:"ico,omitempty"`
	Address   Address   `xml:"address" json:"address" yaml:"address"`
	Pdz       bool      `xml:"pdz,omitempty" json:"pdz,omitempty" yaml:"pdz,omitempty"`
	Ovm       bool      `xml:"ovm,omitempty" json:"ovm,omitempty" yaml:"ovm,omitempty"`
	Hierarchy Hierarchy `xml:"hierarchy" json:"hierarchy" yaml:"hierarchy"`
	IdOVM     string    `xml:"idOVM,omitempty" json:"idOVM,omitempty" yaml:"idOVM,omitempty"`
}

type Datbox

type Datbox struct {
	Format     string
	OutputFile string
}

func (*Datbox) CobraCommand

func (d *Datbox) CobraCommand() *cobra.Command

rootCmd represents the base command when called without any subcommands

func (*Datbox) Run

func (d *Datbox) Run(cmd *cobra.Command, args []string)

type Hierarchy

type Hierarchy struct {
	XMLName  xml.Name `xml:"hierarchy" json:"-" yaml:"-"`
	IsMaster bool     `xml:"isMaster" json:"isMaster" yaml:"isMaster"`
	MasterId string   `xml:"masterId,omitempty" json:"masterId,omitempty" yaml:"masterId,omitempty"`
}

type List

type List struct {
	XMLName      xml.Name `xml:"list" json:"-" yaml:"-"`
	XmlNS        string   `xml:"xmlns,attr,omitempty" json:"-" yaml:"-"`
	SourceSystem string   `xml:"source-system,attr,omitempty" json:"-" yaml:"-"`
	Items        []Box    `xml:"box,omitempty" json:"box,omitempty" yaml:"box,omitempty"`
}

type Name

type Name struct {
	XMLName   xml.Name `xml:"name" json:"-" yaml:"-"`
	Person    Person   `xml:"person,omitempty" json:"person,omitempty" yaml:"person,omitempty"`
	TradeName string   `xml:"tradeName,omitempty" json:"tradeName,omitempty" yaml:"tradeName,omitempty"`
}

type Person

type Person struct {
	XMLName         xml.Name `xml:"person" json:"-" yaml:"-"`
	FirstName       string   `xml:"firstName" json:"firstName" yaml:"firstName"`
	LastName        string   `xml:"lastName" json:"lastName" yaml:"lastName"`
	MiddleName      string   `xml:"middleName,omitempty" yaml:"middleName,omitempty" yaml:"middleName,omitempty"`
	LastNameAtBirth string   `xml:"lastNameAtBirth,omitempty" yaml:"lastNameAtBirth,omitempty" yaml:"lastNameAtBirth,omitempty"`
}

Jump to

Keyboard shortcuts

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