Skip to content

Modern Docker Management, Designed for Everyone

1.3 KB
Raw Blame
package registry

import (
	"time"

	"github.com/getarcaneapp/arcane/backend/v2/internal/database"
)

type ContainerRegistry struct {
	database.BaseModel

	URL                 string               `json:"url" sortable:"true"`
	Username            string               `json:"username" sortable:"true"`
	Token               string               `json:"token"`
	Description         *string              `json:"description,omitempty" sortable:"true"`
	Insecure            bool                 `json:"insecure" sortable:"true"`
	Enabled             bool                 `json:"enabled" sortable:"true"`
	RegistryType        string               `json:"registryType" sortable:"true"`
	RepositoryNames     database.StringSlice `json:"repositoryNames" gorm:"column:repository_names;type:text;not null;default:'[]'"`
	AWSAccessKeyID      string               `json:"awsAccessKeyId"`
	AWSSecretAccessKey  string               `json:"awsSecretAccessKey"`
	AWSRegion           string               `json:"awsRegion"`
	ECRToken            string               `json:"ecrToken"`
	ECRTokenGeneratedAt *time.Time           `json:"ecrTokenGeneratedAt"`
	CreatedAt           time.Time            `json:"createdAt" sortable:"true"`
	UpdatedAt           time.Time            `json:"updatedAt" sortable:"true"`
}

func (ContainerRegistry) TableName() string {
	return "container_registries"
}