roleinfile

package
v0.0.0-...-29e199f Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package roleinfile defines the implementation of the output adapter to read roles from YAML files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultRoleStorageInFile

type DefaultRoleStorageInFile struct {
	// contains filtered or unexported fields
}

DefaultRoleStorageInFile is a port to adapt requests related to the Roles

func ProvideDefaultRoleStorageInFile

func ProvideDefaultRoleStorageInFile(options DefaultRoleStorageInFileOptions) (*DefaultRoleStorageInFile, error)

ProvideDefaultRoleStorageInFile provides an instance of an DefaultRoleStorageInFile

func (DefaultRoleStorageInFile) ListRoles

ListRoles fetches a collection of Role based on the ListRolesInput

type DefaultRoleStorageInFileOptions

type DefaultRoleStorageInFileOptions struct {
	FileSystem fs.FS
	BasePath   string
}

DefaultRoleStorageInFileOptions are the set of fields to create an DefaultRoleStorageInFile

type Role

type Role struct {
	// ID is the name of the Role
	ID string `yaml:"id"`
	// Description describes the role with a phrase
	Description string `yaml:"description"`
	// Permissions are the array of permissions associated to the Role
	Permissions []string `yaml:"permissions"`
}

Role is the name of the definition of the collection of permissions

type RolesInfo

type RolesInfo struct {
	// Default the default Role
	Default string `yaml:"default"`
	// Roles is the array of roles desribed in the file
	Roles []Role `yaml:"roles"`
}

RolesInfo is the data type that defines the roles in the file

Jump to

Keyboard shortcuts

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