Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppViewer ¶
type AppViewer struct {
Role Role // Attached roles.
}
AppViewer describes an app-viewer.
type UserViewer ¶
UserViewer describes a user-viewer.
func (UserViewer) Admin ¶
func (v UserViewer) Admin() bool
func (UserViewer) Can ¶
func (v UserViewer) Can(r Role) bool
type Viewer ¶
type Viewer interface { Teams(context.Context) ([]string, error) // Team to query (tenant == team). Admin() bool // If viewer is admin. Can(Role) bool // If viewer is able to apply role action. }
Viewer describes the query/mutation viewer-context.
func FromContext ¶
FromContext returns the Viewer stored in a context.
Click to show internal directories.
Click to hide internal directories.