How to use the @creditkarma/thrift-server-core.StructLike function in @creditkarma/thrift-server-core

To help you get started, we’ve selected a few @creditkarma/thrift-server-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github creditkarma / thrift-server / packages / thrift-client / src / ttwitter / com / creditkarma / finagle / thrift / index.ts View on Github external
input.skip(fieldType);
                    }
                    break;
                default: {
                    input.skip(fieldType);
                }
            }
            input.readFieldEnd();
        }
        input.readStructEnd();
        return {
            name: _args.name
        };
    }
};
export class ClientId extends thrift.StructLike implements IClientId {
    public name?: string;
    public readonly _annotations: {
        [name: string]: string;
    } = {};
    public readonly _fieldAnnotations: {
        [fieldName: string]: {
            [name: string]: string;
        };
    } = {};
    constructor(args: IClientIdArgs = {}) {
        super();
        if (args.name != null) {
            const value_44: string = args.name;
            this.name = value_44;
        }
    }
github creditkarma / thrift-server / packages / thrift-client / src / ttwitter / com / creditkarma / finagle / thrift / index.ts View on Github external
}
                    break;
                default: {
                    input.skip(fieldType);
                }
            }
            input.readFieldEnd();
        }
        input.readStructEnd();
        return {
            src: _args.src,
            dst: _args.dst
        };
    }
};
export class Delegation extends thrift.StructLike implements IDelegation {
    public src?: string;
    public dst?: string;
    public readonly _annotations: {
        [name: string]: string;
    } = {};
    public readonly _fieldAnnotations: {
        [fieldName: string]: {
            [name: string]: string;
        };
    } = {};
    constructor(args: IDelegationArgs = {}) {
        super();
        if (args.src != null) {
            const value_51: string = args.src;
            this.src = value_51;
        }
github creditkarma / thrift-server / packages / thrift-client / src / ttwitter / com / creditkarma / finagle / thrift / index.ts View on Github external
break;
                default: {
                    input.skip(fieldType);
                }
            }
            input.readFieldEnd();
        }
        input.readStructEnd();
        return {
            ipv4: _args.ipv4,
            port: _args.port,
            service_name: _args.service_name
        };
    }
};
export class Endpoint extends thrift.StructLike implements IEndpoint {
    public ipv4?: number;
    public port?: number;
    public service_name?: string;
    public readonly _annotations: {
        [name: string]: string;
    } = {};
    public readonly _fieldAnnotations: {
        [fieldName: string]: {
            [name: string]: string;
        };
    } = {};
    constructor(args: IEndpointArgs = {}) {
        super();
        if (args.ipv4 != null) {
            const value_4: number = args.ipv4;
            this.ipv4 = value_4;
github creditkarma / thrift-server / packages / thrift-client-ttwitter-filter / src / ttwitter / com / creditkarma / finagle / thrift / Endpoint.ts View on Github external
break;
                default: {
                    input.skip(fieldType);
                }
            }
            input.readFieldEnd();
        }
        input.readStructEnd();
        return {
            ipv4: _args.ipv4,
            port: _args.port,
            service_name: _args.service_name
        };
    }
};
export class Endpoint extends thrift.StructLike implements IEndpoint {
    public ipv4?: number;
    public port?: number;
    public service_name?: string;
    public readonly _annotations: thrift.IThriftAnnotations = {};
    public readonly _fieldAnnotations: thrift.IFieldAnnotations = {};
    constructor(args: IEndpointArgs = {}) {
        super();
        if (args.ipv4 != null) {
            const value_4: number = args.ipv4;
            this.ipv4 = value_4;
        }
        if (args.port != null) {
            const value_5: number = args.port;
            this.port = value_5;
        }
        if (args.service_name != null) {
github creditkarma / thrift-server / packages / thrift-client / src / ttwitter / com / creditkarma / finagle / thrift / index.ts View on Github external
break;
                default: {
                    input.skip(fieldType);
                }
            }
            input.readFieldEnd();
        }
        input.readStructEnd();
        return {
            timestamp: _args.timestamp,
            value: _args.value,
            host: _args.host
        };
    }
};
export class Annotation extends thrift.StructLike implements IAnnotation {
    public timestamp?: thrift.Int64;
    public value?: string;
    public host?: IEndpoint;
    public readonly _annotations: {
        [name: string]: string;
    } = {};
    public readonly _fieldAnnotations: {
        [fieldName: string]: {
            [name: string]: string;
        };
    } = {};
    constructor(args: IAnnotationArgs = {}) {
        super();
        if (args.timestamp != null) {
            const value_10: thrift.Int64 = (typeof args.timestamp === "number" ? new thrift.Int64(args.timestamp) : args.timestamp);
            this.timestamp = value_10;
github creditkarma / thrift-server / packages / thrift-client-ttwitter-filter / src / ttwitter / com / creditkarma / finagle / thrift / Delegation.ts View on Github external
}
                    break;
                default: {
                    input.skip(fieldType);
                }
            }
            input.readFieldEnd();
        }
        input.readStructEnd();
        return {
            src: _args.src,
            dst: _args.dst
        };
    }
};
export class Delegation extends thrift.StructLike implements IDelegation {
    public src?: string;
    public dst?: string;
    public readonly _annotations: thrift.IThriftAnnotations = {};
    public readonly _fieldAnnotations: thrift.IFieldAnnotations = {};
    constructor(args: IDelegationArgs = {}) {
        super();
        if (args.src != null) {
            const value_3: string = args.src;
            this.src = value_3;
        }
        if (args.dst != null) {
            const value_4: string = args.dst;
            this.dst = value_4;
        }
    }
    public static read(input: thrift.TProtocol): Delegation {
github creditkarma / thrift-server / packages / thrift-client / src / ttwitter / com / creditkarma / finagle / thrift / index.ts View on Github external
}
            input.readFieldEnd();
        }
        input.readStructEnd();
        return {
            trace_id: _args.trace_id,
            name: _args.name,
            id: _args.id,
            parent_id: _args.parent_id,
            annotations: _args.annotations,
            binary_annotations: _args.binary_annotations,
            debug: _args.debug
        };
    }
};
export class Span extends thrift.StructLike implements ISpan {
    public trace_id?: thrift.Int64;
    public name?: string;
    public id?: thrift.Int64;
    public parent_id?: thrift.Int64;
    public annotations?: Array;
    public binary_annotations?: Array;
    public debug?: boolean;
    public readonly _annotations: {
        [name: string]: string;
    } = {};
    public readonly _fieldAnnotations: {
        [fieldName: string]: {
            [name: string]: string;
        };
    } = {};
    constructor(args: ISpanArgs = {}) {
github creditkarma / thrift-server / packages / thrift-client / src / ttwitter / com / creditkarma / finagle / thrift / index.ts View on Github external
const fieldId: number = ret.fieldId;
            if (fieldType === thrift.TType.STOP) {
                break;
            }
            switch (fieldId) {
                default: {
                    input.skip(fieldType);
                }
            }
            input.readFieldEnd();
        }
        input.readStructEnd();
        return {};
    }
};
export class ConnectionOptions extends thrift.StructLike implements IConnectionOptions {
    public readonly _annotations: {
        [name: string]: string;
    } = {};
    public readonly _fieldAnnotations: {
        [fieldName: string]: {
            [name: string]: string;
        };
    } = {};
    constructor(args: IConnectionOptionsArgs = {}) {
        super();
    }
    public static read(input: thrift.TProtocol): ConnectionOptions {
        return new ConnectionOptions(ConnectionOptionsCodec.decode(input));
    }
    public static write(args: IConnectionOptionsArgs, output: thrift.TProtocol): void {
        return ConnectionOptionsCodec.encode(args, output);
github creditkarma / thrift-server / packages / thrift-client / src / ttwitter / com / creditkarma / finagle / thrift / index.ts View on Github external
}
                    break;
                default: {
                    input.skip(fieldType);
                }
            }
            input.readFieldEnd();
        }
        input.readStructEnd();
        return {
            spans: _args.spans,
            contexts: _args.contexts
        };
    }
};
export class ResponseHeader extends thrift.StructLike implements IResponseHeader {
    public spans?: Array;
    public contexts?: Array;
    public readonly _annotations: {
        [name: string]: string;
    } = {};
    public readonly _fieldAnnotations: {
        [fieldName: string]: {
            [name: string]: string;
        };
    } = {};
    constructor(args: IResponseHeaderArgs = {}) {
        super();
        if (args.spans != null) {
            const value_85: Array = new Array();
            args.spans.forEach((value_87: ISpanArgs): void => {
                const value_88: ISpan = new Span(value_87);
github creditkarma / thrift-server / packages / thrift-client / src / ttwitter / com / creditkarma / finagle / thrift / index.ts View on Github external
default: {
                    input.skip(fieldType);
                }
            }
            input.readFieldEnd();
        }
        input.readStructEnd();
        return {
            key: _args.key,
            value: _args.value,
            annotation_type: _args.annotation_type,
            host: _args.host
        };
    }
};
export class BinaryAnnotation extends thrift.StructLike implements IBinaryAnnotation {
    public key?: string;
    public value?: Buffer;
    public annotation_type?: AnnotationType;
    public host?: IEndpoint;
    public readonly _annotations: {
        [name: string]: string;
    } = {};
    public readonly _fieldAnnotations: {
        [fieldName: string]: {
            [name: string]: string;
        };
    } = {};
    constructor(args: IBinaryAnnotationArgs = {}) {
        super();
        if (args.key != null) {
            const value_17: string = args.key;