Skip to content

Conversation

@brandur
Copy link
Contributor

@brandur brandur commented Mar 9, 2025

Here, import the framework code from the River UI project at [1].

I've added some READMEs, configuration files, etc., but otherwise very
little has changed. There are a couple small things like adding printf
variants for errors (which we'll need for Go 1.24 because it doesn't let
you pass only a message to a printf-like function, and removing errors
for specific types like jobs/queues/workflows (those will like in River
UI instead).

[1] https://github.com/riverqueue/riverui/tree/master/internal

@brandur brandur force-pushed the brandur-import branch 3 times, most recently from 92b0adf to 906b5d3 Compare March 9, 2025 17:56
@brandur brandur requested a review from bgentry March 9, 2025 17:58
@brandur
Copy link
Contributor Author

brandur commented Mar 9, 2025

@bgentry Thoughts? riverapi would've been a more obvious name for this repo, but it's taken. IMO riverapiframe isn't half bad though as it's kind of nice that "framework" is suggested in there. I didn't add the new test helpers or anything yet, but will follow up with that later.

brandur added a commit to riverqueue/riverui that referenced this pull request Mar 9, 2025
Here, move the API framework, which is currently duplicated in two
projects, over to its own repository so that we can reuse it between
them. It's new home will be `riverapiframe` [1].

[1] riverqueue/apiframe#1
brandur added a commit to riverqueue/riverui that referenced this pull request Mar 9, 2025
Here, move the API framework, which is currently duplicated in two
projects, over to its own repository so that we can reuse it between
them. It's new home will be `riverapiframe` [1].

[1] riverqueue/apiframe#1
Copy link
Contributor

@bgentry bgentry left a comment

Choose a reason for hiding this comment

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

LGTM aside from possible naming ideas which I dropped in Slack, your call 🚀

Comment on lines 1 to 2
// Package apiendpoint provides a lightweight API framework for use with River
// UI. It lets API endpoints be defined, then mounted into an http.ServeMux.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can probably drop the river UI reference and generalize this description.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@bgentry
Copy link
Contributor

bgentry commented Mar 9, 2025

@brandur oh, you probably want to throw an MIT license on this too

Here, import the framework code from the River UI project at [1].

I've added some READMEs, configuration files, etc., but otherwise very
little has changed. There are a couple small things like adding `printf`
variants for errors (which we'll need for Go 1.24 because it doesn't let
you pass only a message to a printf-like function, and removing errors
for specific types like jobs/queues/workflows (those will like in River
UI instead).

[1] https://github.com/riverqueue/riverui/tree/master/internal
@brandur
Copy link
Contributor Author

brandur commented Mar 10, 2025

@brandur oh, you probably want to throw an MIT license on this too

Cool, done.

Also renamed the repo to just "apiframe".

@brandur brandur merged commit e534744 into master Mar 10, 2025
2 checks passed
@brandur brandur deleted the brandur-import branch March 10, 2025 05:09
brandur added a commit that referenced this pull request Mar 10, 2025
Corrects a few straggling problems with the rename done in #1. CI still
passed there, so I thought I'd gotten everything, but didn't.
brandur added a commit that referenced this pull request Mar 10, 2025
Corrects a few straggling problems with the rename done in #1. CI still
passed there, so I thought I'd gotten everything, but didn't.
brandur added a commit that referenced this pull request Mar 10, 2025
Corrects a few straggling problems with the rename done in #1. CI still
passed there, so I thought I'd gotten everything, but didn't.
brandur added a commit to riverqueue/riverui that referenced this pull request Mar 10, 2025
Here, move the API framework, which is currently duplicated in two
projects, over to its own repository so that we can reuse it between
them. It's new home will be `riverapiframe` [1].

[1] riverqueue/apiframe#1
brandur added a commit to riverqueue/riverui that referenced this pull request Mar 10, 2025
Here, move the API framework, which is currently duplicated in two
projects, over to its own repository so that we can reuse it between
them. It's new home will be `riverapiframe` [1].

[1] riverqueue/apiframe#1
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.

3 participants