role

package
v0.1.35 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package role provides application services for role management.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service is a struct that implements the RoleManageUsecase interface.

func New

func New(roleUsecase userport.RoleUsecase, logger *slog.Logger) *Service

New creates a new instance of the Service struct.

func (*Service) CreateRole

func (s *Service) CreateRole(ctx context.Context, apiRole *v1.Role) (*v1.Role, error)

CreateRole implements applicationport.RoleManageUsecase.

func (*Service) DeleteRole

func (s *Service) DeleteRole(ctx context.Context, uid uuid.UUID) error

DeleteRole implements applicationport.RoleManageUsecase.

func (*Service) GetRole

func (s *Service) GetRole(ctx context.Context, uid uuid.UUID) (*v1.Role, error)

GetRole implements applicationport.RoleManageUsecase.

func (*Service) ListRoles

func (s *Service) ListRoles(
	ctx context.Context,
	options *model.ListOptions,
) (*v1.ListResponse[v1.Role], error)

ListRoles implements applicationport.RoleManageUsecase.

func (*Service) UpdateRole

func (s *Service) UpdateRole(ctx context.Context, uid uuid.UUID, apiRole *v1.Role) (*v1.Role, error)

UpdateRole implements applicationport.RoleManageUsecase.

Jump to

Keyboard shortcuts

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