build_config.go 512 B

123456789101112131415161718192021222324
  1. package models
  2. import (
  3. "github.com/porter-dev/porter/api/types"
  4. "gorm.io/gorm"
  5. )
  6. type BuildConfig struct {
  7. gorm.Model
  8. Name string `json:"name"`
  9. Runtime string `json:"runtime"`
  10. Buildpacks []byte `json:"buildpacks"` // FIXME: should be a []string
  11. Config []byte `json:"config"`
  12. }
  13. func (conf *BuildConfig) ToBuildConfigType() *types.BuildConfig {
  14. return &types.BuildConfig{
  15. Name: conf.Name,
  16. Runtime: conf.Runtime,
  17. Buildpacks: conf.Buildpacks,
  18. Config: conf.Config,
  19. }
  20. }