processedcache

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsiderDriftChecked

type ConsiderDriftChecked struct {
	// The directory checked
	Dir string
	// The workspace checked
	Workspace string
}

func (*ConsiderDriftChecked) String

func (d *ConsiderDriftChecked) String() string

type ConsiderWorkspacesChecked

type ConsiderWorkspacesChecked struct {
	// Directory checked
	Dir string
}

func (*ConsiderWorkspacesChecked) String

func (d *ConsiderWorkspacesChecked) String() string

type DriftCheckValue

type DriftCheckValue struct {
	// If non-empty, indicates an error in the checking
	Error string
	// Only if we have an empty error: the result of checking for drift
	Drift bool `json:"drift"`
	// Only if we have an empty error: when we did this check
	When time.Time
}

type DynamoDB

type DynamoDB struct {
	Client *dynamodb.Client
	Table  string
}

func NewDynamoDB

func NewDynamoDB(ctx context.Context, table string) (*DynamoDB, error)

func (*DynamoDB) DeleteDriftCheckResult

func (d *DynamoDB) DeleteDriftCheckResult(ctx context.Context, key *ConsiderDriftChecked) error

func (*DynamoDB) DeleteRemoteWorkspaces

func (d *DynamoDB) DeleteRemoteWorkspaces(ctx context.Context, key *ConsiderWorkspacesChecked) error

func (*DynamoDB) GetDriftCheckResult

func (d *DynamoDB) GetDriftCheckResult(ctx context.Context, key *ConsiderDriftChecked) (*DriftCheckValue, error)

func (*DynamoDB) GetRemoteWorkspaces

func (d *DynamoDB) GetRemoteWorkspaces(ctx context.Context, key *ConsiderWorkspacesChecked) (*WorkspacesCheckedValue, error)

func (*DynamoDB) StoreDriftCheckResult

func (d *DynamoDB) StoreDriftCheckResult(ctx context.Context, key *ConsiderDriftChecked, value *DriftCheckValue) error

func (*DynamoDB) StoreRemoteWorkspaces

func (d *DynamoDB) StoreRemoteWorkspaces(ctx context.Context, key *ConsiderWorkspacesChecked, value *WorkspacesCheckedValue) error

type Noop

type Noop struct{}

func (Noop) DeleteDriftCheckResult

func (n Noop) DeleteDriftCheckResult(ctx context.Context, key *ConsiderDriftChecked) error

func (Noop) DeleteRemoteWorkspaces

func (n Noop) DeleteRemoteWorkspaces(ctx context.Context, key *ConsiderWorkspacesChecked) error

func (Noop) GetDriftCheckResult

func (n Noop) GetDriftCheckResult(ctx context.Context, key *ConsiderDriftChecked) (*DriftCheckValue, error)

func (Noop) GetRemoteWorkspaces

func (n Noop) GetRemoteWorkspaces(ctx context.Context, key *ConsiderWorkspacesChecked) (*WorkspacesCheckedValue, error)

func (Noop) StoreDriftCheckResult

func (n Noop) StoreDriftCheckResult(ctx context.Context, key *ConsiderDriftChecked, value *DriftCheckValue) error

func (Noop) StoreRemoteWorkspaces

func (n Noop) StoreRemoteWorkspaces(ctx context.Context, key *ConsiderWorkspacesChecked, value *WorkspacesCheckedValue) error

type ProcessedCache

type ProcessedCache interface {
	GetDriftCheckResult(ctx context.Context, key *ConsiderDriftChecked) (*DriftCheckValue, error)
	DeleteDriftCheckResult(ctx context.Context, key *ConsiderDriftChecked) error
	StoreDriftCheckResult(ctx context.Context, key *ConsiderDriftChecked, value *DriftCheckValue) error
	GetRemoteWorkspaces(ctx context.Context, key *ConsiderWorkspacesChecked) (*WorkspacesCheckedValue, error)
	StoreRemoteWorkspaces(ctx context.Context, key *ConsiderWorkspacesChecked, value *WorkspacesCheckedValue) error
	DeleteRemoteWorkspaces(ctx context.Context, key *ConsiderWorkspacesChecked) error
}

type WorkspacesCheckedValue

type WorkspacesCheckedValue struct {
	// If non-empty, indicates an error in the checking
	Error string
	// Worksaces we remember in this remote
	Workspaces []string
	// Only if we have an empty error: when we did this check
	When time.Time
}

Jump to

Keyboard shortcuts

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