confidant -
A person in whom one can confide or share one's secrets: a friend.
Wikipedia
In media, the confidant character is usually someone the lead character confides in and trusts. Typically, these consist of the best friend, relative, doctor or boss. The confidant character is most common in romantic comedy films but often appears in other genres.