A generalized Courant algebroid structure is defined on the direct sum bundle , where and are, respectively, the gauge Lie algebroid and the jet bundle of a vector bundle . Such a structure is called an omni-Lie algebroid since it is reduced to the omni-Lie algebra introduced by A. Weinstein if the base manifold is a point. We prove that there is a one-to-one correspondence between Dirac structures coming from bundle maps and Lie algebroid (local Lie algebra) structures on when ( is a line bundle).