Documentation ¶
Index ¶
- Variables
- func Build(ctx context.Context, title, level, content string) ([]byte, error)
- func ResponseHook(body []byte) error
- func TagElementToMap(e TagElement) (map[string]interface{}, error)
- func TagElementsToMap(elem ...TagElement) ([][]map[string]interface{}, error)
- type Content
- type ContentBody
- type ElementHref
- type ElementImg
- type ElementPin
- type ElementText
- type TagElement
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidMessage = errors.New("invalid message") ErrInvalidSignature = errors.New("invalid signature") )
Functions ¶
func ResponseHook ¶
func TagElementToMap ¶
func TagElementToMap(e TagElement) (map[string]interface{}, error)
func TagElementsToMap ¶
func TagElementsToMap(elem ...TagElement) ([][]map[string]interface{}, error)
Types ¶
type Content ¶
type Content struct {
Post map[string]ContentBody `json:"post"`
}
type ContentBody ¶
type ElementHref ¶
func (*ElementHref) Tag ¶
func (v *ElementHref) Tag() string
type ElementImg ¶
type ElementImg struct { ImageKey string `mapstructure:"image_key"` W int `mapstructure:"width"` H int `mapstructure:"height"` }
func (*ElementImg) Tag ¶
func (v *ElementImg) Tag() string
type ElementPin ¶
type ElementPin struct {
UserID string `mapstructure:"user_id"`
}
func (*ElementPin) Tag ¶
func (v *ElementPin) Tag() string
type ElementText ¶
type ElementText struct {
Text string `mapstructure:"text"`
}
func (*ElementText) Tag ¶
func (v *ElementText) Tag() string
type TagElement ¶
type TagElement interface {
Tag() string
}
Click to show internal directories.
Click to hide internal directories.