Help us shape the future of Go! Take the 2026 Go Developer Survey

modelparse

package
v2.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrganizationRole

type OrganizationRole struct {
	ID          string
	Name        string
	Description string
}

type RoleInfo

type RoleInfo struct {
	ViewRoles         map[string][]string
	CrudRoles         map[string][]string
	InheritRoles      map[string][]string
	CreateRoles       map[string][]string
	OrganizationRoles []OrganizationRole
}

func ParseRoleAnnotations

func ParseRoleAnnotations(rolesFile string) (*RoleInfo, error)

ParseRoleAnnotations parses relevant annotations and role line from roles/roles.fga to determine which objects to add the roles to

func ParseRoleAnnotationsData

func ParseRoleAnnotationsData(data []byte) (*RoleInfo, error)

func (*RoleInfo) AddInheritedRoles

func (r *RoleInfo) AddInheritedRoles()

addInheritedRoles adds roles to objects based on the inherit annotations, so if role A inherits role B, and role B has access to edit a group, then role A should also have access to edit the group, even if it is not explicitly defined in the annotations for role A

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL