Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Call(creq apps.CallRequest) (*apps.CallResponse, error)
- func (c *Client) CreatePost(post *model.Post) (*model.Post, error)
- func (c *Client) DM(userID string, format string, args ...interface{}) (*model.Post, error)
- func (c *Client) DMPost(userID string, post *model.Post) (*model.Post, error)
- func (c *Client) GetOAuth2User(ref interface{}) error
- func (c *Client) GetSubscriptions() ([]apps.Subscription, error)
- func (c *Client) KVDelete(prefix, id string) error
- func (c *Client) KVGet(prefix, id string, ref interface{}) error
- func (c *Client) KVSet(prefix, id string, in interface{}) (bool, error)
- func (c *Client) StoreOAuth2App(oauth2App apps.OAuth2App) error
- func (c *Client) StoreOAuth2User(ref interface{}) error
- func (c *Client) Subscribe(sub *apps.Subscription) error
- func (c *Client) Unsubscribe(sub *apps.Subscription) error
- type ClientPP
- func (c *ClientPP) Call(creq apps.CallRequest) (*apps.CallResponse, *model.Response, error)
- func (c *ClientPP) DisableApp(appID apps.AppID) (*model.Response, error)
- func (c *ClientPP) DoAPIDELETE(url string) (*http.Response, error)
- func (c *ClientPP) DoAPIGET(url string, etag string) (*http.Response, error)
- func (c *ClientPP) DoAPIPOST(url string, data string) (*http.Response, error)
- func (c *ClientPP) DoAPIRequest(method, url, data, etag string) (*http.Response, error)
- func (c *ClientPP) EnableApp(appID apps.AppID) (*model.Response, error)
- func (c *ClientPP) GetApp(appID apps.AppID) (*apps.App, *model.Response, error)
- func (c *ClientPP) GetListedApps(filter string, includePlugins bool) ([]apps.ListedApp, *model.Response, error)
- func (c *ClientPP) GetOAuth2User(ref interface{}) (*model.Response, error)
- func (c *ClientPP) GetPluginRoute(pluginID string) string
- func (c *ClientPP) GetSubscriptions() ([]apps.Subscription, *model.Response, error)
- func (c *ClientPP) InstallApp(appID apps.AppID, deployType apps.DeployType) (*model.Response, error)
- func (c *ClientPP) KVDelete(prefix, id string) (*model.Response, error)
- func (c *ClientPP) KVGet(prefix, id string, ref interface{}) (*model.Response, error)
- func (c *ClientPP) KVSet(prefix, id string, in interface{}) (bool, *model.Response, error)
- func (c *ClientPP) SetOAuthToken(token string)
- func (c *ClientPP) StoreOAuth2App(oauth2App apps.OAuth2App) (*model.Response, error)
- func (c *ClientPP) StoreOAuth2User(ref interface{}) (*model.Response, error)
- func (c *ClientPP) Subscribe(sub *apps.Subscription) (*model.Response, error)
- func (c *ClientPP) UninstallApp(appID apps.AppID) (*model.Response, error)
- func (c *ClientPP) Unsubscribe(sub *apps.Subscription) (*model.Response, error)
- func (c *ClientPP) UpdateAppListing(req UpdateAppListingRequest) (*model.Response, error)
- type UpdateAppListingRequest
Constants ¶
View Source
const ( HeaderEtagClient = "If-None-Match" HeaderAuth = "Authorization" AppsPluginName = "com.mattermost.apps" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func AsActingUser ¶
func (*Client) Call ¶
func (c *Client) Call(creq apps.CallRequest) (*apps.CallResponse, error)
func (*Client) GetOAuth2User ¶
func (*Client) GetSubscriptions ¶
func (c *Client) GetSubscriptions() ([]apps.Subscription, error)
func (*Client) StoreOAuth2User ¶
func (*Client) Unsubscribe ¶
func (c *Client) Unsubscribe(sub *apps.Subscription) error
type ClientPP ¶
type ClientPP struct { URL string // The location of the server, for example "http://localhost:8065" 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 NewAppsPluginAPIClient ¶
func NewAppsPluginAPIClientFromPluginAPI ¶
func NewAppsPluginAPIClientFromPluginAPI(api upplugin.PluginHTTPAPI) *ClientPP
func (*ClientPP) Call ¶
func (c *ClientPP) Call(creq apps.CallRequest) (*apps.CallResponse, *model.Response, error)
func (*ClientPP) DisableApp ¶
func (*ClientPP) DoAPIRequest ¶
func (*ClientPP) GetListedApps ¶
func (*ClientPP) GetOAuth2User ¶
func (*ClientPP) GetPluginRoute ¶
func (*ClientPP) GetSubscriptions ¶
func (*ClientPP) InstallApp ¶
func (c *ClientPP) InstallApp(appID apps.AppID, deployType apps.DeployType) (*model.Response, error)
InstallApp installs a app using a given manfest.
func (*ClientPP) SetOAuthToken ¶
func (*ClientPP) StoreOAuth2App ¶
func (*ClientPP) StoreOAuth2User ¶
func (*ClientPP) UninstallApp ¶
func (*ClientPP) Unsubscribe ¶
func (*ClientPP) UpdateAppListing ¶
func (c *ClientPP) UpdateAppListing(req UpdateAppListingRequest) (*model.Response, error)
UpdateAppListing adds a specified App manifest to the local store.
type UpdateAppListingRequest ¶
type UpdateAppListingRequest struct { // Manifest is the new app manifest to list. apps.Manifest // Replace causes the previously listed manifest to be dropped entirely. // When false, the deployment data from the new manifest will be combined // with the prerviously listed one. Replace bool // AddDeploys specifies which deployment types should be added to the // listing. AddDeploys apps.DeployTypes `json:"add_deploys,omitempty"` // RemoveDeploys specifies which deployment types should be removed from // the listing. RemoveDeploys apps.DeployTypes `json:"remove_deploys,omitempty"` }
Click to show internal directories.
Click to hide internal directories.