Documentation
¶
Index ¶
- Constants
- func IsValidType(name string) bool
- type ActionFiles
- type ActionParams
- type ActionSchema
- type Call
- type CallInfo
- type Calls
- type Command
- type CommandArguments
- func (a *CommandArguments) GetAction() string
- func (a *CommandArguments) GetAttributes() map[string]string
- func (a *CommandArguments) GetCall() *CallInfo
- func (a *CommandArguments) GetCallee() (callee []string)
- func (a *CommandArguments) SetAction(name string)
- func (a *CommandArguments) SetCallee(callee []string)
- type CommandInfo
- type CommandMeta
- type CommandReply
- type CommandResult
- type EntitySchema
- type Error
- type Errors
- type Fallback
- type FallbackError
- type FallbackObject
- type FallbackRelation
- type FallbackSchema
- type FallbackValue
- type FieldSchema
- type File
- type FileSchema
- type Files
- type HTTPActionSchema
- type HTTPFileSchema
- type HTTPParamSchema
- type HTTPRequest
- type HTTPRequestData
- type HTTPResponse
- type HTTPSchema
- type Links
- type Mapping
- type Meta
- type ObjectFieldSchema
- type Param
- type ParamSchema
- type RelationSchema
- type Relations
- type Reply
- func (r *Reply) ForRequest() Reply
- func (r *Reply) ForResponse() Reply
- func (r *Reply) GetReturnValue() interface{}
- func (r *Reply) GetTransport() *Transport
- func (r *Reply) IsCommand() bool
- func (r *Reply) IsError() bool
- func (r *Reply) IsValid() bool
- func (r *Reply) SetResponse(code int, text string) Reply
- type ReturnSchema
- type Schema
- type ServiceData
- type ServiceVersion
- type Transaction
- type Transactions
- type Transport
- func (t *Transport) Clone() *Transport
- func (t *Transport) GetGateway() []string
- func (t *Transport) GetLevel() uint
- func (t *Transport) GetOrigin() []string
- func (t *Transport) HasCalls(service, version string) bool
- func (t *Transport) SetCall(service string, version string, action string, calleeService string, ...) error
- func (t *Transport) SetData(name, version, action string, data interface{})
- func (t *Transport) SetDeferCall(service string, version string, action string, calleeService string, ...)
- func (t *Transport) SetDownload(f *File) bool
- func (t *Transport) SetError(service, version, message string, code int, status string)
- func (t *Transport) SetLink(service, link, uri string)
- func (t *Transport) SetRelateMany(service, pk, remote string, fks []string)
- func (t *Transport) SetRelateManyRemote(service, pk, address, remote string, fks []string)
- func (t *Transport) SetRelateOne(service, pk, remote, fk string)
- func (t *Transport) SetRelateOneRemote(service, pk, address, remote, fk string)
- func (t *Transport) SetRemoteCall(address string, service string, version string, action string, ...)
- func (t *Transport) SetReply(r *Reply) *Transport
- func (t *Transport) SetReturn(value interface{}) bool
- func (t *Transport) SetTransaction(command, service, version, action, target string, params []Param)
- type TransportMeta
Constants ¶
const DefaultErrorMessage = "Unknown Error"
DefaultErrorMessage contains the default message to use for errors.
const DefaultErrorStatus = "500 Internal Server Error"
DefaultErrorStatus contains the default status to use for errors.
const HTTPResponseContentType = "text/plain"
HTTPResponseContentType defines the default HTTP content type to use for responses.
const HTTPResponseStatus = "200 OK"
HTTPResponseStatus defines the default HTTP status to use for responses.
const HTTPResponseVersion = "1.1"
HTTPResponseVersion defines the default HTTP version to use for responses.
const TransactionCommit = "commit"
TransactionCommit defines the command type for commit transactions.
const TransactionComplete = "complete"
TransactionComplete defines the command type for complete transactions.
const TransactionRollback = "rollback"
TransactionRollback defines the command type for rollback transactions.
const TypeArray = "array"
TypeArray defines the KUSANAGI type for array values.
const TypeBinary = "binary"
TypeBinary defines the KUSANAGI type for binary values.
const TypeBoolean = "boolean"
TypeBoolean defines the KUSANAGI type for boolean values.
const TypeFloat = "float"
TypeFloat defines the KUSANAGI type for float values.
const TypeInteger = "integer"
TypeInteger defines the KUSANAGI type for integer values.
const TypeNull = "null"
TypeNull defines the KUSANAGI type for null values.
const TypeObject = "object"
TypeObject defines the KUSANAGI type for object values.
const TypeString = "string"
TypeString defines the KUSANAGI type for string values.
Variables ¶
This section is empty.
Functions ¶
func IsValidType ¶
IsValidType check is a type name is supported by the framework.
Types ¶
type ActionFiles ¶
type ActionFiles []File
ActionFiles contains all the files sent to an action during a runtime call.
type ActionParams ¶
type ActionParams []Param
ActionParams contains all the parameters sent to an action during a runtime call.
type ActionSchema ¶
type ActionSchema struct { Timeout uint `json:"x"` EntityPath string `json:"e"` PathDelimiter string `json:"d"` Collection *bool `json:"c,omitempty"` Calls [][]string `json:"C,omitempty"` DeferredCalls [][]string `json:"dc,omitempty"` RemoteCalls [][]string `json:"rc,omitempty"` Fallback *FallbackSchema `json:"F,omitempty"` Deprecated *bool `json:"D,omitempty"` HTTP HTTPActionSchema `json:"h,omitempty"` Params map[string]ParamSchema `json:"p,omitempty"` Files map[string]FileSchema `json:"f,omitempty"` Entity *EntitySchema `json:"R,omitempty"` Relations []RelationSchema `json:"r,omitempty"` Return *ReturnSchema `json:"rv,omitempty"` Tags []string `json:"t,omitempty"` }
ActionSchema contains the schema definition for an action.
type Call ¶
type Call struct { Name string `json:"n"` Version string `json:"v"` Action string `json:"a"` Caller string `json:"C"` Duration uint `json:"D"` Gateway string `json:"g,omitempty"` Timeout uint `json:"x,omitempty"` Params []Param `json:"p,omitempty"` Files []File `json:"f,omitempty"` }
Call represents a call to a service.
type CallInfo ¶
type CallInfo struct { Service string `json:"s"` Version string `json:"v"` Action string `json:"a"` Params []Param `json:"p,omitempty"` }
CallInfo contains the information of the service to contact.
type Command ¶
type Command struct { Command CommandInfo `json:"c"` Meta CommandMeta `json:"m"` }
Command represents a framework command payload.
func NewCommand ¶
NewCommand creates a new command payload.
func (Command) GetAttributes ¶
GetAttributes returns the command attributes.
func (Command) GetRequestID ¶
GetRequestID returns the ID of the current request.
func (Command) GetResponse ¶
func (c Command) GetResponse() *HTTPResponse
GetResponse returns the HTTP response payload.
func (Command) GetTransport ¶
GetTransport returns the transport payload.
type CommandArguments ¶
type CommandArguments struct { // NOTE: "A" might contain the action name (string) or attributes (map[string]string) A interface{} `json:"a,omitempty"` // NOTE: "C" might contain the callee ([]string) or call info (map[string]interface{}) C interface{} `json:"c,omitempty"` Meta Meta `json:"m,omitempty"` Request *HTTPRequest `json:"r,omitempty"` Response *HTTPResponse `json:"R,omitempty"` Transport *Transport `json:"T,omitempty"` Params ActionParams `json:"p,omitempty"` // TODO: The specs seem to be wrong here Files ActionFiles `json:"f,omitempty"` Return interface{} `json:"rv,omitempty"` }
CommandArguments contains the arguments of the command. TODO: The specs need to fix the name clashes for "c" and "a" in the arguments.
func (*CommandArguments) GetAction ¶
func (a *CommandArguments) GetAction() string
GetAction returns the action name for the call.
func (*CommandArguments) GetAttributes ¶
func (a *CommandArguments) GetAttributes() map[string]string
GetAttributes returns the attributes for the command.
func (*CommandArguments) GetCall ¶
func (a *CommandArguments) GetCall() *CallInfo
GetCall returns the info for the call.
func (*CommandArguments) GetCallee ¶
func (a *CommandArguments) GetCallee() (callee []string)
GetCallee returns the callee service information.
func (*CommandArguments) SetAction ¶
func (a *CommandArguments) SetAction(name string)
SetAction sets the name of the action for the call.
func (*CommandArguments) SetCallee ¶
func (a *CommandArguments) SetCallee(callee []string)
SetCallee sets the calle service information.
type CommandInfo ¶
type CommandInfo struct { Name string `json:"n"` Arguments *CommandArguments `json:"a,omitempty"` }
CommandInfo contains the semantics of the command.
type CommandMeta ¶
type CommandMeta struct {
Scope string `json:"s"`
}
CommandMeta contains the meta-data associated with the command.
type CommandReply ¶
type CommandReply struct { Name string `json:"n"` Result CommandResult `json:"r"` }
CommandReply represents a successful reply to a command.
func (CommandReply) IsAction ¶
func (r CommandReply) IsAction() bool
IsAction checks if the reply is a service action reply.
func (CommandReply) IsRequest ¶
func (r CommandReply) IsRequest() bool
IsRequest checks if the reply is a middleware request reply.
func (CommandReply) IsResponse ¶
func (r CommandReply) IsResponse() bool
IsResponse checks if the reply is a middleware response reply.
type CommandResult ¶
type CommandResult struct { Attributes map[string]string `json:"a,omitempty"` Call *CallInfo `json:"c,omitempty"` Response *HTTPResponse `json:"R,omitempty"` Transport *Transport `json:"T,omitempty"` Return interface{} `json:"rv,omitempty"` }
CommandResult contains the result values of a command reply.
type EntitySchema ¶
type EntitySchema struct { Field []FieldSchema `json:"f,omitempty"` Fields []ObjectFieldSchema `json:"F,omitempty"` Name string `json:"n,omitempty"` Validate bool `json:"V,omitempty"` Primarykey string `json:"k,omitempty"` }
EntitySchema contains the schema for an entity definition.
type Error ¶
Error represents a reply that is returned when there is an error during command execution.
type Fallback ¶
type Fallback []interface{}
Fallback contains the triggered fallbacks.
func (Fallback) GetActionNames ¶
GetActionNames returns the list of action names where fallbacks were triggered.
func (Fallback) GetVersion ¶
GetVersion returns the service version.
type FallbackError ¶
type FallbackError []interface{}
FallbackError contains a fallback error.
func (FallbackError) GetCode ¶
func (e FallbackError) GetCode() (int, bool)
GetCode returns the error code.
func (FallbackError) GetMessage ¶
func (e FallbackError) GetMessage() (string, bool)
GetMessage returns the error message.
func (FallbackError) GetStatus ¶
func (e FallbackError) GetStatus() (string, bool)
GetStatus returns the status message of the errror.
type FallbackObject ¶
type FallbackObject map[string]FallbackValue
FallbackObject contains the fallback data objects
type FallbackRelation ¶
type FallbackRelation []interface{}
FallbackRelation contains the fallback relations.
func (FallbackRelation) GetForeignKey ¶
func (r FallbackRelation) GetForeignKey() (string, bool)
GetForeignKey returns the foreign key value for a "one-to-one" relation.
func (FallbackRelation) GetForeignKeys ¶
func (r FallbackRelation) GetForeignKeys() ([]string, bool)
GetForeignKeys returns the foreign key values for a "one-to-many" relation.
func (FallbackRelation) GetPrimaryKey ¶
func (r FallbackRelation) GetPrimaryKey() (string, bool)
GetPrimaryKey returns the value for the primary key.
func (FallbackRelation) GetRemoteService ¶
func (r FallbackRelation) GetRemoteService() (string, bool)
GetRemoteService returns the name of the remote service.
func (FallbackRelation) IsOneToMany ¶
func (r FallbackRelation) IsOneToMany() bool
IsOneToMany checks if the relation is a "one-to-many" relation.
type FallbackSchema ¶
type FallbackSchema struct { Properties map[string]string `json:"p,omitempty"` Data []FallbackObject `json:"d,omitempty"` Relations []FallbackRelation `json:"r,omitempty"` Links map[string]string `json:"l,omitempty"` Errors []FallbackError `json:"e,omitempty"` }
FallbackSchema contains the schema definition for the transport fallback.
type FallbackValue ¶
type FallbackValue struct { Type string `json:"t,omitempty"` Value interface{} `json:"v,omitempty"` Items []FallbackValue `json:"i,omitempty"` }
FallbackValue contains the value(s) and type of a fallback object.
"Value" contains the value when the type is not array, otherwise the values are stored in the "Items" property.
func (FallbackValue) GetItems ¶
func (v FallbackValue) GetItems() ([]FallbackValue, bool)
GetItems returns the fallback values when the type is array.
func (FallbackValue) GetType ¶
func (v FallbackValue) GetType() string
GetType returns the value type.
func (FallbackValue) GetValue ¶
func (v FallbackValue) GetValue() (interface{}, bool)
GetValue returns the fallback value when the type is not array.
func (FallbackValue) IsArray ¶
func (v FallbackValue) IsArray() bool
IsArray checks that the value type is an array.
type FieldSchema ¶
type FieldSchema struct { Name string `json:"n"` Type string `json:"t"` Optional bool `json:"o,omitempty"` }
FieldSchema contains the schema for an entity field.
type File ¶
type File struct { Name string `json:"n"` Path string `json:"p"` Mime string `json:"m"` Filename string `json:"f"` Size uint `json:"s"` Token string `json:"t,omitempty"` }
File represents a file parameter.
type FileSchema ¶
type FileSchema struct { Mime string `json:"m,omitempty"` Required bool `json:"r,omitempty"` Max uint `json:"mx,omitempty"` ExclusiveMax bool `json:"ex,omitempty"` Min uint `json:"mn,omitempty"` ExclusiveMin bool `json:"en,omitempty"` HTTP HTTPFileSchema `json:"h,omitempty"` }
FileSchema contains the schema definition of action file.
type HTTPActionSchema ¶
type HTTPActionSchema struct { Gateway *bool `json:"g,omitempty"` Path string `json:"p,omitempty"` Method string `json:"m,omitempty"` Input string `json:"i,omitempty"` Body []string `json:"b,omitempty"` }
HTTPActionSchema contains the HTTP schema definition for the action.
type HTTPFileSchema ¶
HTTPFileSchema contains the HTTP schema definition for a file.
type HTTPParamSchema ¶
type HTTPParamSchema struct { Gateway *bool `json:"g,omitempty"` Input string `json:"i,omitempty"` Param string `json:"p,omitempty"` }
HTTPParamSchema contains the HTTP schema definition for a parameter.
type HTTPRequest ¶
type HTTPRequest struct { Version string `json:"v"` Method string `json:"m"` URL string `json:"u"` Query HTTPRequestData `json:"q"` PostData HTTPRequestData `json:"p"` Headers http.Header `json:"h"` Body []byte `json:"b"` Files []File `json:"f"` }
HTTPRequest represents the semantics of an HTTP request.
type HTTPRequestData ¶
HTTPRequestData contains data sent in a request.
type HTTPResponse ¶
type HTTPResponse struct { Version string `json:"v"` Status string `json:"s"` Headers http.Header `json:"h"` Body []byte `json:"b"` }
HTTPResponse represents the semantics of an HTTP response.
func NewHTTPResponse ¶
func NewHTTPResponse() *HTTPResponse
NewHTTPResponse creates a new HTTP response payload.
func (HTTPResponse) GetHeaders ¶
func (r HTTPResponse) GetHeaders() http.Header
GetHeaders returns the HTTP headers of the response.
func (HTTPResponse) GetStatus ¶
func (r HTTPResponse) GetStatus() string
GetStatus returns the HTTP status code and text of the response.
func (HTTPResponse) GetVersion ¶
func (r HTTPResponse) GetVersion() string
GetVersion returns the HTTP version of the response.
type HTTPSchema ¶
HTTPSchema contains the HTTP schema definitions for a service.
func (HTTPSchema) GetBasePath ¶
func (h HTTPSchema) GetBasePath() string
GetBasePath returns the base path for the service.
func (HTTPSchema) GetGateway ¶
func (h HTTPSchema) GetGateway() bool
GetGateway returns the service availability thought the gateway.
type Mapping ¶
Mapping contains the schemas for the different services.
func (Mapping) GetSchema ¶
GetSchema returns a schema for a service. The version can be either a fixed version or a pattern that uses "*" and resolves to the higher version available that matches.
name: The name of the service. version: The version of the service.
func (Mapping) GetServices ¶
func (m Mapping) GetServices() (services []ServiceVersion)
GetServices returns the name and version of all the services in the mapping.
func (Mapping) GetVersions ¶
GetVersions returns the versions for a services that are available in the mappings.
name: The name of the service.
type Meta ¶
type Meta struct { Version string `json:"v"` ID string `json:"i"` Datetime string `json:"d"` Type uint `json:"t"` Protocol string `json:"p"` Gateway []string `json:"g"` Client string `json:"c"` Attributes map[string]string `json:"a,omitempty"` }
Meta contains the meta-data associated with the payload.
func (Meta) GetGateway ¶
GetGateway returns the gateway addresses.
The result contains two items, where the first item is the internal address and the second is the public address.
type ObjectFieldSchema ¶
type ObjectFieldSchema struct { Name string `json:"n"` Field []FieldSchema `json:"f,omitempty"` Fields []ObjectFieldSchema `json:"F,omitempty"` Optional bool `json:"o,omitempty"` }
ObjectFieldSchema contains the schema for an entity object field.
type Param ¶
type Param struct { Name string `json:"n"` Value interface{} `json:"v,omitempty"` Type string `json:"t,omitempty"` }
Param represents an action param.
type ParamSchema ¶
type ParamSchema struct { Name string `json:"n"` Type string `json:"t,omitempty"` Format string `json:"f,omitempty"` ArrayFormat string `json:"af,omitempty"` Pattern string `json:"p,omitempty"` AllowEmpty bool `json:"e,omitempty"` DefaultValue interface{} `json:"d,omitempty"` Required bool `json:"r,omitempty"` Items map[string]interface{} `json:"i,omitempty"` Max *int `json:"mx,omitempty"` ExclusiveMax bool `json:"ex,omitempty"` Min *int `json:"mn,omitempty"` ExclusiveMin bool `json:"en,omitempty"` MaxItems int `json:"xi,omitempty"` MinItems *int `json:"ni,omitempty"` UniqueItems bool `json:"ui,omitempty"` Enum []interface{} `json:"em,omitempty"` MultipleOf int `json:"mo,omitempty"` HTTP HTTPParamSchema `json:"h,omitempty"` }
ParamSchema contains the schema definition of action parameters.
type RelationSchema ¶
RelationSchema contains the schema for a relation.
type Reply ¶
type Reply struct { Error *Error `json:"E,omitempty"` Command *CommandReply `json:"cr,omitempty"` }
Reply represents a generic reply to a framework command.
func NewActionReply ¶
NewActionReply creates a new command reply for a service call.
func NewRequestReply ¶
NewRequestReply creates a new command reply for a request.
func NewResponseReply ¶
NewResponseReply creates a new command reply for a response.
func (*Reply) ForRequest ¶
ForRequest prepares the reply for a request middleware.
func (*Reply) ForResponse ¶
ForResponse prepares the reply for a response middleware.
func (*Reply) GetReturnValue ¶
func (r *Reply) GetReturnValue() interface{}
GetReturnValue returns the return value for the reply.
func (*Reply) GetTransport ¶
GetTransport returns the transport for the reply.
type ReturnSchema ¶
ReturnSchema contains the schema for the return value.
type Schema ¶
type Schema struct { Address string `json:"a"` Files *bool `json:"f,omitempty"` HTTP HTTPSchema `json:"h"` Actions map[string]ActionSchema `json:"ac"` }
Schema contains the schema definitions for a service.
func (Schema) GetAddress ¶
GetAddress returns the internal address of the host.
type ServiceData ¶
ServiceData contains the transport data of the called services.
type ServiceVersion ¶
ServiceVersion contains the name and version of a service.
type Transaction ¶
type Transaction struct { Name string `json:"n"` Version string `json:"v"` Action string `json:"a"` Caller string `json:"C"` Params []Param `json:"p,omitempty"` }
Transaction represents a transaction object.
type Transactions ¶
type Transactions map[string][]Transaction
Transactions contains the transport transactions.
func (Transactions) Get ¶
func (t Transactions) Get(command string) (trx []Transaction)
Get the transactions for a comman type.
type Transport ¶
type Transport struct { Meta TransportMeta `json:"m"` Body *File `json:"b,omitempty"` Files *Files `json:"f,omitempty"` Data *ServiceData `json:"d,omitempty"` Relations *Relations `json:"r,omitempty"` Links *Links `json:"l,omitempty"` Transactions *Transactions `json:"t,omitempty"` Calls *Calls `json:"C,omitempty"` Errors *Errors `json:"e,omitempty"` // contains filtered or unexported fields }
Transport contains the transport payload data.
func (*Transport) Clone ¶
Clone creates a clone of the transport.
The returned transport won't keep references to the original transport values.
func (*Transport) GetGateway ¶
GetGateway returns the gateway addresses.
The result contains two items, where the first item is the internal address and the second is the public address.
func (*Transport) GetOrigin ¶
GetOrigin returns the origin service.
The result contains three items, where the first item is service name, the second is the version and the third is the action name.
func (*Transport) HasCalls ¶
HasCalls checks if there are any type of calls registered for a Service.
service: The name of the Service. version: The version of the Service.
func (*Transport) SetCall ¶
func (t *Transport) SetCall( service string, version string, action string, calleeService string, calleeVersion string, calleeAction string, duration uint, params []Param, files []File, timeout uint, transport *Transport, ) error
SetCall adds a run-time call.
Current transport payload is used when the optional transport is not given.
service: The name of the Service. version: The version of the Service. action: The name of the action making the call. callee_service: The called service. callee_version: The called version. callee_action: The called action. duration: The call duration. params: Optional parameters to send. files: Optional files to send. timeout: Optional timeout for the call. transport: Optional transport payload.
func (*Transport) SetData ¶
SetData add data from a call to the transport payload.
When there is existing data in the payload it is not removed. The new data is appended to the existing data in that case.
name: The name of the Service. version: The version of the Service. action: The name of the action. data: The data to add.
func (*Transport) SetDeferCall ¶
func (t *Transport) SetDeferCall( service string, version string, action string, calleeService string, calleeVersion string, calleeAction string, params []Param, files []File, )
SetDeferCall adds a deferred call.
service: The name of the Service. version: The version of the Service. action: The name of the action making the call. callee_service: The called service. callee_version: The called version. callee_action: The called action. params: Optional parameters to send. files: Optional files to send.
func (*Transport) SetDownload ¶
SetDownload assigns a file to the body.
file: The file to use as download content.
func (*Transport) SetError ¶
SetError adds a service error.
service: The name of the Service. version: The version of the Service. message: The error message. code: The error code. status: The status message for the protocol.
func (*Transport) SetLink ¶
SetLink adds a link.
service: The name of the Service. link: The link name. uri: The URI for the link.
func (*Transport) SetRelateMany ¶
SetRelateMany adds a "many-to-many" relation.
service: The name of the local service. pk: The primary key of the local entity. remote: The name of the remote service. fks: The primary keys of the remote entity.
func (*Transport) SetRelateManyRemote ¶
SetRelateManyRemote adds a remote "many-to-many" relation.
service: The name of the local service. pk: The primary key of the local entity. address: The address of the remote gateway. remote: The name of the remote service. fks: The primary keys of the remote entity.
func (*Transport) SetRelateOne ¶
SetRelateOne adds a "one-to-one" relation.
service: The name of the local service. pk: The primary key of the local entity. remote: The name of the remote service. fk: The primary key of the remote entity.
func (*Transport) SetRelateOneRemote ¶
SetRelateOneRemote adds a remote "one-to-one" relation.
service: The name of the local service. pk: The primary key of the local entity. address: The address of the remote gateway. remote: The name of the remote service. fk: The primary key of the remote entity.
func (*Transport) SetRemoteCall ¶
func (t *Transport) SetRemoteCall( address string, service string, version string, action string, calleeService string, calleeVersion string, calleeAction string, timeout uint, params []Param, files []File, )
SetRemoteCall adds a run-time call.
Current transport payload is used when the optional transport is not given.
address: The address of the remote Gateway. service: The name of the Service. version: The version of the Service. action: The name of the action making the call. callee_service: The called service. callee_version: The called version. callee_action: The called action. timeout: Optional timeout for the call. params: Optional parameters to send. files: Optional files to send.
func (*Transport) SetReturn ¶
SetReturn assigns the return value of an action.
value: The value to use as return value in the payload.
func (*Transport) SetTransaction ¶
func (t *Transport) SetTransaction(command, service, version, action, target string, params []Param)
SetTransaction adds a transaction to be called when the request succeeds.
command: The type of transaction. service: The name of the Service. version: The version of the Service. action: The name of the origin action. target: The name of the target action. params: Optional parameters for the transaction.
type TransportMeta ¶
type TransportMeta struct { ID string `json:"i"` Version string `json:"v"` Datetime string `json:"d"` StartTime string `json:"s"` EndTime string `json:"e"` Duration uint `json:"D,omitempty"` Gateway []string `json:"g"` Origin []string `json:"o"` Level uint `json:"l"` Properties map[string]string `json:"p,omitempty"` Fallbacks []Fallback `json:"F,omitempty"` }
TransportMeta contains the metadata of the transport.