Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static Host Catalog #51

Merged
merged 92 commits into from
May 27, 2020
Merged

Static Host Catalog #51

merged 92 commits into from
May 27, 2020

Conversation

mgaffney
Copy link
Member

@mgaffney mgaffney commented May 13, 2020

I would appreciate early feedback from everyone!

TODO

  • Add HostCatalog
  • Add Host
  • Add HostSet
  • Add HostSetMember
  • Add Repository
  • Add package level comments with examples

Copy link
Collaborator

@jimlambrt jimlambrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're on the right track. we should discuss the interfaces of iam.Resource and iam.Clonable -> perhaps they need to move into internal/db?

@jimlambrt jimlambrt self-requested a review May 13, 2020 13:05
jimlambrt
jimlambrt previously approved these changes May 13, 2020
@mgaffney mgaffney requested a review from jimlambrt May 27, 2020 20:44
jimlambrt
jimlambrt previously approved these changes May 27, 2020
Copy link
Collaborator

@jimlambrt jimlambrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

jimlambrt
jimlambrt previously approved these changes May 27, 2020
@mgaffney mgaffney merged commit 0c7f6da into master May 27, 2020
@mgaffney mgaffney deleted the mgaffney/static-hosts-domain branch May 27, 2020 22:16
@mgaffney mgaffney restored the mgaffney/static-hosts-domain branch May 27, 2020 22:22
// static_host_catalog_id is the public_id of the owning
// static_host_catalog and must be set.
// @inject_tag: gorm:"not_null"
string static_host_catalog_id = 6;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we were using join tables for this kind of thing rather than embedding?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A join table is normally used only for many-to-many relationships. In this case, a host catalog can have many host sets but a host set can only belong to one host catalog. So this is the normal way to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants