grpc

package
v4.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Overview

Package grpc provides persistence layer for CRUD-ing roles

Index

Constants

Variables

This section is empty.

Functions

func InitRoles

func InitRoles(ctx context.Context) error

func NewHandler

func NewHandler(ctx context.Context, dao role.DAO) idm.NamedRoleServiceServer

func UpgradeTo12

func UpgradeTo12(ctx context.Context) error

Types

type Cleaner

type Cleaner struct {
	resources.PoliciesCleaner
	// contains filtered or unexported fields
}

func NewCleaner

func NewCleaner(ctx context.Context, handler idm.RoleServiceServer) *Cleaner

func (*Cleaner) Handle

func (c *Cleaner) Handle(ctx context.Context, msg *idm.ChangeEvent) error

type Handler

type Handler struct {
	idm.UnimplementedRoleServiceServer
	// contains filtered or unexported fields
}

Handler definition

func (*Handler) CountRole

func (h *Handler) CountRole(ctx context.Context, request *idm.SearchRoleRequest) (*idm.CountRoleResponse, error)

CountRole in database

func (*Handler) CreateRole

func (h *Handler) CreateRole(ctx context.Context, req *idm.CreateRoleRequest) (*idm.CreateRoleResponse, error)

CreateRole adds a role and its policies in database

func (*Handler) DeleteRole

func (h *Handler) DeleteRole(ctx context.Context, req *idm.DeleteRoleRequest) (*idm.DeleteRoleResponse, error)

DeleteRole from database

func (*Handler) Name

func (h *Handler) Name() string

func (*Handler) SearchRole

func (h *Handler) SearchRole(request *idm.SearchRoleRequest, response idm.RoleService_SearchRoleServer) error

SearchRole in database

func (*Handler) StreamRole

func (h *Handler) StreamRole(streamer idm.RoleService_StreamRoleServer) error

StreamRole from database

Jump to

Keyboard shortcuts

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