func (c *WorkItemLinkTypeController) Show(ctx *app.ShowWorkItemLinkTypeContext) error {
	spaceID, err := uuid.FromString(ctx.ID)
	if err != nil {
		return errors.NewNotFoundError("spaceID", ctx.ID)
	}
	// WorkItemLinkTypeController_Show: start_implement
	return application.Transactional(c.db, func(appl application.Application) error {
		wiltID, err := uuid.FromString(ctx.WiltID)
		if err != nil {
			return errors.NewNotFoundError("work item link type ID", ctx.WiltID)
		}

		modelLinkType, err := appl.WorkItemLinkTypes().Load(ctx.Context, spaceID, wiltID)
		if err != nil {
			jerrors, httpStatusCode := jsonapi.ErrorToJSONAPIErrors(err)
			return ctx.ResponseData.Service.Send(ctx.Context, httpStatusCode, jerrors)
		}
		// Convert the created link type entry into a rest representation
		appLinkType := ConvertWorkItemLinkTypeFromModel(ctx.RequestData, *modelLinkType)

		// Enrich
		hrefFunc := func(obj interface{}) string {
			return fmt.Sprintf(app.WorkItemLinkTypeHref(spaceID, "%v"), obj)
		}
		linkCtx := newWorkItemLinkContext(ctx.Context, appl, c.db, ctx.RequestData, ctx.ResponseData, hrefFunc, nil)
		err = enrichLinkTypeSingle(linkCtx, &appLinkType)
		if err != nil {
			jerrors, _ := jsonapi.ErrorToJSONAPIErrors(goa.ErrInternal("Failed to enrich link type: %s", err.Error()))
			return ctx.InternalServerError(jerrors)
		}
		return ctx.OK(&appLinkType)
	})
	// WorkItemLinkTypeController_Show: end_implement
}
// Show runs the show action.
Show runs the show action.
// Show runs the show action .
func (c *WorkItemLinkTypeController) Show(ctx *app.ShowWorkItemLinkTypeContext) error {
	spaceID, err := uuid.FromString(ctx.ID)
	if err != nil {
		return errors.NewNotFoundError("spaceID", ctx.ID)
	}
	return application.Transactional(c.db, func(appl application.Application) error {
		wiltID, err := uuid.FromString(ctx.WiltID)
		if err != nil {
			return errors.NewNotFoundError("work item link type ID", ctx.WiltID)
		}
		modelLinkType, err := appl.WorkItemLinkTypes().Load(ctx.Context, spaceID, wiltID)
		if err != nil {
			jerrors, httpStatusCode := jsonapi.ErrorToJSONAPIErrors(err)
			return ctx.ResponseData.Service.Send(ctx.Context, httpStatusCode, jerrors)
		}
		appLinkType := ConvertWorkItemLinkTypeFromModel(ctx.RequestData, *modelLinkType)
		hrefFunc := func(obj interface{}) string {
			return fmt.Sprintf(app.WorkItemLinkTypeHref(spaceID, "%v"), obj)
		}
		linkCtx := newWorkItemLinkContext(ctx.Context, appl, c.db, ctx.RequestData, ctx.ResponseData, hrefFunc, nil)
		err = enrichLinkTypeSingle(linkCtx, &appLinkType)
		if err != nil {
			jerrors, _ := jsonapi.ErrorToJSONAPIErrors(goa.ErrInternal("Failed to enrich link type: %s", err.Error()))
			return ctx.InternalServerError(jerrors)
		}
		return ctx.OK(&appLinkType)
	})
}
func ( c * WorkItemLinkTypeController ) Show ( ctx * app . ShowWorkItemLinkTypeContext ) error { spaceID , err := uuid . FromString ( ctx . ID ) if err != nil { return errors . NewNotFoundError ( " " , ctx . ID ) } return application . Transactional ( c . db , func ( appl application . Application ) error { wiltID , err := uuid . FromString ( ctx . WiltID ) if err != nil { return errors . NewNotFoundError ( " " , ctx . WiltID ) } modelLinkType , err := appl . WorkItemLinkTypes ( ) . Load ( ctx . Context , spaceID , wiltID ) if err != nil { jerrors , httpStatusCode := jsonapi . ErrorToJSONAPIErrors ( err ) return ctx . ResponseData . Service . Send ( ctx . Context , httpStatusCode , jerrors ) } appLinkType := ConvertWorkItemLinkTypeFromModel ( ctx . RequestData , * modelLinkType ) hrefFunc := func ( obj interface { } ) string { return fmt . Sprintf ( app . WorkItemLinkTypeHref ( spaceID , " " ) , obj ) } linkCtx := newWorkItemLinkContext ( ctx . Context , appl , c . db , ctx . RequestData , ctx . ResponseData , hrefFunc , nil ) err = enrichLinkTypeSingle ( linkCtx , & appLinkType ) if err != nil { jerrors , _ := jsonapi . ErrorToJSONAPIErrors ( goa . ErrInternal ( " " , err . Error ( ) ) ) return ctx . InternalServerError ( jerrors ) } return ctx . OK ( & appLinkType ) } ) }
Show runs the show action.
Show runs the show action .
// WorkItemLinkTypeController_Show: start_implement // Convert the created link type entry into a rest representation // Enrich // WorkItemLinkTypeController_Show: end_implement