orgSwitch

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPageSize = 100
)

Variables

This section is empty.

Functions

func RenderCreator

func RenderCreator() protocol.CompRender

Types

type Data

type Data struct {
	List []OrgItem `json:"list"`
}
type MenuItem struct {
	Label        string                 `json:"label"`
	Value        string                 `json:"value"`
	PrefixImgSrc string                 `json:"prefixImgSrc"`
	Operations   map[string]interface{} `json:"operations"`
}

func RenItem

func RenItem(org apistructs.OrgDTO) MenuItem

type Meta

type Meta struct {
	Id       string `json:"id"`
	Severity string `json:"severity"`
}

type Operation

type Operation struct {
	Key        string `json:"key"`
	Reload     bool   `json:"reload"`
	Disabled   bool   `json:"disabled"`
	Text       string `json:"text"`
	PrefixIcon string `json:"prefixIcon"`
	Meta       Meta   `json:"meta"`
}

type OrgItem

type OrgItem struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	DisplayName string `json:"display_name"`
	IsPublic    bool   `json:"is_public"`
	Status      string `json:"status"`
}

type OrgSwitch

type OrgSwitch struct {
	Type  string `json:"type"`
	Props props  `json:"props"`
	//Data Data `json:"data"`
	State State `json:"state"`
	// contains filtered or unexported fields
}

func (*OrgSwitch) RenderList

func (this *OrgSwitch) RenderList() error

func (*OrgSwitch) SetCtxBundle

func (this *OrgSwitch) SetCtxBundle(ctx context.Context) error

type State

type State struct {
	//OrgID string `json:"orgID"`
	Value string `json:"value"`
	Label string `json:"label"`
}

Jump to

Keyboard shortcuts

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