generator

package
v0.0.0-...-6e96200 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2017 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const Address string = "Address"

Address is an address

View Source
const Date string = "Date"

Date is a date

Variables

This section is empty.

Functions

func GetPackageName

func GetPackageName(directory, skipPrefix, skipSuffix string) (string, error)

GetPackageName finds the package name for the given directory

Types

type Auth

type Auth struct {
	Status string `xml:"status,attr"`
}

Auth includes status information about the authorization of a request

type Config

type Config struct {
	Scheme    string `default:"https"`
	Domain    string `default:"sandbox.openair.com"`
	Key       string `required:"true"`
	Namespace string `default:"default"`
	Company   string `required:"true"`
	User      string `required:"true"`
	Password  string `required:"true"`
}

Config is OpenAir configuration

type Element

type Element struct {
	XMLName xml.Name
	Element []Element `xml:",any"`
	Value   string    `xml:",chardata"`
}

Element contains an element

type OpenAirGenerator

type OpenAirGenerator interface {
	GenerateCommonFile()
	GenerateCommonTestFile()
	GenerateModelFiles()
}

OpenAirGenerator generates an API client for the OpenAir XML API

func New

func New(c Config, objectNames string, dir string, outputPrefix string, outputSuffix string) OpenAirGenerator

New creates a generator

type Read

type Read struct {
	XMLName xml.Name `xml:"Read"`
	Status  string   `xml:"status,attr"`
	Entity  Element  `xml:",any"`
}

Read is a container for OpenAir entities

type Response

type Response struct {
	XMLName xml.Name `xml:"response"`
	Auth    Auth     `xml:"Auth,omitempty"`
	Read    Read     `xml:"Read,omitempty"`
}

Response is a container for Auth and Read requests

Jump to

Keyboard shortcuts

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