assignment

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAssignmentCreateDeadlineExceeded = errors.New("assignment create deadline exceeded")
	ErrDuplicateAssignmentsFound        = errors.New("found duplicate assignments")
)
View Source
var (
	ErrAssignmentFindByFormIDDeadlineExceeded = errors.New("assignment find by form id deadline exceeded")
)
View Source
var (
	ErrAssignmentFindByGroupIDDeadlineExceeded = errors.New("assignment find by group id deadline exceeded")
)

Functions

func ConvertToAssignmentCreateResponse

func ConvertToAssignmentCreateResponse(domainAssignments []*domain.Assignment) *business.AssignmentCreateResponse

func ConvertToBusinessFormAssignment

func ConvertToBusinessFormAssignment(domainAssignments []*domain.Assignment) *business.FormAssignment

func ConvertToBusinessGroupAssignment

func ConvertToBusinessGroupAssignment(domainAssignments []*domain.Assignment) *business.GroupAssignment

func ConvertToDomainAssignments

func ConvertToDomainAssignments(assignment *business.FormAssignment) []*domain.Assignment

Types

type Service

type Service interface {
	Create(ctx context.Context, assignment *business.FormAssignment) (*business.AssignmentCreateResponse, error)
	FindByFormID(ctx context.Context, formID uuid.UUID) (*business.FormAssignment, error)
	FindByGroupID(ctx context.Context, groupID uuid.UUID) (*business.GroupAssignment, error)
}

func New

func New(cfg *config.Config, log *slog.Logger, repository repository) Service

Jump to

Keyboard shortcuts

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