Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Devurl crud ops #60

Merged
merged 5 commits into from
Jun 29, 2020
Merged

Conversation

Russtopia
Copy link

@Russtopia Russtopia commented Jun 25, 2020

This implements the new subcommands proposed in #57

Example Usage

$ ./coder urls russ-env1
http://3000-russ-env1-admin.russtopia-rlmfuntoo.dogfood.c8s.io/ 3000 PRIVATE
$ ./coder urls create russ-env1 3001 --access=org
Adding devurl for port 3001
$ ./coder urls russ-env1
http://3000-russ-env1-admin.russtopia-rlmfuntoo.dogfood.c8s.io/ 3000 PRIVATE
http://3001-russ-env1-admin.russtopia-rlmfuntoo.dogfood.c8s.io/ 3001 ORG
$ ./coder urls create russ-env1 3002 -a group
Invalid access level
Usage: coder urls create <env name> <port> [--access <level>]

create/update a devurl for external access

coder urls create flags:
      -a, --access string   [private | org | authed | public] set devurl access (default "private")
$ ./coder urls del russ-env1 8000
2020-06-25 09:38:25 FATAL	No devurl found for port 8000
$ ./coder urls -h
Usage: coder urls <env name>

get all development urls for external access

Commands:
	create  create/update a devurl for external access
	del     delete a devurl
$ ./coder urls create -h
Usage: coder urls create <env name> <port> [--access <level>]

create/update a devurl for external access

coder urls create flags:
      -a, --access string   [private | org | authed | public] set devurl access (default "private")
$ ./coder help urls del
Usage: coder urls del <env name> <port>

delete a devurl
$ ./coder urls create russ-env1 99999 -a=public
bad port
Usage: coder urls create <env name> <port> [--a access]

create/update a devurl for external access

coder urls create flags:
      -a, --access string   [private | org | authed | public] set devurl access (default "private")

@Russtopia Russtopia linked an issue Jun 25, 2020 that may be closed by this pull request
Copy link

@wbobeirne wbobeirne left a comment

Choose a reason for hiding this comment

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

My one request was addressed, ty sir 🙏

@Russtopia Russtopia force-pushed the devurl-CRUD-ops branch 4 times, most recently from 0a79ef7 to 22bffe8 Compare June 26, 2020 18:21
Desc: "get all development urls for external access",
Name: "create",
Usage: "<env name> <port> [--a access]",
Desc: "create/update a devurl for external access",
}
Copy link
Author

Choose a reason for hiding this comment

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

I made it just --a, do you want it fully-spelled out ie., --access ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer --acess for the flag. If you also want the -a shorthand, we could use fl.StringVarP

@Russtopia Russtopia requested a review from scsmithr June 26, 2020 19:09
Copy link
Contributor

@scsmithr scsmithr left a comment

Choose a reason for hiding this comment

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

Very minor comments, feel free to merge when addressed.

Desc: "get all development urls for external access",
Name: "create",
Usage: "<env name> <port> [--a access]",
Desc: "create/update a devurl for external access",
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer --acess for the flag. If you also want the -a shorthand, we could use fl.StringVarP

@Russtopia Russtopia merged commit 4c1d110 into update-dev-urls-for-api-changes Jun 29, 2020
@Russtopia Russtopia deleted the devurl-CRUD-ops branch July 16, 2020 18:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add create and del subcommands to manage devurls
3 participants