parser

package
v0.0.0-...-732d522 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateXML

func CreateXML(plugin *Plugin, filename string) error

CreateXML ...

func Tokenize

func Tokenize(content string) []string

Types

type Action

type Action struct {
	AndroidName string `xml:"name,attr"`
}

Action ...

type Category

type Category struct {
	AndroidName string `xml:"name,attr"`
}

Category ...

type Clobbers

type Clobbers struct {
	Target string `xml:"target,attr,omitempty"`
}

Clobbers ...

type ConfigFile

type ConfigFile struct {
	Target          string           `xml:"target,attr,omitempty"`
	Parent          string           `xml:"parent,attr,omitempty"`
	UsesPermissions []UsesPermission `xml:"uses-permission"`
	Receivers       []Receiver       `xml:"receiver"`
	Metadata        *Metadata        `xml:"meta-data,omitempty"`
	Services        []Service        `xml:"service"`
	Features        []Feature        `xml:"feature"`
}

ConfigFile ...

type Data

type Data struct {
	AndroidScheme string `xml:"scheme,attr"`
}

Data ...

type Engine

type Engine struct {
	Name    string `xml:"name,attr"`
	Version string `xml:"version,attr,utf-8"`
}

Engine ...

type Engines

type Engines struct {
	Engine []Engine `xml:"engine"`
}

Engines ...

type Feature

type Feature struct {
	Name   string  `xml:"name,attr,omitempty"`
	Params []Param `xml:"param"`
}

Feature ...

type Framework

type Framework struct {
	Src    string `xml:"src,attr"`
	Custom bool   `xml:"custom,attr,omitempty"`
	Type   string `xml:"type,attr,omitempty"`
}

Framework ...

type Hook

type Hook struct {
	Type string `xml:"type,attr"`
	Src  string `xml:"src,attr"`
}

Hook ...

type IntentFilter

type IntentFilter struct {
	Actions    []Action   `xml:"action"`
	Categories []Category `xml:"category"`
	Datas      []Data     `xml:"data"`
}

IntentFilter ...

type JSModule

type JSModule struct {
	Name     string    `xml:"name,attr"`
	Src      string    `xml:"src,attr"`
	Clobbers *Clobbers `xml:"clobbers,omitempty"`
}

JSModule ...

type Metadata

type Metadata struct {
	AndroidName  string `xml:"value,attr,omitempty"`
	AndroidValue string `xml:"name,attr,omitempty"`
}

Metadata ...

type Param

type Param struct {
	Name  string `xml:"name,attr,omitempty"`
	Value string `xml:"value,attr,omitempty"`
}

Param ...

type Platform

type Platform struct {
	Name        string       `xml:"name,attr"`
	Hooks       []Hook       `xml:"hook"`
	ConfigFiles []ConfigFile `xml:"config-file"`
	Frameworks  []Framework  `xml:"framework"`
	SourceFiles []SourceFile `xml:"source-file"`
}

Platform ...

func (*Platform) NewSourceFrom

func (p *Platform) NewSourceFrom(javaFiles []string)

NewSourceFrom ...

type Plugin

type Plugin struct {
	XMLName      xml.Name   `xml:"plugin"`
	ID           string     `xml:"id,attr"`
	Version      string     `xml:"version,attr"`
	Xmlns        string     `xml:"xmlns,attr"`
	XmlnsAndroid string     `xml:"android,attr"`
	Name         string     `xml:"name"`
	Description  string     `xml:"description"`
	License      string     `xml:"license,"`
	Keywords     string     `xml:"keywords"`
	Author       string     `xml:"author,omitempty"`
	Engines      *Engines   `xml:"engines,omitempty"`
	JsModule     []JSModule `xml:"js-module"`
	Platform     *Platform  `xml:"platform"`
}

Plugin ...

func ParseXML

func ParseXML(filename string) (*Plugin, error)

ParseXML ...

func (*Plugin) NewJsModulesFrom

func (p *Plugin) NewJsModulesFrom(jsFiles []string)

NewJsModulesFrom ...

type Receiver

type Receiver struct {
	AndroidName     string         `xml:"name,attr,omitempty"`
	AndroidEnabled  bool           `xml:"enabled,attr,omitempty"`
	AndroidExported bool           `xml:"exported,attr,omitempty"`
	IntentFilters   []IntentFilter `xml:"intent-filter"`
}

Receiver ...

type Service

type Service struct {
	AndroidName     string         `xml:"name,attr,omitempty"`
	AndroidExported bool           `xml:"exported,attr,omitempty"`
	IntentFilters   []IntentFilter `xml:"intent-filter"`
}

Service ...

type SourceFile

type SourceFile struct {
	Src       string `xml:"src,attr"`
	TargetDir string `xml:"target-dir,attr"`
}

SourceFile ...

type UsesPermission

type UsesPermission struct {
	AndroidName string `xml:"name,attr"`
}

UsesPermission ...

Jump to

Keyboard shortcuts

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