grpc

package
v4.4.7 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: AGPL-3.0 Imports: 35 Imported by: 0

Documentation

Overview

Package grpc provides the gRPC service to communicate with the Pydio's user persistence layer.

Index

Constants

View Source
const (
	EnvPydioAdminUserLogin    = "PYDIO_ADMIN_USER_LOGIN"
	EnvPydioAdminUserPassword = "PYDIO_ADMIN_USER_PASSWORD"
	ServiceName               = common.ServiceGrpcNamespace_ + common.ServiceUser
)

Variables

View Source
var (
	DeleteUsersActionName = "actions.idm.users.delete"
)

Functions

func CreateIfNotExists

func CreateIfNotExists(ctx context.Context, dao user.DAO, user *idm.User) (*idm.User, error)

CreateIfNotExists creates a user if DAO.Bind() call returns a 404 error.

func InitDefaults

func InitDefaults(ctx context.Context) error

func NewHandler

func NewHandler(ctx context.Context, dao user.DAO) idm.NamedUserServiceServer

Types

type ByOverride

type ByOverride []*idm.Role

ByOverride implements sort.Interface for []Role based on the ForceOverride field.

func (ByOverride) Len

func (a ByOverride) Len() int

func (ByOverride) Less

func (a ByOverride) Less(i, j int) bool

func (ByOverride) Swap

func (a ByOverride) Swap(i, j int)

type DeleteUsersAction

type DeleteUsersAction struct {
	common.RuntimeHolder
	// contains filtered or unexported fields
}

func (*DeleteUsersAction) GetDescription

func (a *DeleteUsersAction) GetDescription(lang ...string) actions.ActionDescription

func (*DeleteUsersAction) GetName

func (a *DeleteUsersAction) GetName() string

func (*DeleteUsersAction) GetParametersForm

func (a *DeleteUsersAction) GetParametersForm() *forms.Form

func (*DeleteUsersAction) Init

func (a *DeleteUsersAction) Init(job *jobs.Job, action *jobs.Action) error

func (*DeleteUsersAction) ProvidesProgress

func (a *DeleteUsersAction) ProvidesProgress() bool

func (*DeleteUsersAction) Run

func (*DeleteUsersAction) SetTask

func (a *DeleteUsersAction) SetTask(task *jobs.Task)

SetTask implements TaskUpdaterDelegateAction as the target service will update the task status on its side.

type Handler

type Handler struct {
	idm.UnimplementedUserServiceServer
	service.UnimplementedLoginModifierServer
	// contains filtered or unexported fields
}

Handler definition

func (*Handler) BindUser

func (h *Handler) BindUser(ctx context.Context, req *idm.BindUserRequest) (*idm.BindUserResponse, error)

BindUser binds a user with login/password

func (*Handler) CountUser

func (h *Handler) CountUser(ctx context.Context, request *idm.SearchUserRequest) (*idm.CountUserResponse, error)

CountUser in database

func (*Handler) CreateUser

func (h *Handler) CreateUser(ctx context.Context, req *idm.CreateUserRequest) (*idm.CreateUserResponse, error)

CreateUser adds or creates a user or a group in the underlying database.

func (*Handler) DeleteUser

func (h *Handler) DeleteUser(ctx context.Context, req *idm.DeleteUserRequest) (*idm.DeleteUserResponse, error)

DeleteUser from database

func (*Handler) ModifyLogin added in v4.2.6

func (h *Handler) ModifyLogin(ctx context.Context, req *service.ModifyLoginRequest) (resp *service.ModifyLoginResponse, err error)

func (*Handler) Name

func (h *Handler) Name() string

func (*Handler) SearchUser

func (h *Handler) SearchUser(request *idm.SearchUserRequest, response idm.UserService_SearchUserServer) error

SearchUser in database

func (*Handler) StreamUser

func (h *Handler) StreamUser(streamer idm.UserService_StreamUserServer) error

StreamUser from database

type RolesCleaner

type RolesCleaner struct {
	Dao user.DAO
}

RolesCleaner listen for roles deletion and clear the users accordingly

func (*RolesCleaner) Handle

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

Jump to

Keyboard shortcuts

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