github.com/mattyw/juju@v0.0.0-20140610034352-732aecd63861/cmd/juju/user.go (about)

     1  // Copyright 2014 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package main
     5  
     6  import (
     7  	"github.com/juju/juju/cmd"
     8  	"github.com/juju/juju/cmd/envcmd"
     9  )
    10  
    11  type UserCommand struct {
    12  	*cmd.SuperCommand
    13  }
    14  
    15  const userCommandDoc = `
    16  "juju user" is used to manage the user accounts and access control in
    17  the Juju environment.
    18  `
    19  
    20  const userCommandPurpose = "manage user accounts and access control"
    21  
    22  func NewUserCommand() cmd.Command {
    23  	usercmd := &UserCommand{
    24  		SuperCommand: cmd.NewSuperCommand(cmd.SuperCommandParams{
    25  			Name:        "user",
    26  			Doc:         userCommandDoc,
    27  			UsagePrefix: "juju",
    28  			Purpose:     userCommandPurpose,
    29  		}),
    30  	}
    31  	// Define each subcommand in a separate "user_FOO.go" source file
    32  	// (with tests in user_FOO_test.go) and wire in here.
    33  	usercmd.Register(envcmd.Wrap(&UserAddCommand{}))
    34  	return usercmd
    35  }