user

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package user implements functionality relating to users CRUD.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetUsersInput

type GetUsersInput struct {
	// Sort specifies the field to sort on and direction
	Sort *db.UserSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Search filters user list by username
	Search *string
}

GetUsersInput is the input for listing users

type Service

type Service interface {
	GetUserByID(ctx context.Context, userID string) (*models.User, error)
	GetUserByPRN(ctx context.Context, prn string) (*models.User, error)
	GetUserByUsername(ctx context.Context, username string) (*models.User, error)
	GetUsers(ctx context.Context, input *GetUsersInput) (*db.UsersResult, error)
	GetUsersByIDs(ctx context.Context, idList []string) ([]models.User, error)
}

Service implements all user related functionality

func NewService

func NewService(
	logger logger.Logger,
	dbClient *db.Client,
) Service

NewService creates an instance of Service

Jump to

Keyboard shortcuts

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