user

package
v1.9.0-test Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: LGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CmdPlugin struct {
	User *Cmd `cmd:""`
}
View Source
var (
	ErrFailedToSetUserRoleInOrg = eris.New("Failed to set user role in organization")
)
View Source
var ErrOrganizationInviteFailed = eris.New("Organization email invite failed, but invite is still created in CLI.")

Functions

func NewHandler

func NewHandler(apiClient api.ClientInterface, inputService input.ServiceInterface) interfaces.UserHandler

Types

type ChangeRoleInOrganizationCmd

type ChangeRoleInOrganizationCmd struct {
	Context      context.Context       `kong:"-"`
	Dependencies cmdsetup.Dependencies `kong:"-"`
	Email        string                `         flag:"" help:"The email of the user to change the role of"`
	Role         string                `         flag:"" help:"The new role of the user"`
}

func (*ChangeRoleInOrganizationCmd) Run

type Cmd

type Cmd struct {
	Invite *InviteToOrganizationCmd     `cmd:"" group:"User Commands:" optional:"" help:"Invite a user to an organization"`
	Role   *ChangeRoleInOrganizationCmd `cmd:"" group:"User Commands:" optional:"" help:"Change a user's role in an organization"`
	Update *UpdateCmd                   `cmd:"" group:"User Commands:" optional:"" help:"Update a user"`
}

type Handler

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

func (*Handler) ChangeRoleInOrganization

func (h *Handler) ChangeRoleInOrganization(
	ctx context.Context,
	organization models.Organization,
	flags models.ChangeUserRoleInOrganizationFlags,
) error

func (*Handler) InviteToOrganization

func (h *Handler) InviteToOrganization(
	ctx context.Context,
	organization models.Organization,
	flags models.InviteUserToOrganizationFlags,
) error

func (*Handler) Update

func (h *Handler) Update(ctx context.Context, flags models.UpdateUserFlags) error

type InviteToOrganizationCmd

type InviteToOrganizationCmd struct {
	Context      context.Context       `kong:"-"`
	Dependencies cmdsetup.Dependencies `kong:"-"`
	Email        string                `         flag:"" help:"The email of the user to invite"`
	Role         string                `         flag:"" help:"The role of the user to invite"`
}

func (*InviteToOrganizationCmd) Run

func (c *InviteToOrganizationCmd) Run() error

type MockHandler

type MockHandler struct {
	mock.Mock
}

func (*MockHandler) ChangeRoleInOrganization

func (m *MockHandler) ChangeRoleInOrganization(
	ctx context.Context,
	organization models.Organization,
	flags models.ChangeUserRoleInOrganizationFlags,
) error

func (*MockHandler) InviteToOrganization

func (m *MockHandler) InviteToOrganization(
	ctx context.Context,
	organization models.Organization,
	flags models.InviteUserToOrganizationFlags,
) error

func (*MockHandler) Update

func (m *MockHandler) Update(ctx context.Context, flags models.UpdateUserFlags) error

type UpdateCmd

type UpdateCmd struct {
	Context      context.Context       `kong:"-"`
	Dependencies cmdsetup.Dependencies `kong:"-"`
	Name         string                `         flag:"" help:"The new name of the user"`
}

func (*UpdateCmd) Run

func (c *UpdateCmd) Run() error

Jump to

Keyboard shortcuts

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