Options
All
  • Public
  • Public/Protected
  • All
Menu

External module @creditkarma/mimic-thrift

Index

Type aliases

BaseTypeID

BaseTypeID: "bool" | "byte" | "i8" | "i16" | "i32" | "i64" | "double" | "string" | "binary" | "slist"

ContainerType

ContainerType: IMapType | ISetType | IListType

ContainerTypeID

ContainerTypeID: "list" | "set" | "map"

FieldOrArg

FieldOrArg: IField | IArgument

Ident

Ident: StructDefinition | UnionDefinition | ExceptionDefinition | EnumDefinition | TypedefDefinition

Type

TypeID

СompositionalType

СompositionalType: IStructType | IUnionType | IExceptionType

СompositionalTypeID

СompositionalTypeID: "struct" | "union" | "exception"

Variables

Thrift

Thrift: Thrift

Thrift

Thrift: Thrift

Functions

addArgsFunction

  • addArgsFunction(f: ThriftFile.IFunction, service: string, ns: any): void

addProcessFunc

  • addProcessFunc(f: ThriftFile.IFunction, service: string, ns: any, def: ThriftFile.IJSON): (Anonymous function)

addProcessor

  • addProcessor(s: ThriftFile.IService, ns: any, def: ThriftFile.IJSON): processor

addResultFunction

  • addResultFunction(f: ThriftFile.IFunction, service: string, ns: any): void

addService

  • addService(serv: ThriftFile.IService, ns: any, def: ThriftFile.IJSON): object
  • Parameters

    • serv: ThriftFile.IService
    • ns: any
    • def: ThriftFile.IJSON

    Returns object

    • Client: client
    • Processor: processor

addStruct

  • addStruct(s: ThriftFile.IStruct, ns: any): struct

buildServiceAPI

  • buildServiceAPI(def: ThriftFile.IJSON): any

capitalize

  • capitalize(s: string): string

createClient

  • createClient(service: ThriftFile.IService, ns: any): client

formatThrift

  • formatThrift(typeId: string, type?: ThriftFile.Type): string

generateThriftResponse

  • generateThriftResponse(typeId: string, def: ThriftFile.IJSON, type?: ThriftFile.Type, extra?: ThriftFile.IExtraType): any
  • Parameters

    • typeId: string
    • def: ThriftFile.IJSON
    • Optional type: ThriftFile.Type
    • Optional extra: ThriftFile.IExtraType

    Returns any

readArg

  • readArg(name: string, args: any, f: ThriftFile.FieldOrArg, ns: any): any

readField

  • readField(typeId: string, input: thrift.TProtocol, ns: any, type?: ThriftFile.Type): any

readListField

  • readListField(type: ThriftFile.IListType, input: thrift.TProtocol, ns: any): any[]

readMapField

  • readMapField(type: ThriftFile.IMapType, input: thrift.TProtocol, ns: any): any

readSetField

  • readSetField(type: ThriftFile.ISetType, input: thrift.TProtocol, ns: any): any[]

readStruct

  • readStruct(fields: ThriftFile.FieldOrArg[], ns: any): (Anonymous function)

readStructField

  • readStructField(type: ThriftFile.СompositionalType, input: thrift.TProtocol, ns: any): any

skipStruct

  • skipStruct(input: thrift.TProtocol): Buffer

sortServices

  • sortServices(services: ThriftFile.IService[], names?: string[]): ThriftFile.IService[]
  • Sorting Services with dependencies first

    Parameters

    • services: ThriftFile.IService[]
    • Default value names: string[] = [""]

    Returns ThriftFile.IService[]

writeField

  • writeField(output: thrift.TProtocol, typeId: string, data: any, type?: ThriftFile.Type): void

writeStruct

  • writeStruct(fields: ThriftFile.FieldOrArg[], name: string): (Anonymous function)

Generated using TypeDoc