Documentation
¶
Index ¶
- Constants
- func ReplaceWildCards(endpoint string) string
- type APIImporter
- type APIImporterSource
- type BluePrintAST
- func (b *BluePrintAST) ConvertIntoApiVersion(asMock bool) (apidef.VersionInfo, error)
- func (b *BluePrintAST) InsertIntoAPIDefinitionAsVersion(version apidef.VersionInfo, def *apidef.APIDefinition, versionName string) error
- func (b *BluePrintAST) LoadFrom(r io.Reader) error
- func (b *BluePrintAST) ToAPIDefinition(orgID, upstreamURL string, asMock bool) (*apidef.APIDefinition, error)
- type DefinitionObjectAST
- type DefinitionObjectFormatAST
- type PathItemObject
- type PathMethodObject
- type ResponseCodeObjectAST
- type SwaggerAST
- func (s *SwaggerAST) ConvertIntoApiVersion(asMock bool) (apidef.VersionInfo, error)
- func (s *SwaggerAST) InsertIntoAPIDefinitionAsVersion(version apidef.VersionInfo, def *apidef.APIDefinition, versionName string) error
- func (s *SwaggerAST) LoadFrom(r io.Reader) error
- func (s *SwaggerAST) ToAPIDefinition(orgId, upstreamURL string, as_mock bool) (*apidef.APIDefinition, error)
- type WSDL
- type WSDLAddress
- type WSDLBinding
- type WSDLDef
- func (def *WSDLDef) ConvertIntoApiVersion(bool) (apidef.VersionInfo, error)
- func (def *WSDLDef) InsertIntoAPIDefinitionAsVersion(version apidef.VersionInfo, apidef *apidef.APIDefinition, versionName string) error
- func (s *WSDLDef) LoadFrom(r io.Reader) error
- func (*WSDLDef) SetServicePortMapping(input map[string]string)
- func (def *WSDLDef) ToAPIDefinition(orgId, upstreamURL string, as_mock bool) (*apidef.APIDefinition, error)
- func (def *WSDLDef) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- type WSDLOperation
- type WSDLPort
- type WSDLService
Constants ¶
View Source
const ( NS_WSDL20 = "http://www.w3.org/ns/wsdl" NS_WSDL = "http://schemas.xmlsoap.org/wsdl/" NS_SOAP = "http://schemas.xmlsoap.org/wsdl/soap/" NS_SOAP12 = "http://schemas.xmlsoap.org/wsdl/soap12/" NS_HTTP = "http://schemas.xmlsoap.org/wsdl/http/" )
View Source
const ( PROT_HTTP = "http" PROT_SOAP = "soap" PROT_SOAP_12 = "soap12" )
Variables ¶
This section is empty.
Functions ¶
func ReplaceWildCards ¶
Types ¶
type APIImporter ¶
type APIImporter interface {
LoadFrom(io.Reader) error
ConvertIntoApiVersion(bool) (apidef.VersionInfo, error)
InsertIntoAPIDefinitionAsVersion(apidef.VersionInfo, *apidef.APIDefinition, string) error
ToAPIDefinition(string, string, bool) (*apidef.APIDefinition, error)
}
func GetImporterForSource ¶
func GetImporterForSource(source APIImporterSource) (APIImporter, error)
type APIImporterSource ¶
type APIImporterSource string
const ApiaryBluePrint APIImporterSource = "blueprint"
const SwaggerSource APIImporterSource = "swagger"
const WSDLSource APIImporterSource = "wsdl"
type BluePrintAST ¶
type BluePrintAST struct {
Version string `json:"_version"`
Description string `json:"description"`
Metadata []struct {
Name string `json:"name"`
Value string `json:"value"`
} `json:"metadata"`
Name string `json:"name"`
ResourceGroups []struct {
Description string `json:"description"`
Name string `json:"name"`
Resources []struct {
Actions []struct {
Description string `json:"description"`
Examples []struct {
Description string `json:"description"`
Name string `json:"name"`
Requests []struct {
Body string `json:"body"`
Description string `json:"description"`
Headers []struct {
Name string `json:"name"`
Value string `json:"value"`
} `json:"headers"`
Name string `json:"name"`
Schema string `json:"schema"`
} `json:"requests"`
Responses []struct {
Body string `json:"body"`
Description string `json:"description"`
Headers []struct {
Name string `json:"name"`
Value string `json:"value"`
} `json:"headers"`
Name string `json:"name"`
Schema string `json:"schema"`
} `json:"responses"`
} `json:"examples"`
Method string `json:"method"`
Name string `json:"name"`
Parameters []struct {
Default string `json:"default"`
Description string `json:"description"`
Example string `json:"example"`
Name string `json:"name"`
Required bool `json:"required"`
Type string `json:"type"`
Values []struct {
Value string `json:"value"`
} `json:"values"`
} `json:"parameters"`
} `json:"actions"`
Description string `json:"description"`
Model struct {
Body string `json:"body"`
Description string `json:"description"`
Headers []struct {
Name string `json:"name"`
Value string `json:"value"`
} `json:"headers"`
Name string `json:"name"`
Schema string `json:"schema"`
} `json:"model"`
Name string `json:"name"`
Parameters []struct {
Default string `json:"default"`
Description string `json:"description"`
Example string `json:"example"`
Name string `json:"name"`
Required bool `json:"required"`
Type string `json:"type"`
Values []struct {
Value string `json:"value"`
} `json:"values"`
} `json:"parameters"`
UriTemplate string `json:"uriTemplate"`
} `json:"resources"`
} `json:"resourceGroups"`
}
func (*BluePrintAST) ConvertIntoApiVersion ¶
func (b *BluePrintAST) ConvertIntoApiVersion(asMock bool) (apidef.VersionInfo, error)
func (*BluePrintAST) InsertIntoAPIDefinitionAsVersion ¶
func (b *BluePrintAST) InsertIntoAPIDefinitionAsVersion(version apidef.VersionInfo, def *apidef.APIDefinition, versionName string) error
func (*BluePrintAST) ToAPIDefinition ¶
func (b *BluePrintAST) ToAPIDefinition(orgID, upstreamURL string, asMock bool) (*apidef.APIDefinition, error)
type DefinitionObjectAST ¶
type DefinitionObjectAST struct {
Type string `json:"type"`
Required []string `json:"required"`
Properties map[string]DefinitionObjectFormatAST `json:"properties"`
}
type PathItemObject ¶
type PathItemObject struct {
Get PathMethodObject `json:"get"`
Put PathMethodObject `json:"put"`
Post PathMethodObject `json:"post"`
Patch PathMethodObject `json:"patch"`
Options PathMethodObject `json:"options"`
Delete PathMethodObject `json:"delete"`
Head PathMethodObject `json:"head"`
}
type PathMethodObject ¶
type PathMethodObject struct {
Description string `json:"description"`
OperationID string `json:"operationId"`
Responses map[string]ResponseCodeObjectAST `json:"responses"`
}
type ResponseCodeObjectAST ¶
type SwaggerAST ¶
type SwaggerAST struct {
BasePath string `json:"basePath"`
Consumes []string `json:"consumes"`
Definitions map[string]DefinitionObjectAST `json:"definitions"`
Host string `json:"host"`
Info struct {
Contact struct {
Email string `json:"email"`
Name string `json:"name"`
URL string `json:"url"`
} `json:"contact"`
Description string `json:"description"`
License struct {
Name string `json:"name"`
URL string `json:"url"`
} `json:"license"`
TermsOfService string `json:"termsOfService"`
Title string `json:"title"`
Version string `json:"version"`
} `json:"info"`
Paths map[string]PathItemObject `json:"paths"`
Produces []string `json:"produces"`
Schemes []string `json:"schemes"`
Swagger string `json:"swagger"`
}
func (*SwaggerAST) ConvertIntoApiVersion ¶
func (s *SwaggerAST) ConvertIntoApiVersion(asMock bool) (apidef.VersionInfo, error)
func (*SwaggerAST) InsertIntoAPIDefinitionAsVersion ¶
func (s *SwaggerAST) InsertIntoAPIDefinitionAsVersion(version apidef.VersionInfo, def *apidef.APIDefinition, versionName string) error
func (*SwaggerAST) ToAPIDefinition ¶
func (s *SwaggerAST) ToAPIDefinition(orgId, upstreamURL string, as_mock bool) (*apidef.APIDefinition, error)
type WSDL ¶
type WSDL struct {
Services []*WSDLService `xml:"http://schemas.xmlsoap.org/wsdl/ service"`
Bindings []*WSDLBinding `xml:"http://schemas.xmlsoap.org/wsdl/ binding"`
}
type WSDLAddress ¶
type WSDLAddress struct {
Location string `xml:"location,attr"`
}
type WSDLBinding ¶
type WSDLBinding struct {
Name string `xml:"name,attr"`
Operations []*WSDLOperation `xml:"http://schemas.xmlsoap.org/wsdl/ operation"`
Protocol string
Method string
// contains filtered or unexported fields
}
func (*WSDLBinding) UnmarshalXML ¶
func (b *WSDLBinding) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type WSDLDef ¶
type WSDLDef struct {
Definition WSDL `xml:"http://schemas.xmlsoap.org/wsdl/ definitions"`
}
func (*WSDLDef) ConvertIntoApiVersion ¶
func (def *WSDLDef) ConvertIntoApiVersion(bool) (apidef.VersionInfo, error)
func (*WSDLDef) InsertIntoAPIDefinitionAsVersion ¶
func (def *WSDLDef) InsertIntoAPIDefinitionAsVersion(version apidef.VersionInfo, apidef *apidef.APIDefinition, versionName string) error
func (*WSDLDef) SetServicePortMapping ¶
func (*WSDLDef) ToAPIDefinition ¶
func (*WSDLDef) UnmarshalXML ¶
type WSDLOperation ¶
func (*WSDLOperation) UnmarshalXML ¶
func (op *WSDLOperation) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type WSDLPort ¶
type WSDLPort struct {
Name string `xml:"name,attr"`
Binding string `xml:"binding,attr"`
Address WSDLAddress `xml:"address"`
}
type WSDLService ¶
Click to show internal directories.
Click to hide internal directories.