cli

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cli holds commands for accounts command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	// contains filtered or unexported fields
}

CLI provides functionality for managing user accounts via the CLI.

func New

func New(l *zap.SugaredLogger) *CLI

New creates a new CLI for running accounts commands.

func (*CLI) Create

func (c *CLI) Create(ctx context.Context, username, password string) error

Create a new user account.

func (*CLI) Delete

func (c *CLI) Delete(ctx context.Context, username string) error

Delete an existing user account.

func (*CLI) List

func (c *CLI) List(ctx context.Context, opts *ListOptions) error

List all user accounts in the system.

func (*CLI) SetPassword

func (c *CLI) SetPassword(ctx context.Context, username, password string) error

SetPassword sets the password for an existing account.

func (*CLI) WithAccountManager

func (c *CLI) WithAccountManager(m accounts.Interface)

WithAccountManager sets the account manager for the CLI.

type ListOptions

type ListOptions struct {
	NoHeaders bool     `mapstructure:"no-headers"`
	Columns   []string `mapstructure:"columns"`
}

ListOptions holds options for listing user accounts.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL