grpc

package
v5.0.0-...-b98a0e9 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GrpcServiceMigrations = []*service.Migration{
	{
		TargetVersion: service.FirstRun(),
		Up:            InitRoles,
	}, {
		TargetVersion: service.ValidVersion("1.2.0"),
		Up:            UpgradeTo12,
	}, {
		TargetVersion: service.ValidVersion("4.1.99"),
		Up:            UpgradeTo4199,
	}, {
		TargetVersion: service.ValidVersion("4.2.1"),
		Up:            UpgradeTo421,
	},
}

Functions

func InitRoles

func InitRoles(ctx context.Context) error

func NewHandler

func NewHandler() idm.RoleServiceServer

func UpgradeTo12

func UpgradeTo12(ctx context.Context) error

func UpgradeTo4199

func UpgradeTo4199(ctx context.Context) error

func UpgradeTo421

func UpgradeTo421(ctx context.Context) error

Types

type Cleaner

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

func NewCleaner

func NewCleaner(handler idm.RoleServiceServer) *Cleaner

func (*Cleaner) Handle

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

type Handler

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) 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

Directories

Path Synopsis
Package service provides the GRPC persistence layer for CRUD-ing roles
Package service provides the GRPC persistence layer for CRUD-ing roles

Jump to

Keyboard shortcuts

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