list

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountActiveTime

func CountActiveTime(ActiveTimeStr string) (string, error)

func RenderCreator

func RenderCreator() protocol.CompRender

Types

type Command

type Command struct {
	Key    string `json:"key"`
	Target string `json:"target"`
}

type CommonList

type CommonList struct {
	Version    string                 `json:"version,omitempty"`
	Name       string                 `json:"name,omitempty"`
	Type       string                 `json:"type,omitempty"`
	Props      Props                  `json:"props,omitempty"`
	State      State                  `json:"state,omitempty"`
	Operations map[string]interface{} `json:"operations,omitempty"`
	Data       Data                   `json:"data,omitempty"`
}

type ComponentList

type ComponentList struct {
	CommonList
	// contains filtered or unexported fields
}

func (*ComponentList) CheckVisible

func (i *ComponentList) CheckVisible() (bool, error)

func (*ComponentList) GenComponentState

func (i *ComponentList) GenComponentState(c *apistructs.Component) error

GenComponentState 获取state

func (*ComponentList) RenderChangePageNo

func (i *ComponentList) RenderChangePageNo(ops interface{}) error

func (*ComponentList) RenderChangePageSize

func (i *ComponentList) RenderChangePageSize(ops interface{}) error

func (*ComponentList) RenderExist

func (i *ComponentList) RenderExist(ops interface{}) error

func (*ComponentList) RenderList

func (i *ComponentList) RenderList() error

func (*ComponentList) RenderProtocol

RenderProtocol 渲染组件

func (*ComponentList) SetComponentValue

func (i *ComponentList) SetComponentValue() error

func (*ComponentList) SetCtxBundle

func (i *ComponentList) SetCtxBundle(b protocol.ContextBundle) error

SetCtxBundle 设置bundle

type Data

type Data struct {
	List []ProItem `json:"list"`
}

type ExtraInfos

type ExtraInfos struct {
	Icon    string `json:"icon,omitempty"`
	Text    string `json:"text,omitempty"`
	Tooltip string `json:"tooltip,omitempty"`
	Type    string `json:"type,omitempty"`
}

type Meta

type Meta struct {
	ID          uint64     `json:"id,omitempty"`
	PageSize    PageSizeNo `json:"pageSize,omitempty"`
	PageNo      PageSizeNo `json:"pageNo,omitempty"`
	ProjectId   uint64     `json:"projectId,omitempty"`
	ProjectName string     `json:"projectName,omitempty"`
}

func GetOpsInfo

func GetOpsInfo(opsData interface{}) (*Meta, error)

type Operation

type Operation struct {
	Key      string  `json:"key,omitempty"`
	Reload   bool    `json:"reload"`
	FillMeta string  `json:"fillMeta,omitempty"`
	Text     string  `json:"text,omitempty"`
	Show     bool    `json:"show,omitempty"`
	Command  Command `json:"command,omitempty"`
	Confirm  string  `json:"confirm,omitempty"`
	Meta     Meta    `json:"meta,omitempty"`
}

type PageSizeNo

type PageSizeNo struct {
	PageSize uint64 `json:"pageSize"`
	PageNo   uint64 `json:"pageNo"`
}

type ProItem

type ProItem struct {
	ID          string                 `json:"id"`
	Title       string                 `json:"title"`
	Description string                 `json:"description"`
	PrefixImg   string                 `json:"prefixImg"`
	ExtraInfos  []ExtraInfos           `json:"extraInfos"`
	Operations  map[string]interface{} `json:"operations"`
	ProjectId   uint64                 `json:"projectId"`
}

func RenItem

func RenItem(pro apistructs.ProjectDTO, orgDomain string) (ProItem, error)

type Props

type Props struct {
	PageSizeOptions []string `json:"pageSizeOptions"`
	Visible         bool     `json:"visible"`
}

type State

type State struct {
	PageNo        uint64                 `json:"pageNo"`
	PageSize      uint64                 `json:"pageSize"`
	Total         uint64                 `json:"total"`
	Query         map[string]interface{} `json:"query"` // 搜索
	IsFirstFilter bool                   `json:"isFirstFilter"`
	IsEmpty       bool                   `json:"isEmpty"` // 数据是否为空
}

Jump to

Keyboard shortcuts

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