postsql

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Retrying   = "retrying" // to signal a retry sign before marking it to pending
	Succeeded  = "succeeded"
	Failed     = "failed"
	InProgress = "in progress"
)

Variables

This section is empty.

Functions

func NewOperation

func NewOperation(sess postsql.Factory, cipher Cipher) *operations

func NewOrchestrations

func NewOrchestrations(sess postsql.Factory) *orchestrations

func NewRuntimeStates

func NewRuntimeStates(sess postsql.Factory, cipher Cipher) *runtimeState

Types

type Cipher

type Cipher interface {
	Encrypt(text []byte) ([]byte, error)
	Decrypt(text []byte) ([]byte, error)

	// methods used to encrypt/decrypt SM credentials
	EncryptSMCreds(pp *internal.ProvisioningParameters) error
	DecryptSMCreds(pp *internal.ProvisioningParameters) error

	// methods used to encrypt/decrypt kubeconfig
	EncryptKubeconfig(pp *internal.ProvisioningParameters) error
	DecryptKubeconfig(pp *internal.ProvisioningParameters) error
}

type Instance

type Instance struct {
	postsql.Factory
	// contains filtered or unexported fields
}

func NewInstance

func NewInstance(sess postsql.Factory, operations *operations, cipher Cipher) *Instance

func (*Instance) Delete

func (s *Instance) Delete(instanceID string) error

func (*Instance) FindAllInstancesForRuntimes

func (s *Instance) FindAllInstancesForRuntimes(runtimeIdList []string) ([]internal.Instance, error)

func (*Instance) FindAllInstancesForSubAccounts

func (s *Instance) FindAllInstancesForSubAccounts(subAccountslist []string) ([]internal.Instance, error)

func (*Instance) FindAllJoinedWithOperations

func (s *Instance) FindAllJoinedWithOperations(prct ...predicate.Predicate) ([]internal.InstanceWithOperation, error)

func (*Instance) GetByID

func (s *Instance) GetByID(instanceID string) (*internal.Instance, error)

TODO: Wrap retries in single method WithRetries

func (*Instance) GetERSContextStats

func (s *Instance) GetERSContextStats() (internal.ERSContextStats, error)

func (*Instance) GetInstanceStats

func (s *Instance) GetInstanceStats() (internal.InstanceStats, error)

func (*Instance) GetNumberOfInstancesForGlobalAccountID

func (s *Instance) GetNumberOfInstancesForGlobalAccountID(globalAccountID string) (int, error)

func (*Instance) Insert

func (s *Instance) Insert(instance internal.Instance) error

func (*Instance) InsertWithoutEncryption

func (s *Instance) InsertWithoutEncryption(instance internal.Instance) error

func (*Instance) List

func (s *Instance) List(filter dbmodel.InstanceFilter) ([]internal.Instance, int, int, error)

func (*Instance) ListWithoutDecryption

func (s *Instance) ListWithoutDecryption(filter dbmodel.InstanceFilter) ([]internal.Instance, int, int, error)

func (*Instance) Update

func (s *Instance) Update(instance internal.Instance) (*internal.Instance, error)

func (*Instance) UpdateWithoutEncryption

func (s *Instance) UpdateWithoutEncryption(instance internal.Instance) (*internal.Instance, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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