Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

POST license API endpoint#3570

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
spikecurtis merged 9 commits intomainfromspike/3279_post_license
Aug 22, 2022
Merged

POST license API endpoint#3570

spikecurtis merged 9 commits intomainfromspike/3279_post_license
Aug 22, 2022

Conversation

spikecurtis
Copy link
Contributor

PR 1 of 2 for#3279

(next PR will add thecoder license add CLI command that hits this endpoint

  • POST license API
  • Support interface{} types in generated Typescript

Signed-off-by: Spike Curtis <spike@coder.com>
Signed-off-by: Spike Curtis <spike@coder.com>
@spikecurtisspikecurtis requested review fromkylecarbs anda teamAugust 18, 2022 22:10
@spikecurtisspikecurtis requested a review froma team as acode ownerAugust 18, 2022 22:10
Copy link
Contributor

@presleyppresleyp left a comment

Choose a reason for hiding this comment

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

frontend ✅

Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

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

Most of this looks great! I noted a few minor things and I think we could do something nicer withLicense.Claims for the frontend (like defining the known fields). Users ofcodersdk might also benefit from exposing known fields.

Signed-off-by: Spike Curtis <spike@coder.com>
Signed-off-by: Spike Curtis <spike@coder.com>
//go:embed keys/2022-08-12
var key20220812 []byte

var keys = map[string]ed25519.PublicKey{"2022-08-12": ed25519.PublicKey(key20220812)}
Copy link
Member

Choose a reason for hiding this comment

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

Could we make acoderd.API struct that contains this? Similar to how the AGPLcoderd package is structured.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

the public keys are baked in at the package level this way. Isn't this what we want?

It might make it easier to do integration testing if we could inject the keys in ascoderd.Options on creation of the API, so that tests could generate their own keys and then use them, but I worry that sort of machinery would be tempting for end users looking to bypass our licensing. Granted, right now they can just modify thekeys/2022-08-12 file, but each layer we bubble this up through makes it that much more obvious how to get away with it.

@@ -0,0 +1,153 @@
package coderd
Copy link
Member

Choose a reason for hiding this comment

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

It seems like this test doesn't have to be internal.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

it modifies thekeys variable in-place during the tests (patch paradigm). I want to keep that variable unexported, so the tests need to be internal.

Signed-off-by: Spike Curtis <spike@coder.com>
Signed-off-by: Spike Curtis <spike@coder.com>
@spikecurtisspikecurtis merged commitb101a6f intomainAug 22, 2022
@spikecurtisspikecurtis deleted the spike/3279_post_license branchAugust 22, 2022 22:02
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@mafredrimafredrimafredri approved these changes

@dwahlerdwahlerdwahler left review comments

@kylecarbskylecarbskylecarbs left review comments

@presleyppresleyppresleyp approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@spikecurtis@mafredri@dwahler@presleyp@kylecarbs

[8]ページ先頭

©2009-2025 Movatter.jp