class Register(Context): ''' The register context. ''' # ---------------------------------------------------------------- Defined services = defines(Iterable, doc=''' @rtype: Iterable(class) The classes that implement service APIs. ''') exclude = defines(set, doc=''' @rtype: set(object) The invoker identifiers that dictate the invokers to be excluded from the process. This is set gets updated whenever there is a problem invoker and in the case the chain is no fully consumed another try is made with this exclusion set. ''') doSuggest = defines(IDo, doc=''' @rtype: callable(*args) The suggest logger to be used for registration. ''')
class ResponseContent(Context): ''' The response context. ''' # ---------------------------------------------------------------- Defined source = defines(IInputStream, doc=''' @rtype: IInputStream The stream that provides the response content in bytes. ''') length = defines(int, doc=''' @rtype: integer Contains the length for the content. ''') type = defines(str, doc=''' @rtype: string The type for the streamed content. ''') charSet = defines(str, doc=''' @rtype: string The char set encoding for streamed content. ''')
class Request(Context): ''' The request context. ''' # ---------------------------------------------------------------- Defined repository = defines(IRepository, doc=''' @rtype: IRepository The repository to be used for finding matches. ''') # ---------------------------------------------------------------- Required clientIP = requires(str)
class Response(Coded): ''' The response context. ''' # ---------------------------------------------------------------- Defined errorInput = defines(InputError, doc=''' @rtype: InputError The input error translated from SQL alchemy error. ''') # ---------------------------------------------------------------- Optional isSuccess = optional(bool)
class Create(Context): ''' The create encoder context. ''' # ---------------------------------------------------------------- Defined encoder = defines(ITransfrom, doc=''' @rtype: ITransfrom The encoder for the property. ''') # ---------------------------------------------------------------- Required name = requires(str) objType = requires(Type)
class NodeInvoker(Context): ''' The node context. ''' # ---------------------------------------------------------------- Defined parent = defines(Context, doc=''' @rtype: Context The parent node. ''') invokers = defines(dict, doc=''' @rtype: dictionary{string: Context} The invokers indexed by the HTTP method name. ''') conflicts = defines(dict, doc=''' @rtype: dictionary{string: list[Context]} The invokers indexed by the HTTP method name that conflict with the invoker associated with the method in 'invokers'. ''') child = defines(Context, doc=''' @rtype: Context The direct child node for a user input value. ''') childByName = defines(dict, doc=''' @rtype: dictionary{string: Context} The child nodes indexed by name. ''') type = defines(Type, doc=''' @rtype: Type The type represented by the child node. ''')
class Decoding(Context): ''' The model decoding context. ''' # ---------------------------------------------------------------- Defined name = defines(str, doc=''' @rtype: string The decoder name. ''') parent = defines(Context, doc=''' @rtype: Context The parent decoding that this decoding is based on. ''') property = defines(TypeProperty, doc=''' @rtype: TypeProperty The property that represents the decoding. ''') children = defines(dict, doc=''' @rtype: dictionary{string: Context} The decoding children indexed by the decoding name. ''') doDecode = defines(IDo, doc=''' @rtype: callable(target, value) Decodes the value into the provided target. @param target: Context Target context object used for decoding. @param value: object The value to be decoded. ''') # ---------------------------------------------------------------- Optional isMandatory = optional(bool) # ---------------------------------------------------------------- Required type = requires(Type) doSet = requires(IDo) doGet = requires(IDo)
class Invoker(Context): ''' The invoker context. ''' # ---------------------------------------------------------------- Defined node = defines(Context, doc=''' @rtype: Context The invoker node. ''') # ---------------------------------------------------------------- Required path = requires(list) location = requires(str)
class Definition(Context): ''' The definition context. ''' # ---------------------------------------------------------------- Defined name = defines(str, doc=''' @rtype: string The definition name. ''') types = defines(list, doc=''' @rtype: list[Type] The definition types in the normal order of the appearance. ''') references = defines(list, doc=''' @rtype: list[Context] The definition references that directly linked with this definition. ''') # ---------------------------------------------------------------- Required category = requires(str)
class PermissionCompensate(Context): ''' The permission context. ''' # ---------------------------------------------------------------- Defined navigate = defines(str, doc=''' @rtype: string The navigate path. ''') # ---------------------------------------------------------------- Required access = requires(Access) filters = requires(dict)
class Element(Context): ''' The element context. ''' # ---------------------------------------------------------------- Defined node = defines(Context, doc=''' @rtype: Context The element node. ''') # ---------------------------------------------------------------- Required name = requires(str) property = requires(TypeProperty)
class Decoding(Context): ''' The decoding context. ''' # ---------------------------------------------------------------- Defined property = defines(TypeProperty, doc=''' @rtype: TypeProperty The option property that represents the decoding. ''') # ---------------------------------------------------------------- Required input = requires(Input) type = requires(Type)
class Solicit(Context): ''' The solicit context. ''' # ---------------------------------------------------------------- Defined repository = defines(Context, doc=''' @rtype: Context The parsed repository. ''') # ---------------------------------------------------------------- Required stream = requires(IInputStream) uri = requires(str)
class SolicitationFilter(Context): ''' The solicitation context. ''' # ---------------------------------------------------------------- Defined userId = defines(int, doc=''' @rtype: integer The id of the user to create gateways for. ''') method = defines(int, doc=''' @rtype: integer The method to get the permissions for. ''') types = defines(Iterable, doc=''' @rtype: Iterable(TypeAcl) The ACL types to get the permissions for. ''') # ---------------------------------------------------------------- Required permissions = requires(Iterable)
class Node(Context): ''' The node context. ''' # ---------------------------------------------------------------- Defined invokersGet = defines(dict, doc=''' @rtype: dictionary{TypeProperty: Context} The invokers contexts that can be used to get a model by a property model indexed by the property model that makes the invoker accessible based on the current node. ''') # ---------------------------------------------------------------- Required child = requires(Context) childByName = requires(dict) invokers = requires(dict)
class RequestContent(Context): ''' The request content context. ''' # ---------------------------------------------------------------- Defined source = defines(IInputStream) doContentReader = definesIf(IDo, doc=''' @rtype: callable(bytes) -> bytes|None The content reader callable used for pushing data from the asyncore read, returns True in order to get more data. Once the reader is finalized it will return either None or remaining bytes. ''') # ---------------------------------------------------------------- Required length = requires(int)
class RequestDecode(Context): ''' The request context. ''' # ---------------------------------------------------------------- Required headers = requires(dict) # ---------------------------------------------------------------- Optional parameters = optional(list) # ---------------------------------------------------------------- Defined decoderHeader = defines(IDecoderHeader, doc=''' @rtype: IDecoderHeader The decoder used for reading the request headers. ''')
class Create(Context): ''' The create encoder context. ''' # ---------------------------------------------------------------- Defined specifiers = defines(list, doc=''' @rtype: list[ISpecifier] The specifiers for attributes with the paths. ''') # ---------------------------------------------------------------- Optional encoder = optional(ITransfrom) # ---------------------------------------------------------------- Required objType = requires(Type)
class RequestContent(Context): ''' The request content context. ''' # ---------------------------------------------------------------- Required type = requires(str) charSet = requires(str) disposition = requires(str) dispositionAttr = requires(dict) source = requires(IInputStream) fetchNextContent = requires(Callable) previousContent = requires(object) # ---------------------------------------------------------------- Defined name = defines(str)
class InvokerOnInput(Context): ''' The invoker context. ''' # ---------------------------------------------------------------- Defined path = defines(list, doc=''' @rtype: list[Context] The path elements. ''') # ---------------------------------------------------------------- Required id = requires(str) inputs = requires(tuple) target = requires(TypeModel)
class RequestDecode(Context): ''' The request context. ''' # ---------------------------------------------------------------- Required decoderHeader = requires(IDecoderHeader) # ---------------------------------------------------------------- Optional argumentsOfType = optional(dict) # ---------------------------------------------------------------- Defined language = defines(str, doc=''' @rtype: string The language for the content. ''')
class Decoding(Context): ''' The decoding context. ''' # ---------------------------------------------------------------- Defined contentDefinitions = defines(dict, doc=''' @rtype: dictionary{string: Context} The definition context for the content decoding indexed by category. ''') # ---------------------------------------------------------------- Required parent = requires(Context) name = requires(str) children = requires(dict)
class Request(respository.Request): ''' The request context. ''' # ---------------------------------------------------------------- Defined match = defines(Context, doc=''' @rtype: Context The error match in case of failure. ''') # ---------------------------------------------------------------- Required method = requires(str) headers = requires(dict) uri = requires(str) decoderHeader = requires(IDecoderHeader)
class Solicit(Context): ''' The solicit context. ''' # ---------------------------------------------------------------- Defined gateways = defines(Iterable, doc=''' @rtype: Iterable(Gateway) The ACL gateways. ''') # ---------------------------------------------------------------- Optional rootURI = optional(str) replacements = optional(dict) # ---------------------------------------------------------------- Required permissions = requires(Iterable)
class Repository(Context): ''' The repository context. ''' # ---------------------------------------------------------------- Defined parent = attribute(Context, doc=''' @rtype: Context The parent context for repository. ''') actions = defines(list, doc=''' @rtype: list[Context] The list of actions created. ''')
class DefineEncoder(Context): ''' The create encoder context. ''' # ---------------------------------------------------------------- Defined encoder = defines(ITransfrom, doc=''' @rtype: ITransfrom The encoder to be used for rendering objects. ''') # ---------------------------------------------------------------- Optional name = optional(str) specifiers = optional(list) # ---------------------------------------------------------------- Required objType = requires(Type)
class Request(Context): ''' The request context. ''' # ---------------------------------------------------------------- Defined invoker = defines(Context, doc=''' @rtype: Context The invoker corresponding to the request. ''') # ---------------------------------------------------------------- Required method = requires(str) node = requires(Context) nodesValues = requires(dict) converterPath = requires(Converter)
class Invoker(Context): ''' The invoker context. ''' # ---------------------------------------------------------------- Defined invokerGet = defines(Context, doc=''' @rtype: Context The invoker used for getting the target model. ''') # ---------------------------------------------------------------- Required node = requires(Context) isCollection = requires(bool) isModel = requires(bool) target = requires(TypeModel) path = requires(list)
class Invoker(Context): ''' The invoker context. ''' # ---------------------------------------------------------------- Defined intrInputs = defines(OrderedDict, doc=''' @rtype: dictionary{string: Input} The introspection inputs indexed by the input name. ''') # ---------------------------------------------------------------- Required id = requires(str) call = requires(TypeCall) methodHTTP = requires(str) path = requires(list) shadowing = requires(Context) doInvoke = requires(IDo)
class Invoker(Context): ''' The invoker context. ''' # ---------------------------------------------------------------- Defined node = defines(Context, doc=''' @rtype: Context The invoker node. ''') # ---------------------------------------------------------------- Optional shadowing = optional(Context) # ---------------------------------------------------------------- Required methodHTTP = requires(str) path = requires(list) location = requires(str)