Class PinAddRuleBuilder

A builder to allow defining rules that will mock IPFS pin add requests.

Hierarchy

  • PinAddRuleBuilder

Constructors

  • This builder should not be constructed directly. Call mockNode.forPinAdd(cid) instead.

    Parameters

    • cid: undefined | string
    • addRuleCallback: ((data: RequestRuleData) => Promise<void>)
        • (data: RequestRuleData): Promise<void>
        • Parameters

          • data: RequestRuleData

          Returns Promise<void>

    Returns PinAddRuleBuilder

Methods

  • Close the connection immediately after receiving the matching request, without sending any response.

    This method completes the rule definition, and returns a promise that resolves once the rule is active.

    Returns Promise<void>

  • Return a successful result, as if the IPFS content was pinned successfully.

    This method completes the rule definition, and returns a promise that resolves once the rule is active.

    Returns Promise<void>

  • Timeout, accepting the request but never returning a response.

    This method completes the rule definition, and returns a promise that resolves once the rule is active.

    Returns Promise<void>

Generated using TypeDoc