Versions in this module Expand all Collapse all v0 v0.1.0 Apr 24, 2019 Changes in this version + const ActionTypeBuy + const ActionTypeLink + const ActionTypeLocationRequest + const ActionTypePostback + const ActionTypeReply + const ActionTypeShare + const ActionTypeWebview + const ImageRatioHorizontal + const ImageRatioSquare + const MessageTypeCarousel + const MessageTypeFile + const MessageTypeImage + const MessageTypeList + const MessageTypeLocation + const MessageTypeText + const RegionEU + const RegionUS + const RoleAppMaker + const RoleAppUser + const SizeCompact + const SizeLarge + const SourceTypeAndroid + const SourceTypeApi + const SourceTypeIOS + const SourceTypeLine + const SourceTypeMessenger + const SourceTypeTelegram + const SourceTypeTwilio + const SourceTypeViber + const SourceTypeWeChat + const SourceTypeWeb + const TriggerMessageAppMaker + const TriggerMessageAppUser + var ErrMessageNil = errors.New("message is nil") + var ErrMessageRoleEmpty = errors.New("message.Role is empty") + var ErrMessageTypeEmpty = errors.New("message.Type is empty") + var ErrUserIDEmpty = errors.New("user id is empty") + var ErrVerifySecretEmpty = errors.New("verify secret is empty") + func GenerateJWT(scope string, keyID string, secret string) (string, error) + func New(o Options) (*smoochClient, error) + type Action struct + Amount int + Currency string + Default bool + ID string + Metadata map[string]interface{} + Payload string + State string + Text string + Type ActionType + URI string + type ActionType string + type AppUser struct + ConversationStarted bool + ID string + UserID string + type Application struct + ID string + type Client interface + AddWebhookEventHandler func(handler WebhookEventHandler) + Handler func() http.Handler + Send func(userID string, message *Message) (*ResponsePayload, error) + VerifyRequest func(r *http.Request) bool + type Conversation struct + ID string + UnreadCount int + type DisplaySettings struct + ImageAspectRatio ImageRatio + type ErrorDetails struct + Code string + Description string + type ErrorPayload struct + Details ErrorDetails + type ImageRatio string + type Item struct + Actions []*Action + Description string + ID string + MediaType string + MediaURL string + Size Size + Title string + type Logger interface + Debugw func(msg string, keysAndValues ...interface{}) + Errorw func(msg string, keysAndValues ...interface{}) + Infow func(msg string, keysAndValues ...interface{}) + type Menu struct + Items []*MenuItem + type MenuItem struct + ID string + Text string + Type string + URI string + type MenuPayload struct + Menu Menu + type Message struct + Actions []*Action + AuthorID string + DisplaySettings *DisplaySettings + ID string + Items []*Item + MediaUrl string + Metadata map[string]interface{} + Name string + Received time.Time + Role Role + Source *Source + Text string + Type MessageType + func (m *Message) MarshalJSON() ([]byte, error) + func (m *Message) UnmarshalJSON(data []byte) error + type MessageType string + type Options struct + AppID string + HttpClient *http.Client + KeyID string + Logger Logger + Mux *http.ServeMux + Region string + Secret string + VerifySecret string + WebhookURL string + type Payload struct + App Application + AppUser AppUser + Conversation Conversation + Messages []*Message + Trigger string + Version string + type ResponsePayload struct + Conversation *Conversation + ExtraMessages []*Message + Message *Message + type Role string + type Size string + type SmoochError struct + func (e *SmoochError) Code() int + func (e *SmoochError) Error() string + type Source struct + Type string + type WebhookEventHandler func(payload *Payload)