It sounds like you want the power feed and the line out to the switch to be housed in the motor housing. IF you have the room, and the proper wire holders to run two cables into the motor junction, then yes... you can make the live wire switch jucntion inside the motor. HOWEVER, you need the room inside the motor where the connections go and the motor needs to allow two normal sized wires to be held properly.
On my big Walker Turner saw I did just this to run my switch. Your electrical cord will come in and the white ground wire will connect properly to the motor. The black wire will go to one leg of the switch cord and the other leg will connect where the black wire needs to connect to the motor. (I like to connect the white wire from the switch cord to the black wire to the line source. This way you have the proper color code at the motor connection)
The green grounding wires should be wire nutted togather with a single wire pigtail that makes the chassie ground. You will need the room for the extra 2 wire nuts inside the motor connection cavity.
Here is the motor on my saw, this is what you mean, right?
If you do not have room in the motor, make these connections in a handi box and feed a wire from that to the motor.