Documentation
¶
Index ¶
Constants ¶
View Source
const ( PAY_INVOICE_SCOPE = "pay_invoice" // also covers pay_keysend and multi_* payment methods GET_BALANCE_SCOPE = "get_balance" GET_INFO_SCOPE = "get_info" MAKE_INVOICE_SCOPE = "make_invoice" LOOKUP_INVOICE_SCOPE = "lookup_invoice" LIST_TRANSACTIONS_SCOPE = "list_transactions" SIGN_MESSAGE_SCOPE = "sign_message" NOTIFICATIONS_SCOPE = "notifications" // covers all notification types )
Variables ¶
This section is empty.
Functions ¶
func NewPermissionsService ¶
func NewPermissionsService(db *gorm.DB, eventPublisher events.EventPublisher) *permissionsService
func RequestMethodToScope ¶
func RequestMethodsToScopes ¶
Types ¶
type PermissionsService ¶
type PermissionsService interface { HasPermission(app *db.App, requestMethod string, amount uint64) (result bool, code string, message string) GetBudgetUsage(appPermission *db.AppPermission) uint64 GetPermittedMethods(app *db.App, lnClient lnclient.LNClient) []string PermitsNotifications(app *db.App) bool }
TODO: does this need to be a service?
Click to show internal directories.
Click to hide internal directories.