Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block interface { // Prep this block for Marshaling. Build() gojay.MarshalerJSONObject // Removes all the element and release the associated elements into their own pool for reuse. Release() }
type Composition ¶
type Composition interface { BuildComposition() gojay.MarshalerJSONObject // Removes all the element and release the associated elements into their own pool for reuse. Release() }
type ContextBlock ¶
func NewContextBlock ¶
func NewContextBlock(elements ...Element) *ContextBlock
func (ContextBlock) Build ¶
func (b ContextBlock) Build() gojay.MarshalerJSONObject
func (ContextBlock) IsNil ¶
func (b ContextBlock) IsNil() bool
func (ContextBlock) MarshalJSONObject ¶
func (b ContextBlock) MarshalJSONObject(enc *gojay.Encoder)
func (*ContextBlock) Release ¶
func (c *ContextBlock) Release()
type DividerBlock ¶
type DividerBlock struct {
BlockID string
}
func NewDividerBlock ¶
func NewDividerBlock() *DividerBlock
func (DividerBlock) Build ¶
func (b DividerBlock) Build() gojay.MarshalerJSONObject
func (DividerBlock) IsNil ¶
func (b DividerBlock) IsNil() bool
func (DividerBlock) MarshalJSONObject ¶
func (b DividerBlock) MarshalJSONObject(enc *gojay.Encoder)
func (*DividerBlock) Release ¶
func (c *DividerBlock) Release()
Removes all the element and release the associated elements into their own pool for reuse.
type Element ¶
type Element interface { BuildElement() gojay.MarshalerJSONObject // Removes all the element and release the associated elements into their own pool for reuse. Release() }
type FileBlock ¶
func NewFileBlock ¶
func (FileBlock) Build ¶
func (b FileBlock) Build() gojay.MarshalerJSONObject
func (FileBlock) MarshalJSONObject ¶
type HeaderBlock ¶
type HeaderBlock struct { Text *TextComposition BlockID string }
func NewHeaderBlock ¶
func NewHeaderBlock(text string) *HeaderBlock
Creates New HeaderBlock. Text with length higher than 150 will be truncated to that length.
func (HeaderBlock) Build ¶
func (b HeaderBlock) Build() gojay.MarshalerJSONObject
Prep this block for Marshaling.
func (HeaderBlock) IsNil ¶
func (b HeaderBlock) IsNil() bool
func (HeaderBlock) MarshalJSONObject ¶
func (b HeaderBlock) MarshalJSONObject(enc *gojay.Encoder)
func (*HeaderBlock) Release ¶
func (b *HeaderBlock) Release()
Removes all the element and release the associated elements into their own pool for reuse.
type SectionBlock ¶
type SectionBlock struct { Text *TextComposition Fields []*TextComposition BlockID string Accessory Element }
func NewSectionBlockFields ¶
func NewSectionBlockFields(t TextType, texts ...string) *SectionBlock
func NewSectionBlockText ¶
func NewSectionBlockText(t TextType, text string) *SectionBlock
func (SectionBlock) Build ¶
func (s SectionBlock) Build() gojay.MarshalerJSONObject
Prep this block for Marshaling.
func (SectionBlock) IsNil ¶
func (s SectionBlock) IsNil() bool
func (SectionBlock) MarshalJSONObject ¶
func (s SectionBlock) MarshalJSONObject(enc *gojay.Encoder)
func (*SectionBlock) Release ¶
func (s *SectionBlock) Release()
Removes all the element and release the associated elements into their own pool for reuse.
type TextComposition ¶
See https://api.slack.com/reference/block-kit/composition-objects#text for details.
func NewTextComposition ¶
func NewTextComposition(t TextType, text string) *TextComposition
func (TextComposition) BuildComposition ¶
func (t TextComposition) BuildComposition() gojay.MarshalerJSONObject
func (TextComposition) IsNil ¶
func (t TextComposition) IsNil() bool
func (TextComposition) MarshalJSONObject ¶
func (t TextComposition) MarshalJSONObject(enc *gojay.Encoder)
func (*TextComposition) Release ¶
func (t *TextComposition) Release()
Removes all the element and release the associated elements into their own pool for reuse.
Click to show internal directories.
Click to hide internal directories.