Documentation
¶
Index ¶
- Variables
- func NewHandler(apiClient api.ClientInterface, inputService input.ServiceInterface) interfaces.UserHandler
- type ChangeRoleInOrganizationCmd
- type Cmd
- type Handler
- type InviteToOrganizationCmd
- type MockHandler
- func (m *MockHandler) ChangeRoleInOrganization(ctx context.Context, organization models.Organization, ...) error
- func (m *MockHandler) InviteToOrganization(ctx context.Context, organization models.Organization, ...) error
- func (m *MockHandler) Update(ctx context.Context, flags models.UpdateUserFlags) error
- type UpdateCmd
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 ¶
func (c *ChangeRoleInOrganizationCmd) Run() error
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
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 ¶
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
Click to show internal directories.
Click to hide internal directories.