Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) CreatePost(post *model.Post) (*model.Post, error)
- func (c *Client) DM(userID string, format string, args ...interface{})
- func (c *Client) DMPost(userID string, post *model.Post) (*model.Post, error)
- func (c *Client) GetOAuth2User(appID apps.AppID, ref interface{}) error
- func (c *Client) KVDelete(id string, prefix string) (bool, error)
- func (c *Client) KVGet(id string, prefix string, ref interface{}) error
- func (c *Client) KVSet(id string, prefix string, in interface{}) (interface{}, error)
- func (c *Client) StoreOAuth2App(appID apps.AppID, clientID, clientSecret string) error
- func (c *Client) StoreOAuth2User(appID apps.AppID, ref interface{}) error
- func (c *Client) Subscribe(sub *apps.Subscription) (*apps.SubscriptionResponse, error)
- func (c *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) GetOAuth2User(appID apps.AppID, ref interface{}) *model.Response
- 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, ref interface{}) *model.Response
- func (c *ClientPP) KVSet(id string, prefix string, in interface{}) (interface{}, *model.Response)
- func (c *ClientPP) SetOAuthToken(token string)
- func (c *ClientPP) StoreOAuth2App(appID apps.AppID, clientID, clientSecret string) *model.Response
- func (c *ClientPP) StoreOAuth2User(appID apps.AppID, ref 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" AppsPluginName = "com.mattermost.apps" )
View Source
const ( // Top-level path PathAPI = "/api/v1" // Other sub-paths. PathKV = "/kv" PathSubscribe = "/subscribe" PathUnsubscribe = "/unsubscribe" PathBotIDs = "/bot-ids" PathOAuthAppIDs = "/oauth-app-ids" PathOAuth2App = "/oauth2/app" PathOAuth2User = "/oauth2/user" PathOAuth2CreateState = "/oauth2/create-state" )
Paths for the REST APIs exposed by the proxy plugin itself
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func AsActingUser ¶
func (*Client) GetOAuth2User ¶ added in v0.3.0
func (*Client) StoreOAuth2App ¶ added in v0.3.0
func (*Client) StoreOAuth2User ¶ added in v0.3.0
func (*Client) Subscribe ¶
func (c *Client) Subscribe(sub *apps.Subscription) (*apps.SubscriptionResponse, error)
func (*Client) Unsubscribe ¶
func (c *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) GetOAuth2User ¶ added in v0.3.0
func (*ClientPP) GetPluginRoute ¶
func (*ClientPP) GetPluginsRoute ¶
func (*ClientPP) SetOAuthToken ¶ added in v0.3.0
func (*ClientPP) StoreOAuth2App ¶ added in v0.3.0
func (*ClientPP) StoreOAuth2User ¶ added in v0.3.0
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.