role

package
v0.0.0-...-d19302c Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFullRoleFormat

func NewFullRoleFormat(source string) formatter.Format

NewFullRoleFormat for formatting output

func NewRoleFormat

func NewRoleFormat(source string) formatter.Format

NewRoleFormat for formatting output

func Write

func Write(ctx formatter.Context, roles []ybaclient.Role) error

Write renders the context for a list of Roles

Types

type Context

type Context struct {
	formatter.HeaderContext
	formatter.Context
	// contains filtered or unexported fields
}

Context for role outputs

func NewRoleContext

func NewRoleContext() *Context

NewRoleContext creates a new context for rendering role

func (*Context) CreatedOn

func (c *Context) CreatedOn() string

CreatedOn fetches Role CreatedOn

func (*Context) Description

func (c *Context) Description() string

Description fetches Role Description

func (*Context) MarshalJSON

func (c *Context) MarshalJSON() ([]byte, error)

MarshalJSON function

func (*Context) Name

func (c *Context) Name() string

Name fetches Role Name

func (*Context) PermissionDetails

func (c *Context) PermissionDetails() string

PermissionDetails fetches Role PermissionDetails

func (*Context) RoleType

func (c *Context) RoleType() string

RoleType fetches Role Type

func (*Context) UUID

func (c *Context) UUID() string

UUID fetches Role UUID

func (*Context) UpdatedOn

func (c *Context) UpdatedOn() string

UpdatedOn fetches Role UpdatedOn

type FullRoleContext

type FullRoleContext struct {
	formatter.HeaderContext
	formatter.Context
	// contains filtered or unexported fields
}

FullRoleContext to render Role Details output

func NewFullRoleContext

func NewFullRoleContext() *FullRoleContext

NewFullRoleContext creates a new context for rendering role

func (*FullRoleContext) MarshalJSON

func (fr *FullRoleContext) MarshalJSON() ([]byte, error)

MarshalJSON function

func (*FullRoleContext) SetFullRole

func (fr *FullRoleContext) SetFullRole(role ybaclient.Role)

SetFullRole initializes the context with the role data

func (*FullRoleContext) Write

func (fr *FullRoleContext) Write() error

Write populates the output table to be displayed in the command line

Jump to

Keyboard shortcuts

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