Skip to content

Implement Workspace and Source* API endpoints #42

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

Merged
merged 9 commits into from
Aug 12, 2020

Conversation

cgardens
Copy link
Contributor

Takes a first pass at implementing endpoints for the Workspace, Source, SourceSpecification, SourceImplementation resources. This informed a lot of the other more infrastructure-y PRs I just put up.

Of note...

  • Since the API interface class is pretty huge, I split up each resource into its own handler primarily for code readability reasons. The idea is that the handler can essentially just be treated like "controller" in express or rails. In other words it is appropriate for there to be API interface specific logic in there. All the other layers of code, should not be concerned about this.

@@ -0,0 +1,6 @@
{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

well this feels dorky. not sure if i should just throw it in its own module. 🤷‍♀️

Copy link
Contributor

Choose a reason for hiding this comment

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

What is this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the is the default workspace that will ship with the app. in a world where there is one workspace, we can just set it up with some default values.

the data dir is where i plan to save configs for now until i figure out how to work with whatever mount point is configured.

@@ -0,0 +1,6 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this file?


// persist
final UUID sourceImplementationId = UUID.randomUUID();
final SourceConnectionImplementation sourceConnectionImplementation =
Copy link
Contributor

Choose a reason for hiding this comment

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

Is google style forcing 80 columns? I wonder if we could make that larger so we don't have code with so many linebreaks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah. i was trying to see if we could configure googleJavaFormat but i haven't figured that out. i kinda think the idea is that this is how google does it, so you take it or leave it.

}

private static SourceSpecificationRead standardSourceToSourceRead(
SourceConnectionSpecification sourceConnectionSpecification) {
Copy link
Contributor

Choose a reason for hiding this comment

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

don't hesitate to use shorter args name

@cgardens cgardens force-pushed the charles/first_endpoints2 branch from 5717004 to a37efed Compare August 12, 2020 15:54
@cgardens cgardens requested a review from michel-tricot August 12, 2020 15:55
@cgardens cgardens merged commit b602336 into master Aug 12, 2020
@cgardens cgardens deleted the charles/first_endpoints2 branch August 12, 2020 20:44
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.

2 participants