storj/cmd/uplinkng/cmd_access_create.go
Jeff Wendling f474bb6179 cmd/uplinkng: update for breaking clingy changes
clingy changed some and this is just fixes for that

Change-Id: I729aed6329fe0988fcb9b4407f16966a753b3204
2021-07-06 17:26:51 -04:00

33 lines
871 B
Go

// Copyright (C) 2021 Storj Labs, Inc.
// See LICENSE for copying information.
package main
import (
"strconv"
"github.com/zeebo/clingy"
)
type cmdAccessCreate struct {
accessPermissions
token string
passphrase string
name string
save bool
}
func (c *cmdAccessCreate) Setup(params clingy.Parameters) {
c.token = params.Flag("token", "Setup token from satellite UI (prompted if unspecified)", "").(string)
c.passphrase = params.Flag("passphrase", "Passphrase used for encryption (prompted if unspecified)", "").(string)
c.name = params.Flag("name", "Name to save newly created access, if --save is true", "default").(string)
c.save = params.Flag("save", "Save the access", true, clingy.Transform(strconv.ParseBool)).(bool)
c.accessPermissions.Setup(params)
}
func (c *cmdAccessCreate) Execute(ctx clingy.Context) error {
return nil
}