user

package
v0.0.0-...-bcd9aa3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package user implements the User gRPC service.

Package user implements the User gRPC service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Service) error

Option is a functional option to set the DBus objects in tests.

type Service

type Service struct {
	pb.UnimplementedUserServiceServer
	// contains filtered or unexported fields
}

Service is the implementation of the User module service.

func New

func New(conn *dbus.Conn, opts ...Option) (*Service, error)

New returns a new instance of the User service with optional configurations. Returns an error if unable to obtain necessary DBus objects.

func (*Service) CreateUser

func (s *Service) CreateUser(ctx context.Context, req *pb.CreateUserRequest) (_ *emptypb.Empty, err error)

CreateUser creates a new user on the system.

func (*Service) ValidateUsername

ValidateUsername validates the given username. Returns an enum value indicating the result of the validation.

Jump to

Keyboard shortcuts

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