Documentation ¶
Index ¶
- type AppServices
- func (a *AppServices) GetOAuth2User(r *incoming.Request) ([]byte, error)
- func (a *AppServices) GetSubscriptions(r *incoming.Request) (out []apps.Subscription, err error)
- func (a *AppServices) KVDebugAppInfo(r *incoming.Request, appID apps.AppID) (*store.KVDebugAppInfo, error)
- func (a *AppServices) KVDebugInfo(r *incoming.Request) (*store.KVDebugInfo, error)
- func (a *AppServices) KVDelete(r *incoming.Request, prefix, id string) error
- func (a *AppServices) KVGet(r *incoming.Request, prefix, id string) ([]byte, error)
- func (a *AppServices) KVList(r *incoming.Request, prefix string, processf func(key string) error) error
- func (a *AppServices) KVSet(r *incoming.Request, prefix, id string, data []byte) (bool, error)
- func (a *AppServices) StoreOAuth2App(r *incoming.Request, data []byte) error
- func (a *AppServices) StoreOAuth2User(r *incoming.Request, data []byte) error
- func (a *AppServices) Subscribe(r *incoming.Request, sub apps.Subscription) error
- func (a *AppServices) Unsubscribe(r *incoming.Request, e apps.Event) error
- func (a *AppServices) UnsubscribeApp(r *incoming.Request, appID apps.AppID) error
- type PermissionChecker
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppServices ¶
type AppServices struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(store *store.Service) *AppServices
func (*AppServices) GetOAuth2User ¶ added in v0.3.0
func (a *AppServices) GetOAuth2User(r *incoming.Request) ([]byte, error)
GetOAuth2User returns the stored OAuth2 user data for a given user and app. If err != nil, the returned data is always valid JSON.
func (*AppServices) GetSubscriptions ¶ added in v1.0.0
func (a *AppServices) GetSubscriptions(r *incoming.Request) (out []apps.Subscription, err error)
func (*AppServices) KVDebugAppInfo ¶ added in v1.2.0
func (a *AppServices) KVDebugAppInfo(r *incoming.Request, appID apps.AppID) (*store.KVDebugAppInfo, error)
func (*AppServices) KVDebugInfo ¶ added in v1.2.0
func (a *AppServices) KVDebugInfo(r *incoming.Request) (*store.KVDebugInfo, error)
func (*AppServices) KVDelete ¶
func (a *AppServices) KVDelete(r *incoming.Request, prefix, id string) error
func (*AppServices) KVGet ¶
KVGet returns the stored KV data for a given user and app. If err != nil, the returned data is always valid JSON.
func (*AppServices) StoreOAuth2App ¶ added in v0.3.0
func (a *AppServices) StoreOAuth2App(r *incoming.Request, data []byte) error
func (*AppServices) StoreOAuth2User ¶ added in v0.3.0
func (a *AppServices) StoreOAuth2User(r *incoming.Request, data []byte) error
func (*AppServices) Subscribe ¶
func (a *AppServices) Subscribe(r *incoming.Request, sub apps.Subscription) error
func (*AppServices) Unsubscribe ¶
func (*AppServices) UnsubscribeApp ¶ added in v1.2.0
type PermissionChecker ¶ added in v1.0.0
type PermissionChecker interface { HasPermissionTo(userID string, permission *model.Permission) bool HasPermissionToChannel(userID, channelID string, permission *model.Permission) bool HasPermissionToTeam(userID, teamID string, permission *model.Permission) bool }
type Service ¶
type Service interface { Subscribe(*incoming.Request, apps.Subscription) error GetSubscriptions(*incoming.Request) ([]apps.Subscription, error) Unsubscribe(*incoming.Request, apps.Event) error UnsubscribeApp(*incoming.Request, apps.AppID) error KVSet(_ *incoming.Request, prefix, id string, data []byte) (bool, error) KVGet(_ *incoming.Request, prefix, id string) ([]byte, error) KVDelete(_ *incoming.Request, prefix, id string) error KVList(_ *incoming.Request, namespace string, processf func(key string) error) error KVDebugInfo(*incoming.Request) (*store.KVDebugInfo, error) KVDebugAppInfo(*incoming.Request, apps.AppID) (*store.KVDebugAppInfo, error) StoreOAuth2App(_ *incoming.Request, data []byte) error StoreOAuth2User(_ *incoming.Request, data []byte) error GetOAuth2User(_ *incoming.Request) ([]byte, error) }
Click to show internal directories.
Click to hide internal directories.