Files
navidrome-meilisearch/plugins/host/cache/cache.proto
Dongho Kim c251f174ed
Some checks failed
Pipeline: Test, Lint, Build / Get version info (push) Has been cancelled
Pipeline: Test, Lint, Build / Lint Go code (push) Has been cancelled
Pipeline: Test, Lint, Build / Test Go code (push) Has been cancelled
Pipeline: Test, Lint, Build / Test JS code (push) Has been cancelled
Pipeline: Test, Lint, Build / Lint i18n files (push) Has been cancelled
Pipeline: Test, Lint, Build / Check Docker configuration (push) Has been cancelled
Pipeline: Test, Lint, Build / Build (darwin/amd64) (push) Has been cancelled
Pipeline: Test, Lint, Build / Build (darwin/arm64) (push) Has been cancelled
Pipeline: Test, Lint, Build / Build (linux/386) (push) Has been cancelled
Pipeline: Test, Lint, Build / Build (linux/amd64) (push) Has been cancelled
Pipeline: Test, Lint, Build / Build (linux/arm/v5) (push) Has been cancelled
Pipeline: Test, Lint, Build / Build (linux/arm/v6) (push) Has been cancelled
Pipeline: Test, Lint, Build / Build (linux/arm/v7) (push) Has been cancelled
Pipeline: Test, Lint, Build / Build (linux/arm64) (push) Has been cancelled
Pipeline: Test, Lint, Build / Build (windows/386) (push) Has been cancelled
Pipeline: Test, Lint, Build / Build (windows/amd64) (push) Has been cancelled
Pipeline: Test, Lint, Build / Push to GHCR (push) Has been cancelled
Pipeline: Test, Lint, Build / Push to Docker Hub (push) Has been cancelled
Pipeline: Test, Lint, Build / Cleanup digest artifacts (push) Has been cancelled
Pipeline: Test, Lint, Build / Build Windows installers (push) Has been cancelled
Pipeline: Test, Lint, Build / Package/Release (push) Has been cancelled
Pipeline: Test, Lint, Build / Upload Linux PKG (push) Has been cancelled
Close stale issues and PRs / stale (push) Has been cancelled
POEditor import / update-translations (push) Has been cancelled
update
2025-12-08 16:16:23 +01:00

120 lines
3.5 KiB
Protocol Buffer

syntax = "proto3";
package cache;
option go_package = "github.com/navidrome/navidrome/plugins/host/cache;cache";
// go:plugin type=host version=1
service CacheService {
// Set a string value in the cache
rpc SetString(SetStringRequest) returns (SetResponse);
// Get a string value from the cache
rpc GetString(GetRequest) returns (GetStringResponse);
// Set an integer value in the cache
rpc SetInt(SetIntRequest) returns (SetResponse);
// Get an integer value from the cache
rpc GetInt(GetRequest) returns (GetIntResponse);
// Set a float value in the cache
rpc SetFloat(SetFloatRequest) returns (SetResponse);
// Get a float value from the cache
rpc GetFloat(GetRequest) returns (GetFloatResponse);
// Set a byte slice value in the cache
rpc SetBytes(SetBytesRequest) returns (SetResponse);
// Get a byte slice value from the cache
rpc GetBytes(GetRequest) returns (GetBytesResponse);
// Remove a value from the cache
rpc Remove(RemoveRequest) returns (RemoveResponse);
// Check if a key exists in the cache
rpc Has(HasRequest) returns (HasResponse);
}
// Request to store a string value
message SetStringRequest {
string key = 1; // Cache key
string value = 2; // String value to store
int64 ttl_seconds = 3; // TTL in seconds, 0 means use default
}
// Request to store an integer value
message SetIntRequest {
string key = 1; // Cache key
int64 value = 2; // Integer value to store
int64 ttl_seconds = 3; // TTL in seconds, 0 means use default
}
// Request to store a float value
message SetFloatRequest {
string key = 1; // Cache key
double value = 2; // Float value to store
int64 ttl_seconds = 3; // TTL in seconds, 0 means use default
}
// Request to store a byte slice value
message SetBytesRequest {
string key = 1; // Cache key
bytes value = 2; // Byte slice value to store
int64 ttl_seconds = 3; // TTL in seconds, 0 means use default
}
// Response after setting a value
message SetResponse {
bool success = 1; // Whether the operation was successful
}
// Request to get a value
message GetRequest {
string key = 1; // Cache key
}
// Response containing a string value
message GetStringResponse {
bool exists = 1; // Whether the key exists
string value = 2; // The string value (if exists is true)
}
// Response containing an integer value
message GetIntResponse {
bool exists = 1; // Whether the key exists
int64 value = 2; // The integer value (if exists is true)
}
// Response containing a float value
message GetFloatResponse {
bool exists = 1; // Whether the key exists
double value = 2; // The float value (if exists is true)
}
// Response containing a byte slice value
message GetBytesResponse {
bool exists = 1; // Whether the key exists
bytes value = 2; // The byte slice value (if exists is true)
}
// Request to remove a value
message RemoveRequest {
string key = 1; // Cache key
}
// Response after removing a value
message RemoveResponse {
bool success = 1; // Whether the operation was successful
}
// Request to check if a key exists
message HasRequest {
string key = 1; // Cache key
}
// Response indicating if a key exists
message HasResponse {
bool exists = 1; // Whether the key exists
}