variableset

package
v0.0.0-...-ed06964 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourceName       = "VariableSet"
	ResourceNamePlural = "VariableSets"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository(db *sql.DB) *Repository

func (*Repository) Count

func (r *Repository) Count(ctx context.Context, query string) (int, error)

func (*Repository) Create

func (r *Repository) Create(ctx context.Context, variableSet VariableSet) (VariableSet, error)

func (*Repository) Delete

func (r *Repository) Delete(ctx context.Context, id id.ID) error

func (*Repository) Exists

func (r *Repository) Exists(ctx context.Context, id id.ID) (bool, error)

func (*Repository) Get

func (r *Repository) Get(ctx context.Context, id id.ID) (VariableSet, error)

func (*Repository) List

func (r *Repository) List(ctx context.Context, take, skip int, query, sortBy, sortDirection string) ([]VariableSet, error)

func (*Repository) Provision

func (r *Repository) Provision(ctx context.Context, variableSet VariableSet) error

func (*Repository) SetID

func (r *Repository) SetID(variableSet VariableSet, id id.ID) VariableSet

func (*Repository) SortingFields

func (*Repository) SortingFields() []string

func (*Repository) Update

func (r *Repository) Update(ctx context.Context, variableSet VariableSet) (VariableSet, error)

type VariableSet

type VariableSet struct {
	ID          id.ID              `json:"id"`
	Name        string             `json:"name"`
	Description string             `json:"description"`
	CreatedAt   string             `json:"createdAt"`
	Values      []VariableSetValue `json:"values"`
}

func (VariableSet) Get

func (e VariableSet) Get(key string) string

func (VariableSet) GetID

func (e VariableSet) GetID() id.ID

func (VariableSet) HasID

func (e VariableSet) HasID() bool

func (VariableSet) Merge

func (e VariableSet) Merge(env VariableSet) VariableSet

func (VariableSet) Slug

func (e VariableSet) Slug() id.ID

func (VariableSet) Validate

func (e VariableSet) Validate() error

type VariableSetValue

type VariableSetValue struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

Jump to

Keyboard shortcuts

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