userdetails

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: 12 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 {
	State  State
	Styles Styles
	// contains filtered or unexported fields
}

func New

func New(stardogClient stardog.Client) Bubble

func (*Bubble) AssignUserRole

func (b *Bubble) AssignUserRole(role string) tea.Cmd

func (*Bubble) DeleteUserPermissionCmd

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

func (*Bubble) GetAvailableRoles

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

func (*Bubble) GetRolesAssignedToUser

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

func (*Bubble) GetRolesCmd

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

func (*Bubble) GetUserDetailsCmd

func (b *Bubble) GetUserDetailsCmd(updateOccured bool) tea.Cmd

func (*Bubble) GrantUserPermissionCmd

func (b *Bubble) GrantUserPermissionCmd(action string, resourceType string, resource []string) tea.Cmd

func (Bubble) Init

func (b Bubble) Init() tea.Cmd

func (*Bubble) RemoveRoleFromUser

func (b *Bubble) RemoveRoleFromUser(role string) tea.Cmd

func (*Bubble) Reset

func (b *Bubble) Reset()

func (*Bubble) SetCurrentUser

func (b *Bubble) SetCurrentUser(user string)

func (*Bubble) SetIsActive

func (b *Bubble) SetIsActive(active bool)

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 GetAssignedRolesMsg

type GetAssignedRolesMsg []string

type GetAvailableRolesMsg

type GetAvailableRolesMsg []string

type GetRolesMsg

type GetRolesMsg []string

type GetUserDetailsMsg

type GetUserDetailsMsg struct {
	Permissions   []table.Row
	Roles         []string
	UpdateOccured bool
}

type State

type State int
const (
	IdleState State = iota
	TableState
	AddingUserPermission
	AssigningRoleState
	RemovingRoleState
)

type Styles

type Styles struct {
	InactiveViewportStyle lipgloss.Style
	ActiveViewportStyle   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