OG + Exposed Filters + Views What would be the smartest way to approach filtering content by the groups that it is posted in?

I will almost certainly need custom code to do this (I think a Handler, but I need someone to point me in the right direction), especially because I want to be able to filter by content posted in "All" groups, posted in a set of groups (i.e. a user's "core groups," determined by a taxonomy term reference on all users and groups -- if they are equal, that group is a user's "Core Group"), and also by each individual group that the user belongs to (but I don't want groups that the user isn't a member of showing up in the filter).

The docs for Views aren't very good, and I just know that there's an elegant, Drupal way to do this, and I need someone to point me in the correct direction (i.e what hooks, etc.)

Thanks in advance for help!
I think you can do what you want using OG and Views with nothing custom. This is a good place to get started: https://modulesunraveled.com/organic-groups-7x-2x.