apiVersion: backstage.io/v1alpha1
kind: Template
metadata:
  name: golang-starter
  title: Golang Microservice
  description: Create a Golang repo with this template built by members of the Go community
  tags:
    - experimental
    - go
spec:
  owner: web@example.com
  templater: cookiecutter
  type: service
  path: "."
  schema:
    required:
      - component_id
      - project_short_description
      - docker_image
      - docker_build_image
      - docker_build_image_version
      - use_logrus_logging
      - use_viper_config
      - use_ci
      - use_cobra_cmd
    properties:
      component_id:
        title: Name
        type: string
        description: Unique name of the component
      project_short_description:
        title: Description
        type: string
        description: Description of the component
      docker_image:
        title: Docker Image
        type: string
        description: The docker base image to use when running the service
        default: alpine-base-image:latest
      docker_build_image:
        title: Docker Build Image
        type: string
        description: The docker base image to use when building the service
        default: golang
      docker_build_image_version:
        title: Docker Build Image Version
        description: The image version to use when building the service
        type: string
        enum:
          - alpine
        default: alpine
      use_logrus_logging:
        title: Enable Logrus Logging (https://github.com/sirupsen/logrus)
        type: string
        enum:
          - "y"
          - "n"
        default: "y"
      use_viper_config:
        title: Enable Viper Config (https://github.com/spf13/viper)
        type: string
        enum:
          - "y"
          - "n"
        default: "y"
      use_cobra_cmd:
        title: Enable Cobra CLI Tools (https://github.com/spf13/cobra)
        type: string
        enum:
          - "y"
          - "n"
        default: "y"
      use_ci:
        title: Add CI
        description: Add a CI config to the repo, Gitub Actions, Circle or Travis are the only supported right now
        type: string
        enum:
          - github
          - travis
          - circle
          - none
        default: github
