role

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultRoleUseCase

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

DefaultRoleUseCase is the struct that implements the RoleUseCase for the RBAC.

func ProvideDefaultRoleUseCase

func ProvideDefaultRoleUseCase(options DefaultRoleUseCaseOptions) (*DefaultRoleUseCase, error)

ProvideDefaultRoleUseCase provides an instance of an DefaultRoleUseCase.

func (DefaultRoleUseCase) GetSupportedRoles

GetSupportedRoles fetches the list of supported roles for the signare users.

type DefaultRoleUseCaseOptions

type DefaultRoleUseCaseOptions struct {
	// RoleStorage defines the access methods to the Role storage
	RoleStorage RoleStorage
}

DefaultRoleUseCaseOptions are the set of fields to create an DefaultRoleUseCase.

type GetSupportedRolesInput

type GetSupportedRolesInput struct {
}

GetSupportedRolesInput are the attributes to fetch the supported collection of Role.

type GetSupportedRolesOutput

type GetSupportedRolesOutput struct {
	// Roles group of roles
	Roles []Role
}

GetSupportedRolesOutput is the supported collection of Role in the storage.

type ListRolesInput

type ListRolesInput struct {
}

ListRolesInput are the attributes to fetch the collection of Role.

type ListRolesOutput

type ListRolesOutput struct {
	// Roles is the array of Role.
	Roles []Role
}

ListRolesOutput is the collection of Role in the storage.

type Role

type Role struct {
	// ID is the name of the Role.
	ID string
}

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

type RoleStorage

type RoleStorage interface {
	// ListRoles fetches a collection of Role based on the ListRolesInput.
	ListRoles(ctx context.Context, input ListRolesInput) (*ListRolesOutput, error)
}

RoleStorage defines the access methods to the Role storage.

type RoleUseCase

type RoleUseCase interface {
	// GetSupportedRoles fetches the list of supported roles for the signare users.
	GetSupportedRoles(ctx context.Context, input GetSupportedRolesInput) (*GetSupportedRolesOutput, error)
}

RoleUseCase the set of use cases for the Roles.

Jump to

Keyboard shortcuts

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