users

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommandsTo

func AddCommandsTo(rootCmd *cobra.Command)

AddCommandsTo builds the users commands and adds them to the root command

func CreateUser

func CreateUser(cmd *cobra.Command, args []string, noColor bool) error

func DeactivateUser

func DeactivateUser(cmd *cobra.Command, args []string, noColor bool) error

func DeleteUser

func DeleteUser(cmd *cobra.Command, args []string, noColor bool) error

func GetUser

func GetUser(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error

func GetUserActivity

func GetUserActivity(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error

func ListUsers

func ListUsers(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error

func UpdateUser

func UpdateUser(cmd *cobra.Command, args []string, noColor bool) error

Types

type MockUserManagementService

type MockUserManagementService struct {
	CreateUserErr    error
	CreateUserResult *megaport.CreateUserResponse
	GetUserErr       error
	GetUserResult    *megaport.User
	ListUsersErr     error
	ListUsersResult  []*megaport.User
	UpdateUserErr    error
	DeleteUserErr    error
	DeactivateErr    error
	ActivityErr      error
	ActivityResult   []*megaport.UserActivity

	CapturedCreateReq   *megaport.CreateUserRequest
	CapturedUpdateReq   *megaport.UpdateUserRequest
	CapturedEmployeeID  int
	CapturedActivityReq *megaport.GetUserActivityRequest
	ForceNilGetUser     bool
}

func (*MockUserManagementService) CreateUser

func (*MockUserManagementService) DeactivateUser

func (m *MockUserManagementService) DeactivateUser(ctx context.Context, employeeID int) error

func (*MockUserManagementService) DeleteUser

func (m *MockUserManagementService) DeleteUser(ctx context.Context, employeeID int) error

func (*MockUserManagementService) GetUser

func (m *MockUserManagementService) GetUser(ctx context.Context, employeeID int) (*megaport.User, error)

func (*MockUserManagementService) GetUserActivity

func (*MockUserManagementService) ListCompanyUsers

func (m *MockUserManagementService) ListCompanyUsers(ctx context.Context) ([]*megaport.User, error)

func (*MockUserManagementService) UpdateUser

func (m *MockUserManagementService) UpdateUser(ctx context.Context, employeeID int, req *megaport.UpdateUserRequest) error

type Module

type Module struct{}

Module implements the registry.Module interface for user management commands

func NewModule

func NewModule() *Module

NewModule creates a new users module

func (*Module) Name

func (m *Module) Name() string

Name returns the module name

func (*Module) RegisterCommands

func (m *Module) RegisterCommands(rootCmd *cobra.Command)

RegisterCommands adds user management commands to the root command

Jump to

Keyboard shortcuts

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