planVariable

package
v0.0.0-...-5abfebf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category string

Category defines the category of the variable. It used to define the scope of the variable.

const (
	RunnerCategory Category = "runner"
	EnvCategory    Category = "env"
)

type PlanVariable

type PlanVariable struct {
	// ID defines the unique identifier of the plan variable.
	ID int `gorm:"primaryKey" filter:"filterable"`

	// PlanID defines the unique identifier of the plan.
	PlanID int `gorm:"not null" filter:"filterable"`

	// Key defines the unique identifier of the variable.
	Key string `gorm:"not null" filter:"filterable"`

	// Value defines the value of the variable.
	Value string

	// Category define the scope of the variable.
	Category Category `gorm:"not null;default:'runner'" filter:"filterable"`

	// Sensitive defines if the value is sensitive.
	// If true, the variable is written once and not visible thereafter.
	Sensitive bool `gorm:"not null" filter:"filterable"`

	// Audit fields
	trackable.CreatedBy
	CreatedAt time.Time `gorm:"autoCreateTime"`
	trackable.UpdatedBy
	UpdatedAt time.Time `gorm:"autoUpdateTime"`
}

func (*PlanVariable) BeforeCreate

func (u *PlanVariable) BeforeCreate(tx *gorm.DB) (err error)

func (*PlanVariable) BeforeUpdate

func (u *PlanVariable) BeforeUpdate(tx *gorm.DB) (err error)

type Store

type Store struct {
	data.Generic[PlanVariable]
}

Store struct manages interactions with authors store

func New

func New(db *gorm.DB) *Store

New creates a new Store struct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL