Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAffectedRowsMismatch = errors.New("unexpected affected rows")
View Source
var ErrBlueprintNotFound = errors.New("blueprint not found")
View Source
var ErrComposeEntryNotFound = errors.New("compose entry not found")
ErrComposeEntryNotFound occurs when no compose request is found for a user.
Functions ¶
This section is empty.
Types ¶
type BlueprintCompose ¶
type BlueprintCompose struct {
ComposeEntry
BlueprintId uuid.UUID
BlueprintVersion int
}
type BlueprintEntry ¶
type BlueprintEntry struct {
Id uuid.UUID
VersionId uuid.UUID
Version int
Body json.RawMessage
Name string
Description string
Metadata json.RawMessage
ServiceSnapshots json.RawMessage
}
type BlueprintWithNoBody ¶
type ComplianceSnapshot ¶
type ComplianceSnapshot struct {
PolicyId uuid.UUID `json:"policy_id"`
PolicyCustomizations json.RawMessage `json:"policy_customizations"`
}
type ComposeEntry ¶
type ComposeWithBlueprintVersion ¶
type ComposeWithBlueprintVersion struct {
*ComposeEntry
BlueprintId *uuid.UUID
BlueprintVersion *int
}
type DB ¶
type DB interface {
InsertCompose(ctx context.Context, jobId uuid.UUID, accountNumber, email, orgId string, imageName *string, request json.RawMessage, clientId *string, blueprintVersionId *uuid.UUID) error
GetComposes(ctx context.Context, orgId string, since time.Duration, limit, offset int, ignoreImageTypes []string) ([]ComposeWithBlueprintVersion, int, error)
GetLatestBlueprintVersionNumber(ctx context.Context, orgId string, blueprintId uuid.UUID) (int, error)
GetBlueprintComposes(ctx context.Context, orgId string, blueprintId uuid.UUID, blueprintVersion *int, since time.Duration, limit, offset int, ignoreImageTypes []string) ([]BlueprintCompose, error)
GetCompose(ctx context.Context, jobId uuid.UUID, orgId string) (*ComposeEntry, error)
GetComposeImageType(ctx context.Context, jobId uuid.UUID, orgId string) (string, error)
CountComposesSince(ctx context.Context, orgId string, duration time.Duration) (int, error)
CountBlueprintComposesSince(ctx context.Context, orgId string, blueprintId uuid.UUID, blueprintVersion *int, since time.Duration, ignoreImageTypes []string) (int, error)
DeleteCompose(ctx context.Context, jobId uuid.UUID, orgId string) error
InsertBlueprint(ctx context.Context, id uuid.UUID, versionId uuid.UUID, orgID, accountNumber, name, description string, body json.RawMessage, metadata json.RawMessage, serviceSnapshots json.RawMessage) error
GetBlueprint(ctx context.Context, id uuid.UUID, orgID string, version *int) (*BlueprintEntry, error)
UpdateBlueprint(ctx context.Context, id uuid.UUID, blueprintId uuid.UUID, orgId string, name string, description string, body json.RawMessage, serviceSnapshots json.RawMessage) error
GetBlueprints(ctx context.Context, orgID string, limit, offset int) ([]BlueprintWithNoBody, int, error)
FindBlueprints(ctx context.Context, orgID, search string, limit, offset int) ([]BlueprintWithNoBody, int, error)
FindBlueprintByName(ctx context.Context, orgID, nameQuery string) (*BlueprintWithNoBody, error)
DeleteBlueprint(ctx context.Context, id uuid.UUID, orgID string) error
}
type ServiceSnapshots ¶
type ServiceSnapshots struct {
Compliance *ComplianceSnapshot `json:"compliance,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.