manifoldco / go-manifold

Go client API for Manifold (unstable)
https://www.manifold.co
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

Simpler CompositeID, removing the InternalID in favor of existing ID #87

Closed tim-speed closed 5 years ago

tim-speed commented 5 years ago

TLDR; Less Code, More functionality

Got it down to just ID and FlexID with CompositeID being the shared interface Added support for UnMarshalling a FlexID from a Manifold ID to make database conversions easier Marshalling is no longer an expectation of the CompositeID interfaces We will use FlexID when we want to store the FlexID format, and ID when we want to store the Manifold ID format ( internal IDs only )

Relates manifoldco/engineering#6573

tim-speed commented 5 years ago

All modified functions are covered 100%

tim-speed commented 5 years ago

:+1:

tim-speed commented 5 years ago

@jelmersnoeck the idea is that we will still have parts of our code base that will be internal only so we can use our more lightweight, strongly typed ID and then save the FlexID for places where we may need to reference an external entity, usually an Owner, but could be some other grouping entity.