pg

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BootstrapCoreRepository

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

func (*BootstrapCoreRepository) LoadBootstrapCore

func (r *BootstrapCoreRepository) LoadBootstrapCore() (bootstrap.BootstrapCoreState, error)

func (*BootstrapCoreRepository) Migrations

func (r *BootstrapCoreRepository) Migrations() []Migration

func (*BootstrapCoreRepository) SaveBootstrapCore

func (r *BootstrapCoreRepository) SaveBootstrapCore(state bootstrap.BootstrapCoreState) error

type CookbookArtifactBundle

type CookbookArtifactBundle struct {
	Artifact CookbookArtifactRecord
	Files    []CookbookArtifactFileRecord
}

type CookbookArtifactFileRecord

type CookbookArtifactFileRecord struct {
	Organization string
	Name         string
	Identifier   string
	Ordinal      int
	FileName     string
	FilePath     string
	Checksum     string
	Specificity  string
}

type CookbookArtifactRecord

type CookbookArtifactRecord struct {
	Organization string
	Name         string
	Identifier   string
	Version      string
	ChefType     string
	Frozen       bool
	MetadataJSON []byte
}

type CookbookOrganizationRecord

type CookbookOrganizationRecord struct {
	Name     string
	FullName string
}

type CookbookRepository

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

func (*CookbookRepository) DecodeCookbookArtifact

func (r *CookbookRepository) DecodeCookbookArtifact(bundle CookbookArtifactBundle) (bootstrap.CookbookArtifact, error)

func (*CookbookRepository) DecodeCookbookVersion

func (r *CookbookRepository) DecodeCookbookVersion(bundle CookbookVersionBundle) (bootstrap.CookbookVersion, error)

func (*CookbookRepository) EncodeCookbookArtifact

func (r *CookbookRepository) EncodeCookbookArtifact(orgName string, artifact bootstrap.CookbookArtifact) (CookbookArtifactBundle, error)

func (*CookbookRepository) EncodeCookbookVersion

func (r *CookbookRepository) EncodeCookbookVersion(orgName string, version bootstrap.CookbookVersion) (CookbookVersionBundle, error)

func (*CookbookRepository) Migrations

func (r *CookbookRepository) Migrations() []Migration

func (*CookbookRepository) OrganizationRecords

func (r *CookbookRepository) OrganizationRecords() []CookbookOrganizationRecord

type CookbookVersionBundle

type CookbookVersionBundle struct {
	Version CookbookVersionRecord
	Files   []CookbookVersionFileRecord
}

type CookbookVersionFileRecord

type CookbookVersionFileRecord struct {
	Organization string
	CookbookName string
	Version      string
	Ordinal      int
	Name         string
	Path         string
	Checksum     string
	Specificity  string
}

type CookbookVersionRecord

type CookbookVersionRecord struct {
	Organization string
	CookbookName string
	Version      string
	FullName     string
	JSONClass    string
	ChefType     string
	Frozen       bool
	MetadataJSON []byte
}

func (CookbookVersionRecord) CookbookType

func (r CookbookVersionRecord) CookbookType() string

type CoreDataBagItemRecord

type CoreDataBagItemRecord struct {
	Organization string
	BagName      string
	ItemID       string
	PayloadJSON  []byte
}

type CoreObjectACLRecord

type CoreObjectACLRecord struct {
	Organization string
	ACLKey       string
	ACLJSON      []byte
}

type CoreObjectJSONRecord

type CoreObjectJSONRecord struct {
	Organization string
	Name         string
	PayloadJSON  []byte
}

type CoreObjectRepository

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

func (*CoreObjectRepository) DecodeCoreObjects

func (r *CoreObjectRepository) DecodeCoreObjects(rows CoreObjectRows) (bootstrap.CoreObjectState, error)

func (*CoreObjectRepository) EncodeCoreObjects

func (r *CoreObjectRepository) EncodeCoreObjects(state bootstrap.CoreObjectState) (CoreObjectRows, error)

func (*CoreObjectRepository) LoadCoreObjects

func (r *CoreObjectRepository) LoadCoreObjects() (bootstrap.CoreObjectState, error)

func (*CoreObjectRepository) Migrations

func (r *CoreObjectRepository) Migrations() []Migration

func (*CoreObjectRepository) SaveCoreObjects

func (r *CoreObjectRepository) SaveCoreObjects(state bootstrap.CoreObjectState) error

type CoreObjectRows

type CoreObjectRows struct {
	Environments     []CoreObjectJSONRecord
	Nodes            []CoreObjectJSONRecord
	Roles            []CoreObjectJSONRecord
	DataBags         []CoreObjectJSONRecord
	DataBagItems     []CoreDataBagItemRecord
	PolicyRevisions  []CorePolicyRevisionRecord
	PolicyGroups     []CoreObjectJSONRecord
	Sandboxes        []CoreSandboxRecord
	SandboxChecksums []CoreSandboxChecksumRecord
	ACLs             []CoreObjectACLRecord
}

type CorePolicyRevisionRecord

type CorePolicyRevisionRecord struct {
	Organization string
	PolicyName   string
	RevisionID   string
	PayloadJSON  []byte
}

type CoreSandboxChecksumRecord

type CoreSandboxChecksumRecord struct {
	Organization string
	SandboxID    string
	Ordinal      int
	Checksum     string
}

type CoreSandboxRecord

type CoreSandboxRecord struct {
	Organization string
	ID           string
	CreatedAt    time.Time
}

type Migration

type Migration struct {
	Name string `json:"name"`
	SQL  string `json:"sql"`
}

type Status

type Status struct {
	Driver     string `json:"driver"`
	Configured bool   `json:"configured"`
	Message    string `json:"message"`
}

type Store

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

func New

func New(dsn string) *Store

func (*Store) ActivateCookbookPersistence

func (s *Store) ActivateCookbookPersistence(ctx context.Context) error

func (*Store) ActivateCookbookPersistenceWithDB

func (s *Store) ActivateCookbookPersistenceWithDB(ctx context.Context, db *sql.DB) error

func (*Store) BootstrapCore

func (s *Store) BootstrapCore() *BootstrapCoreRepository

func (*Store) BootstrapCorePersistenceActive

func (s *Store) BootstrapCorePersistenceActive() bool

func (*Store) Close

func (s *Store) Close() error

func (*Store) Configured

func (s *Store) Configured() bool

func (*Store) CookbookPersistenceActive

func (s *Store) CookbookPersistenceActive() bool

func (*Store) CookbookStore

func (s *Store) CookbookStore() bootstrap.CookbookStore

func (*Store) Cookbooks

func (s *Store) Cookbooks() *CookbookRepository

func (*Store) CoreObjectPersistenceActive

func (s *Store) CoreObjectPersistenceActive() bool

func (*Store) CoreObjects

func (s *Store) CoreObjects() *CoreObjectRepository

func (*Store) Name

func (s *Store) Name() string

func (*Store) Status

func (s *Store) Status() Status

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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