code: func (h *Handler) CreateTemplate(
  	tkn string, template *data.Template) (*string, error) {
  	logger := h.logger.Add("method", "CreateTemplate",
  		"template", template)
  
  	if !h.token.Check(tkn) {
  		logger.Warn("access denied")
  		return nil, ErrAccessDenied
  	}
  
  	err := checkTemplate(logger, template)
  	if err != nil {
  		return nil, err
  	}
  
  	template.ID = util.NewUUID()
  	template.Hash = data.HexFromBytes(crypto.Keccak256(template.Raw))
  
  	err = h.insertObject(template)
  	if err != nil {
  		return nil, err
  	}
  	return &template.ID, nil
  }
docs: // CreateTemplate creates template.