card

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Approval

type Approval struct {
	Fields        []Field `json:"fields"`
	CallbackValue []Value `json:"callback_value"`
	HideForm      bool    `json:"hide_form"`
	Title         string  `json:"title"`
	WantContent   string  `json:"want_content"`
}

func (*Approval) Build

func (a *Approval) Build() map[string]interface{}

func (*Approval) SetToCallbackValue

func (a *Approval) SetToCallbackValue(callbackValues []Value) Builder

func (*Approval) SetToFields

func (a *Approval) SetToFields(Fields []Field) Builder

func (*Approval) SetToHideForm added in v0.1.8

func (a *Approval) SetToHideForm(hideForm bool) Builder

func (*Approval) SetToTitle

func (a *Approval) SetToTitle(title string) Builder

func (*Approval) SetWantResult added in v0.1.9

func (a *Approval) SetWantResult(content string) Builder

type Builder

type Builder interface {
	Build() map[string]interface{}
	SetToTitle(title string) Builder
	SetToFields(Fields []Field) Builder
	SetToHideForm(hideForm bool) Builder
	SetToCallbackValue(callbackValues []Value) Builder
	SetWantResult(content string) Builder
}

func NewApprovalCardBuilder

func NewApprovalCardBuilder() Builder

type Field

type Field struct {
	IsShort bool   `json:"is_short"`
	Tag     string `json:"tag"`
	Content string `json:"content"`
}

type Value

type Value struct {
	Key   string      `json:"key"`
	Value interface{} `json:"value"`
}

Jump to

Keyboard shortcuts

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