Documentation ¶
Index ¶
- Variables
- type IChat
- type IChatFile
- type IChatMessage
- type IResponse
- type IRest
- type ISendMessageResponse
- type IToken
- type Response
- type Rest
- func (b *Rest) Get(payload map[string]interface{}, link string) (*Response, error)
- func (b *Rest) GetConfig(key string) string
- func (b *Rest) GetConfigData() map[string]interface{}
- func (b *Rest) GetWithHeader(payload map[string]interface{}, link string, header map[string]string) (*Response, error)
- func (b *Rest) GetWithHeaderNoAuth(payload map[string]interface{}, link string, header map[string]string) (*Response, error)
- func (b *Rest) Post(payload map[string]interface{}, link string) (*Response, error)
- func (b *Rest) PostWithContext(payload map[string]interface{}, link string, ctx context.Context) (*Response, error)
- func (b *Rest) PostWithHeader(payload map[string]interface{}, link string, header map[string]string) (*Response, error)
- func (b *Rest) PostWithHeaderNoAuth(payload map[string]interface{}, link string, header map[string]string) (*Response, error)
- func (b *Rest) SetConfig(key string, value string)
- func (b *Rest) SetToken(token IToken) error
- type Token
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrChatMessageTextEmpty = errors.New("texto inválido") ErrChatMessageNumberEmpty = errors.New("número inválido") ErrChatMessageContactIDEmpty = errors.New("contactId inválido") ErrChatMessageServiceIDEmpty = errors.New("serviceId inválido") ErrChatMessageFileBase64Empty = errors.New("base64 inválido") ErrChatMessageFileMimetypeEmpty = errors.New("mimetype inválido") ErrChatMessageFileNameEmpty = errors.New("name inválido") ErrAuthenticationFailed = errors.New("autenticação falhou") )
Functions ¶
This section is empty.
Types ¶
type IChat ¶
type IChat interface {
SendMessage(IChatMessage) error
}
type IChatMessage ¶
type IRest ¶
type IRest interface { Post(payload map[string]interface{}, link string) (*Response, error) PostWithContext(payload map[string]interface{}, link string, ctx context.Context) (*Response, error) Get(payload map[string]interface{}, link string) (*Response, error) PostWithHeader(payload map[string]interface{}, link string, header map[string]string) (*Response, error) GetWithHeader(payload map[string]interface{}, link string, header map[string]string) (*Response, error) SetToken(token IToken) error SetConfig(key string, value string) GetConfig(key string) string GetConfigData() map[string]string // contains filtered or unexported methods }
type ISendMessageResponse ¶
type ISendMessageResponse interface {
GetID() string
}
type Rest ¶
type Rest struct {
// contains filtered or unexported fields
}
func (*Rest) GetConfigData ¶
func (*Rest) GetWithHeader ¶
func (*Rest) GetWithHeaderNoAuth ¶ added in v0.5.0
func (*Rest) PostWithContext ¶
func (*Rest) PostWithHeader ¶
func (*Rest) PostWithHeaderNoAuth ¶
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
func (*Token) GetValidity ¶
func (*Token) SetValidity ¶
Click to show internal directories.
Click to hide internal directories.