Documentation
¶
Index ¶
- Constants
- func StringInterfaceFromJSON(data io.Reader) map[string]interface{}
- func StringInterfaceToJSON(objmap map[string]interface{}) string
- type Client
- func (client *Client) CreatePost(post *model.Post) (*model.Post, error)
- func (client *Client) DM(userID string, format string, args ...interface{})
- func (client *Client) DMPost(userID string, post *model.Post) (*model.Post, error)
- func (client *Client) KVDelete(id string, prefix string) (bool, error)
- func (client *Client) KVGet(id string, prefix string) (map[string]interface{}, error)
- func (client *Client) KVSet(id string, prefix string, in map[string]interface{}) (map[string]interface{}, error)
- func (client *Client) Subscribe(sub *apps.Subscription) (*apps.SubscriptionResponse, error)
- func (client *Client) Unsubscribe(sub *apps.Subscription) (*apps.SubscriptionResponse, error)
- type ClientPP
- func (c *ClientPP) DoAPIDELETE(url string) (*http.Response, *model.AppError)
- func (c *ClientPP) DoAPIGET(url string, etag string) (*http.Response, *model.AppError)
- func (c *ClientPP) DoAPIPOST(url string, data string) (*http.Response, *model.AppError)
- func (c *ClientPP) DoAPIRequest(method, url, data, etag string) (*http.Response, *model.AppError)
- func (c *ClientPP) GetPluginRoute(pluginID string) string
- func (c *ClientPP) GetPluginsRoute() string
- func (c *ClientPP) KVDelete(id string, prefix string) (bool, *model.Response)
- func (c *ClientPP) KVGet(id string, prefix string) (map[string]interface{}, *model.Response)
- func (c *ClientPP) KVSet(id string, prefix string, in map[string]interface{}) (map[string]interface{}, *model.Response)
- func (c *ClientPP) Subscribe(request *apps.Subscription) (*apps.SubscriptionResponse, *model.Response)
- func (c *ClientPP) Unsubscribe(request *apps.Subscription) (*apps.SubscriptionResponse, *model.Response)
Constants ¶
View Source
const ( HeaderEtagClient = "If-None-Match" HeaderAuth = "Authorization" APIPathPP = "/api/v1" APIUrlSuffixV4 = "/api/v4" APIUrlSuffix = APIUrlSuffixV4 AppsPluginName = "com.mattermost.apps" )
Variables ¶
This section is empty.
Functions ¶
func StringInterfaceFromJSON ¶
func StringInterfaceToJSON ¶
Types ¶
type Client ¶
func AsActingUser ¶
func (*Client) Subscribe ¶
func (client *Client) Subscribe(sub *apps.Subscription) (*apps.SubscriptionResponse, error)
func (*Client) Unsubscribe ¶
func (client *Client) Unsubscribe(sub *apps.Subscription) (*apps.SubscriptionResponse, error)
type ClientPP ¶
type ClientPP struct {
URL string // The location of the server, for example "http://localhost:8065"
APIURL string // The api location of the server, for example "http://localhost:8065/api/v4"
HTTPClient *http.Client // The http client
AuthToken string
AuthType string
HTTPHeader map[string]string // Headers to be copied over for each request
// contains filtered or unexported fields
}
func NewAPIClientPP ¶
func (*ClientPP) DoAPIDELETE ¶
func (*ClientPP) DoAPIRequest ¶
func (*ClientPP) GetPluginRoute ¶
func (*ClientPP) GetPluginsRoute ¶
func (*ClientPP) Subscribe ¶
func (c *ClientPP) Subscribe(request *apps.Subscription) (*apps.SubscriptionResponse, *model.Response)
func (*ClientPP) Unsubscribe ¶
func (c *ClientPP) Unsubscribe(request *apps.Subscription) (*apps.SubscriptionResponse, *model.Response)
Click to show internal directories.
Click to hide internal directories.