managedby

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package managedby holds the mark managed_by of C-33.FR-11: the name of the tool that keeps an object of configuration as code, such as terraform, or none. It is a mark only: the domain packages store it with their objects, check its value with Validate and record a change of it in the Audit log like any field, and nothing else reads it.

Index

Constants

View Source
const Detail = "The tool that manages it is 1 to 32 characters — lowercase letters, digits, ., _ and - — starting " +
	"with a letter or a digit."

Detail is the detail of the invalid_format at Pointer that the domain packages answer for a value outside the format.

View Source
const Pointer = "/managed_by"

Pointer is the field in the request bodies, where a value outside the format is refused with invalid_format.

Variables

View Source
var Clear = Input{Given: true}

Clear is the input of the field set to null.

View Source
var ErrInvalidFormat = errors.New("managed_by is 1 to 32 characters — lowercase letters, digits, ., _ and - — " +
	"starting with a letter or a digit")

ErrInvalidFormat refuses a value outside the format.

Functions

func Of

func Of(t pgtype.Text) *string

Of is the mark of a column.

func Only

func Only(changes []audit.Change) bool

Only reports whether a write's Audit log diff changes the mark and nothing else. Such a write skips what the object's other fields cause, such as a re-render of the open Root messages, since the mark changes no behaviour.

func Text

func Text(mark *string) pgtype.Text

Text is the mark as a query parameter.

func Validate

func Validate(s string) error

Validate refuses a value outside the format with ErrInvalidFormat.

Types

type Input

type Input struct {
	Given bool
	Value *string
}

Input is the field in a write: Given is false when the request leaves it out, which keeps the stored mark on an update and stores none on a creation, and a nil Value is null, which clears it.

func Set

func Set(value string) Input

Set is the input of the field set to value.

func (Input) Apply

func (in Input) Apply(stored *string) *string

Apply is the mark after the write over stored, the mark before it, nil on a creation.

func (Input) Check

func (in Input) Check() error

Check validates the value given, if any.

Jump to

Keyboard shortcuts

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