Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Remove LazyCacheRule value field and add Key configuration #13

Merged
merged 1 commit into from Dec 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 15 additions & 4 deletions config/cache/v1alpha1/rules.proto
Expand Up @@ -15,7 +15,7 @@ option java_package = "io.gingersnapproject.proto.api.config.v1alpha1";
// on the DB: table or schema.table must be at least supported
string table_name = 2;
// Format of the key for the get(key) operation
Key key = 3;
EagerCacheKey key = 3;
// Query columns used to build the entry value
Value value = 4;
}
Expand All @@ -27,12 +27,23 @@ option java_package = "io.gingersnapproject.proto.api.config.v1alpha1";
NamespacedObjectReference cache_ref = 1;
// The select query needed to fetch values from the DB
string query = 2;
Value value = 3;
// Format of the key for the get(key) operation
LazyCacheKey key = 3;
}


// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Describes how the key is build from the query result row
message LazyCacheKey {
// +kubebuilder:validation:Enum=TEXT;JSON
// Format of the key for the get(key) operation
KeyFormat format = 1;
// Separator character in case of plain test key format
string key_separator = 2;
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Describes how the key is build from the query result row
message Key {
message EagerCacheKey {
// +kubebuilder:validation:Enum=TEXT;JSON
// Format of the key for the get(key) operation
KeyFormat format = 1;
Expand Down