persistence

package
v0.0.0-...-71ec521 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseClient

func CloseClient() error

func CreateEvaluationForResponseId

func CreateEvaluationForResponseId(ctx context.Context, responseId string, evaluationResult string, userId uuid.UUID) (*ent.Evaluation, error)

func DbExistis

func DbExistis() bool

func GetAgreementByScenarioId

func GetAgreementByScenarioId(ctx context.Context, scenarioId uuid.UUID) evaluationapi.RatingScore

func GetClient

func GetClient() (*ent.Client, error)

func GetDemoUser

func GetDemoUser(ctx context.Context) (*ent.User, error)

func GetEvaluationCountByResponseId

func GetEvaluationCountByResponseId(ctx context.Context, responseId uuid.UUID) (int, int, int, error)

func GetNextResponse

func GetNextResponse(ctx context.Context) (*ent.Response, error)

func GetRequestById

func GetRequestById(ctx context.Context, requestId uuid.UUID) (*ent.Request, error)

func GetResponseById

func GetResponseById(ctx context.Context, responseId uuid.UUID) (*ent.Response, error)

func GetResultStatisticsByScenarioId

func GetResultStatisticsByScenarioId(ctx context.Context, scenarioId uuid.UUID) []evaluationapi.NameValuePair

func GetScenarios

func GetScenarios(ctx context.Context) ([]*ent.Scenario, error)

func GetTotalResponseCountByScenarioId

func GetTotalResponseCountByScenarioId(ctx context.Context, scenarioId uuid.UUID) int32

func GetUserByExternalId

func GetUserByExternalId(ctx context.Context, externalId string) (*ent.User, error)

func ProgressStatistics

func ProgressStatistics(ctx context.Context, scenarioId uuid.UUID, totalCount int32) []evaluationapi.NameValuePair

func SetupDb

func SetupDb() error

func UpsertUser

func UpsertUser(ctx context.Context, externalId, name, userType string) (uuid.UUID, error)

Types

type NotFoundError

type NotFoundError interface {
	error
}

Jump to

Keyboard shortcuts

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