userlist

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bubble

type Bubble struct {
	Styles Styles
	State  State
	// contains filtered or unexported fields
}

func New

func New(stardogClient stardog.Client) Bubble

func (*Bubble) ChangeUserPasswordCmd

func (b *Bubble) ChangeUserPasswordCmd(newPassword, confirmedPassword string) tea.Cmd

func (*Bubble) CreateUserCmd

func (b *Bubble) CreateUserCmd(username, password string) tea.Cmd

func (*Bubble) DeleteUserCmd

func (b *Bubble) DeleteUserCmd() tea.Cmd

func (*Bubble) EnableUserCmd

func (b *Bubble) EnableUserCmd(enabled bool) tea.Cmd

func (*Bubble) GetCurrentUserRoles

func (b *Bubble) GetCurrentUserRoles() []string

func (*Bubble) GetSelectedUser

func (b *Bubble) GetSelectedUser() Item

func (*Bubble) GetStardogUsersWithDetails

func (b *Bubble) GetStardogUsersWithDetails() ([]list.Item, error)

func (*Bubble) GetUsersCmd

func (b *Bubble) GetUsersCmd() tea.Cmd

func (Bubble) Init

func (b Bubble) Init() tea.Cmd

func (*Bubble) IsFilterActive

func (b *Bubble) IsFilterActive() bool

func (*Bubble) Reset

func (b *Bubble) Reset()

func (*Bubble) SetIsActive

func (b *Bubble) SetIsActive(active bool)

func (*Bubble) SetListTitleBackgroundColor

func (b *Bubble) SetListTitleBackgroundColor(color lipgloss.AdaptiveColor)

func (*Bubble) SetListTitleForegroundColor

func (b *Bubble) SetListTitleForegroundColor(color lipgloss.AdaptiveColor)

func (*Bubble) SetSize

func (b *Bubble) SetSize(width, height int)

func (Bubble) Update

func (b Bubble) Update(msg tea.Msg) (Bubble, tea.Cmd)

func (Bubble) View

func (b Bubble) View() string

type GetUsersMsg

type GetUsersMsg []list.Item

type Item

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

func (Item) Description

func (i Item) Description() string

func (Item) Enabled

func (i Item) Enabled() bool

func (Item) FilterValue

func (i Item) FilterValue() string

func (Item) Roles

func (i Item) Roles() []string

func (Item) Superuser

func (i Item) Superuser() bool

func (Item) Title

func (i Item) Title() string

func (Item) Username

func (i Item) Username() string

type State

type State int
const (
	IdleState State = iota
	AddUserState
	ChangeUserPasswordState
)

type Styles

type Styles struct {
	ActiveListStyle   lipgloss.Style
	InactiveListStyle lipgloss.Style
	// contains filtered or unexported fields
}

func DefaultStyles

func DefaultStyles() (s Styles)

type SuccessMsg

type SuccessMsg struct {
	Message string
}

Jump to

Keyboard shortcuts

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