| 1 | package slackscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/ |
| 2 | |
| 3 | // TextInputSubtype Accepts email, number, tel, or url. In some form factors, optimized input is provided for this subtype. |
| 4 | type TextInputSubtypescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/TextInputSubtype# string |
| 5 | |
| 6 | // TextInputOption handle to extra inputs options. |
| 7 | type TextInputOptionscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/TextInputOption# func(*TextInputElementscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/TextInputElement#) |
| 8 | |
| 9 | const ( |
| 10 | // InputSubtypeEmail email keyboard |
| 11 | InputSubtypeEmailscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/InputSubtypeEmail. TextInputSubtypescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/TextInputSubtype# = "email" |
| 12 | // InputSubtypeNumber numeric keyboard |
| 13 | InputSubtypeNumberscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/InputSubtypeNumber. TextInputSubtypescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/TextInputSubtype# = "number" |
| 14 | // InputSubtypeTel Phone keyboard |
| 15 | InputSubtypeTelscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/InputSubtypeTel. TextInputSubtypescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/TextInputSubtype# = "tel" |
| 16 | // InputSubtypeURL Phone keyboard |
| 17 | InputSubtypeURLscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/InputSubtypeURL. TextInputSubtypescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/TextInputSubtype# = "url" |
| 18 | ) |
| 19 | |
| 20 | // TextInputElement subtype of DialogInput |
| 21 | // https://api.slack.com/dialogs#option_element_attributes#text_element_attributes |
| 22 | type TextInputElementscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/TextInputElement# struct { |
| 23 | DialogInputscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/TextInputElement#DialogInput. |
| 24 | MaxLengthscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/TextInputElement#MaxLength. int `json:"max_length,omitempty"` |
| 25 | MinLengthscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/TextInputElement#MinLength. int `json:"min_length,omitempty"` |
| 26 | Hintscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/TextInputElement#Hint. string `json:"hint,omitempty"` |
| 27 | Subtypescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/TextInputElement#Subtype. TextInputSubtypescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/TextInputSubtype# `json:"subtype"` |
| 28 | Valuescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/TextInputElement#Value. string `json:"value"` |
| 29 | } |
| 30 | |
| 31 | // NewTextInput constructor for a `text` input |
| 32 | func NewTextInputscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/NewTextInput().(name, label, text string, options ...TextInputOptionscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/TextInputOption#) *TextInputElementscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/TextInputElement# { |
| 33 | t := &TextInputElementscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/TextInputElement#{ |
| 34 | DialogInputscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/TextInputElement#DialogInput.: DialogInputscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/DialogInput#{ |
| 35 | Typescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/DialogInput#Type.: InputTypeTextscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/InputTypeText., |
| 36 | Namescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/DialogInput#Name.: name, |
| 37 | Labelscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/DialogInput#Label.: label, |
| 38 | }, |
| 39 | Valuescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/TextInputElement#Value.: text, |
| 40 | } |
| 41 | |
| 42 | for _, opt := range options { |
| 43 | opt(t) |
| 44 | } |
| 45 | |
| 46 | return t |
| 47 | } |
| 48 | |
| 49 | // NewTextAreaInput constructor for a `textarea` input |
| 50 | func NewTextAreaInputscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/NewTextAreaInput().(name, label, text string) *TextInputElementscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/TextInputElement# { |
| 51 | return &TextInputElementscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/TextInputElement#{ |
| 52 | DialogInputscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/TextInputElement#DialogInput.: DialogInputscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/DialogInput#{ |
| 53 | Typescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/DialogInput#Type.: InputTypeTextAreascip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/InputTypeTextArea., |
| 54 | Namescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/DialogInput#Name.: name, |
| 55 | Labelscip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/DialogInput#Label.: label, |
| 56 | }, |
| 57 | Valuescip-go gomod github.com/slack-go/slack . `github.com/slack-go/slack`/TextInputElement#Value.: text, |
| 58 | } |
| 59 | } |