cli

package
v1.1.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

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