notifyConfigModal

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: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TypeOperation = map[string][]Option{
		"role": {
			{
				Name:  "email",
				Value: "email",
			},
			{
				Name:  "message",
				Value: "mbox",
			},
		},
		"user": {
			{
				Name:  "邮箱",
				Value: "email",
			},
			{
				Name:  "站内信",
				Value: "zhanneixin",
			},
		},
		"dingding": {
			{
				Name:  "DingTalk",
				Value: "dingding",
			},
		},
		"webhook": {
			{
				Name:  "webhook",
				Value: "webhook",
			},
		},
		"external_user": {
			{
				Name:  "邮箱",
				Value: "email",
			},
		},
	}
)

Functions

func RenderCreator

func RenderCreator() protocol.CompRender

Types

type ComponentModel

type ComponentModel struct {
	CtxBdl     protocol.ContextBundle
	Type       string         `json:"type"`
	Operations ModalOperation `json:"operations"`
	Props      Props          `json:"props"`
	State      State          `json:"state"`
}

func (*ComponentModel) Export

func (m *ComponentModel) Export(c *apistructs.Component) error

func (*ComponentModel) Import

func (m *ComponentModel) Import(c *apistructs.Component) error

type ComponentProps

type ComponentProps struct {
	Mode        string   `json:"mode"`
	PlaceHolder string   `json:"placeHolder"`
	Options     []Option `json:"options"`
	MaxLength   int64    `json:"maxLength"`
}

type Field

type Field struct {
	Key            string         `json:"key"`
	Label          string         `json:"label"`
	Component      string         `json:"component"`
	Required       bool           `json:"required"`
	ComponentProps ComponentProps `json:"componentProps"`
	RemoveWhen     [][]RemoveWhen `json:"removeWhen"`
	Disabled       bool           `json:"disabled"`
}

type ModalOperation

type ModalOperation struct {
	Submit Submit `json:"submit"`
}

type Option

type Option struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type Props

type Props struct {
	Name   string  `json:"name"`
	Fields []Field `json:"fields"`
}

type RemoveWhen

type RemoveWhen struct {
	Field    string `json:"field"`
	Operator string `json:"operator"`
	Value    string `json:"value"`
}

type State

type State struct {
	Operation string                 `json:"operation"`
	EditId    uint64                 `json:"editId"`
	Visible   bool                   `json:"visible"`
	FormData  map[string]interface{} `json:"formData"`
}

type Submit

type Submit struct {
	Key    string `json:"key"`
	Reload bool   `json:"reload"`
}

type TargetInfo

type TargetInfo struct {
	Channels []string `json:"channels"`
	GroupId  int64    `json:"group_id"`
}

Jump to

Keyboard shortcuts

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