Documentation ¶
Index ¶
- func AppendBinding(bb []apps.Binding, b *apps.Binding) []apps.Binding
- func OAuth2Logger(l utils.Logger, a *apps.OAuth2App, u *User) utils.Logger
- type App
- func (a *App) HandleCall(p string, h HandlerFunc)
- func (a *App) HandleCommand(command Command)
- func (a *App) RemoveConnectedUser(creq CallRequest) error
- func (a *App) StoreConnectedUser(creq CallRequest, user *User) error
- func (a App) WithIcon(iconPath string) *App
- func (a *App) WithManifest(m apps.Manifest) *App
- func (a *App) WithStatic(staticFS fs.FS) *App
- type CallRequest
- func (creq CallRequest) AppProxyURL(paths ...string) string
- func (creq CallRequest) AppendDebugJSON(in []apps.Field) []apps.Field
- func (creq CallRequest) AsActingUser() *appclient.Client
- func (creq CallRequest) AsBot() *appclient.Client
- func (creq CallRequest) BoolValue(name string) (value, found bool)
- func (creq CallRequest) GetValue(name, defaultValue string) string
- func (creq CallRequest) OAuth2User() *User
- func (creq CallRequest) Respond(message string, v interface{}) apps.CallResponse
- func (creq CallRequest) StringValue(name string) (string, bool)
- type Command
- type HandlerFunc
- func CallHandler(h func(CallRequest) (string, error)) HandlerFunc
- func FormHandler(h func(CallRequest) (apps.Form, error)) HandlerFunc
- func LookupHandler(h func(CallRequest) []apps.SelectOption) HandlerFunc
- func RequireAdmin(h HandlerFunc) HandlerFunc
- func RequireConnectedUser(h HandlerFunc) HandlerFunc
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
func (*App) HandleCall ¶
func (a *App) HandleCall(p string, h HandlerFunc)
func (*App) HandleCommand ¶
func (*App) RemoveConnectedUser ¶
func (a *App) RemoveConnectedUser(creq CallRequest) error
func (*App) StoreConnectedUser ¶
func (a *App) StoreConnectedUser(creq CallRequest, user *User) error
type CallRequest ¶
type CallRequest struct { apps.CallRequest App App GoContext context.Context // contains filtered or unexported fields }
func (CallRequest) AppProxyURL ¶
func (creq CallRequest) AppProxyURL(paths ...string) string
func (CallRequest) AppendDebugJSON ¶
func (creq CallRequest) AppendDebugJSON(in []apps.Field) []apps.Field
func (CallRequest) AsActingUser ¶
func (creq CallRequest) AsActingUser() *appclient.Client
func (CallRequest) AsBot ¶
func (creq CallRequest) AsBot() *appclient.Client
func (CallRequest) BoolValue ¶
func (creq CallRequest) BoolValue(name string) (value, found bool)
func (CallRequest) GetValue ¶
func (creq CallRequest) GetValue(name, defaultValue string) string
GetValue scans Values, then State if it is a map for a name, returns the value, or the default if not found.
func (CallRequest) OAuth2User ¶
func (creq CallRequest) OAuth2User() *User
func (CallRequest) Respond ¶
func (creq CallRequest) Respond(message string, v interface{}) apps.CallResponse
func (CallRequest) StringValue ¶
func (creq CallRequest) StringValue(name string) (string, bool)
type Command ¶
type Command struct { Name string Hint string Description string Icon string BaseSubmit *apps.Call BaseForm *apps.Form Handler func(CallRequest) apps.CallResponse }
func ConnectCommand ¶
func DisconnectCommand ¶
type HandlerFunc ¶
type HandlerFunc func(CallRequest) apps.CallResponse
func CallHandler ¶
func CallHandler(h func(CallRequest) (string, error)) HandlerFunc
func FormHandler ¶
func FormHandler(h func(CallRequest) (apps.Form, error)) HandlerFunc
func LookupHandler ¶
func LookupHandler(h func(CallRequest) []apps.SelectOption) HandlerFunc
func RequireAdmin ¶
func RequireAdmin(h HandlerFunc) HandlerFunc
func RequireConnectedUser ¶
func RequireConnectedUser(h HandlerFunc) HandlerFunc
Click to show internal directories.
Click to hide internal directories.