code: func ConvertSpaceTemplate(appl application.Application, request *http.Request, st spacetemplate.SpaceTemplate, additional ...SpaceTemplateConvertFunc) *app.SpaceTemplate {
  
  	// template := base64.StdEncoding.EncodeToString([]byte(st.Template))
  	i := &app.SpaceTemplate{
  		Type: APISpaceTemplates,
  		ID:   &st.ID,
  		Attributes: &app.SpaceTemplateAttributes{
  			Name:         &st.Name,
  			CreatedAt:    &st.CreatedAt,
  			UpdatedAt:    &st.UpdatedAt,
  			Version:      &st.Version,
  			Description:  st.Description,
  			CanConstruct: &st.CanConstruct,
  			// Template:    &template,
  		},
  		Relationships: &app.SpaceTemplateRelationships{
  			Workitemtypes: &app.RelationGeneric{
  				Links: &app.GenericLinks{
  					Related: ptr.String(rest.AbsoluteURL(request, app.SpaceTemplateHref(st.ID)+"/workitemtypes")),
  				},
  			},
  			Workitemlinktypes: &app.RelationGeneric{
  				Links: &app.GenericLinks{
  					Related: ptr.String(rest.AbsoluteURL(request, app.SpaceTemplateHref(st.ID)+"/workitemlinktypes")),
  				},
  			},
  			Workitemtypegroups: &app.RelationGeneric{
  				Links: &app.GenericLinks{
  					Related: ptr.String(rest.AbsoluteURL(request, app.SpaceTemplateHref(st.ID)+"/workitemtypegroups")),
  				},
  			},
  			Workitemboards: &app.RelationGeneric{
  				Links: &app.GenericLinks{
  					Related: ptr.String(rest.AbsoluteURL(request, app.SpaceTemplateHref(st.ID)+"/workitemboards")),
  				},
  			},
  		},
  		Links: &app.GenericLinks{
  			Self: ptr.String(rest.AbsoluteURL(request, app.SpaceTemplateHref(st.ID))),
  		},
  	}
  
  	for _, add := range additional {
  		add(appl, request, &st, i)
  	}
  	return i
  }
docs: // ConvertSpaceTemplate converts between internal and external REST representation