We study a one dimensional directed polymer model in an inverse-gamma random environment, known as the log-gamma polymer, in three different geometries: point-to-line, point-to-half-line and when the polymer is restricted to a half-space with end point lying free on the corresponding half-line. Via the use of A.N.Kirillov's geometric Robinson-Schensted-Knuth correspondence, we compute the Laplace transform of the partition functions in the above geometries in terms of orthogonal Whittaker functions, thus obtaining new connections between the ubiquitous class of Whittaker functions and exactly solvable probabilistic models. In the case of the first two geometries we also provide multiple contour integral formulae for the corresponding Laplace transforms. Passing to the zero-temperature limit, we obtain new formulae for the corresponding last passage percolation problems with exponential weights.