myProjectList

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPageNo   = 1
	DefaultPageSize = 5
)

Variables

This section is empty.

Functions

func RenderCreator

func RenderCreator() protocol.CompRender

Types

type Command

type Command struct {
	Key    string                 `json:"key"`
	Target string                 `json:"target"`
	State  map[string]interface{} `json:"state"`
}

type Data

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

func (Data) Len

func (s Data) Len() int

func (Data) Less

func (s Data) Less(i, j int) bool

func (Data) Swap

func (s Data) Swap(i, j int)

type Meta

type Meta struct {
	PageNo PageNo `json:"pageNo"`
}

type MyProjectList

type MyProjectList struct {
	Type       string                 `json:"type"`
	Props      Props                  `json:"props"`
	State      State                  `json:"state"`
	Data       Data                   `json:"data"`
	Operations map[string]interface{} `json:"operations"`
	// contains filtered or unexported fields
}

func (*MyProjectList) GenComponentState

func (this *MyProjectList) GenComponentState(c *apistructs.Component) error

GenComponentState 获取state

func (*MyProjectList) SetCtxBundle

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

type Operation

type Operation struct {
	Command Command `json:"command"`
	Key     string  `json:"key"`
	Reload  bool    `json:"reload"`
	Show    bool    `json:"show"`
}

type OperationData

type OperationData struct {
	FillMeta string `json:"fillMeta"`
	Meta     Meta   `json:"meta"`
}

type PageNo

type PageNo struct {
	PageNo int `json:"pageNo"`
}

type ProItem

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

func RenItem

func RenItem(pro apistructs.ProjectDTO, orgName string) ProItem

type Props

type Props struct {
	Visible     bool   `json:"visible"`
	IsLoadMore  bool   `json:"isLoadMore"`
	AlignCenter bool   `json:"alignCenter"`
	Size        string `json:"size"`
	NoBorder    bool   `json:"noBorder"`
}

type State

type State struct {
	//HavePros bool `json:"havePros"`
	//HaveApps bool `json:"haveApps"`
	IsFirstFilter bool                   `json:"isFirstFilter"`
	Values        map[string]interface{} `json:"values"`
	PageNo        int                    `json:"pageNo"`
	PageSize      int                    `json:"pageSize"`
	Total         int                    `json:"total"`
	ProNums       int                    `json:"prosNum"`
}

Jump to

Keyboard shortcuts

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