Advertisement
OvidiuS

Mapping envelope golang

Sep 14th, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 1.56 KB | None | 0 0
  1. package data
  2.  
  3. type DataFormat struct  {
  4.     Header struct { }
  5.     Body struct {
  6.         Message struct {
  7.             MessageType string `xml:"MessageType" json:"MessageType"`
  8.             Version string `xml:"Version" json:"Version"`
  9.             ProcessHeader struct {
  10.                 ExecutionPlan struct {
  11.                     Version string `xml:"Version" json:"Version"`
  12.                     Name string `xml:"Name" json:"Name"`
  13.                     ProcessTrackingLevel string `xml:"ProcessTrackingLevel" json:"ProcessTrackingLevel"`
  14.                     TaskList TaskList `xml:"taskList" json:"taskList"`
  15.                 }
  16.             }
  17.         }
  18.     }
  19. }
  20.  
  21. type TaskList struct {
  22.     Task []Task `xml:"task" json:"task"`
  23. }
  24.  
  25. type Task struct {
  26.     Invoke Invoke `xml:"invoke" json:"invoke"`
  27. }
  28.  
  29. type Invoke struct {
  30.     TaskDomain string `xml:"taskDomain,attr" json:"taskDomain"`
  31.     TaskName string `xml:"taskName,attr" json:"taskName"`
  32.     Mep string `xml:"mep,attr" json:"mep"`
  33.     ServiceTask ServiceTask `xml:"serviceTask" json:"serviceTask"`
  34. }
  35.  
  36. type ServiceTask struct {
  37.     TaskSteps []TaskSteps `xml:"taskSteps" json:"taskSteps"`
  38. }
  39.  
  40. type TaskSteps struct {
  41.     Flow string `xml:"flow,attr" json:"flow"`
  42.     Technology string `xml:"technology,attr" json:"technology"`
  43.     Invoke InvokeSteps `xml:"invoke" json:"invoke"`
  44.     Transform Transform `xml:"transform" json:"transform"`
  45. }
  46.  
  47. type InvokeSteps struct {
  48.     SystemName string `xml:"systemName,attr" json:"systemName"`
  49.     Protocol string `xml:"protocol,attr" json:"protocol"`
  50.     Endpoint string `xml:"endpoint,attr" json:"endpoint"`
  51. }
  52.  
  53. type Transform struct {
  54.     Location string `xml:"location,attr" json:"location"`
  55.     Type string `xml:"type,attr" json:"type"`
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement