Documentation
¶
Index ¶
- Constants
- func WriteCallError(w http.ResponseWriter, statusCode int, err error)
- type Proxy
- func (p *Proxy) AddBuiltinUpstream(appID apps.AppID, up upstream.Upstream)
- func (p *Proxy) AddLocalManifest(actingUserID string, m *apps.Manifest) (md.MD, error)
- func (p *Proxy) AppIsEnabled(app *apps.App) bool
- func (p *Proxy) Call(sessionID, actingUserID string, creq *apps.CallRequest) *apps.ProxyCallResponse
- func (p *Proxy) CompleteRemoteOAuth2(sessionID, actingUserID string, appID apps.AppID, ...) error
- func (p *Proxy) DisableApp(cc *apps.Context, app *apps.App) (md.MD, error)
- func (p *Proxy) EnableApp(cc *apps.Context, app *apps.App) (md.MD, error)
- func (p *Proxy) GetAsset(appID apps.AppID, path string) (io.ReadCloser, int, error)
- func (p *Proxy) GetBindings(sessionID, actingUserID string, cc *apps.Context) ([]*apps.Binding, error)
- func (p *Proxy) GetBindingsForApp(sessionID, actingUserID string, cc *apps.Context, app *apps.App) []*apps.Binding
- func (p *Proxy) GetInstalledApp(appID apps.AppID) (*apps.App, error)
- func (p *Proxy) GetInstalledApps() []*apps.App
- func (p *Proxy) GetListedApps(filter string) []*apps.ListedApp
- func (p *Proxy) GetManifest(appID apps.AppID) (*apps.Manifest, error)
- func (p *Proxy) GetManifestFromS3(appID apps.AppID, version apps.AppVersion) (*apps.Manifest, error)
- func (p *Proxy) GetRemoteOAuth2ConnectURL(sessionID, actingUserID string, appID apps.AppID) (string, error)
- func (p *Proxy) InstallApp(sessionID, actingUserID string, cc *apps.Context, trusted bool, secret string) (*apps.App, md.MD, error)
- func (p *Proxy) Notify(cc *apps.Context, subj apps.Subject) error
- func (p *Proxy) NotifyRemoteWebhook(app *apps.App, data []byte, webhookPath string) error
- func (p *Proxy) SynchronizeInstalledApps() error
- func (p *Proxy) UninstallApp(sessionID, actingUserID string, appID apps.AppID) error
- type Service
Constants ¶
View Source
const PrevVersion = "prev_version"
Variables ¶
This section is empty.
Functions ¶
func WriteCallError ¶
func WriteCallError(w http.ResponseWriter, statusCode int, err error)
Types ¶
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Proxy) AddBuiltinUpstream ¶
func (*Proxy) AddLocalManifest ¶
func (*Proxy) Call ¶
func (p *Proxy) Call(sessionID, actingUserID string, creq *apps.CallRequest) *apps.ProxyCallResponse
func (*Proxy) CompleteRemoteOAuth2 ¶ added in v0.3.0
func (*Proxy) DisableApp ¶
TODO: Context vetting needs to be done by the caller via cleanUserAgentContext.
func (*Proxy) EnableApp ¶
TODO: Context vetting needs to be done by the caller via cleanUserAgentContext.
func (*Proxy) GetBindings ¶
func (p *Proxy) GetBindings(sessionID, actingUserID string, cc *apps.Context) ([]*apps.Binding, error)
GetBindings fetches bindings for all apps. We should avoid unnecessary logging here as this route is called very often.
func (*Proxy) GetBindingsForApp ¶ added in v0.3.0
func (p *Proxy) GetBindingsForApp(sessionID, actingUserID string, cc *apps.Context, app *apps.App) []*apps.Binding
GetBindingsForApp fetches bindings for a specific apps. We should avoid unnecessary logging here as this route is called very often.
func (*Proxy) GetInstalledApp ¶
func (*Proxy) GetInstalledApps ¶
func (*Proxy) GetManifestFromS3 ¶ added in v0.7.0
func (*Proxy) GetRemoteOAuth2ConnectURL ¶ added in v0.3.0
func (*Proxy) InstallApp ¶
func (*Proxy) NotifyRemoteWebhook ¶ added in v0.3.0
func (*Proxy) SynchronizeInstalledApps ¶
SynchronizeInstalledApps synchronizes installed apps with known manifests, performing OnVersionChanged call on the App as needed.
type Service ¶
type Service interface {
Call(sessionID, actingUserID string, creq *apps.CallRequest) *apps.ProxyCallResponse
CompleteRemoteOAuth2(sessionID, actingUserID string, appID apps.AppID, urlValues map[string]interface{}) error
GetAsset(appID apps.AppID, path string) (io.ReadCloser, int, error)
GetBindings(sessionID, actingUserID string, cc *apps.Context) ([]*apps.Binding, error)
GetRemoteOAuth2ConnectURL(sessionID, actingUserID string, appID apps.AppID) (string, error)
Notify(cc *apps.Context, subj apps.Subject) error
NotifyRemoteWebhook(app *apps.App, data []byte, path string) error
AddLocalManifest(actingUserID string, m *apps.Manifest) (md.MD, error)
AppIsEnabled(app *apps.App) bool
DisableApp(cc *apps.Context, app *apps.App) (md.MD, error)
EnableApp(cc *apps.Context, app *apps.App) (md.MD, error)
GetInstalledApp(appID apps.AppID) (*apps.App, error)
GetInstalledApps() []*apps.App
GetListedApps(filter string) []*apps.ListedApp
GetManifest(appID apps.AppID) (*apps.Manifest, error)
GetManifestFromS3(appID apps.AppID, version apps.AppVersion) (*apps.Manifest, error)
InstallApp(sessionID, actingUserID string, cc *apps.Context, trusted bool, secret string) (*apps.App, md.MD, error)
SynchronizeInstalledApps() error
UninstallApp(sessionID, actingUserID string, appID apps.AppID) error
AddBuiltinUpstream(apps.AppID, upstream.Upstream)
}
Click to show internal directories.
Click to hide internal directories.