A military officer acting as secretary to a general is called this "de-camp"
aides-de-camp synonyms, aides-de-camp ... A military 
officer acting as secretary and confidential assistant to a superior officer of 
general or flag rank.