-
Notifications
You must be signed in to change notification settings - Fork 30
/
types.proto
98 lines (72 loc) · 2.67 KB
/
types.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
syntax = "proto3";
option go_package = "github.com/hashicorp/kv";
package kv;
import "google/protobuf/timestamp.proto";
import "google/protobuf/duration.proto";
// If values are added to this, be sure to update the config() function
message Configuration {
uint32 max_versions = 1;
bool cas_required = 2;
google.protobuf.Duration delete_version_after = 3;
}
message VersionMetadata {
// CreatedTime is when the version was created.
google.protobuf.Timestamp created_time = 1;
// DeletionTime is the time this version becomes invalid.
// Set to Now() to delete the version before the configured
// delete time.
google.protobuf.Timestamp deletion_time = 2;
// Destroyed is used to specify this version is
// a has been removed and the underlying data deleted.
bool destroyed = 3;
}
message KeyMetadata {
// Key is the key for this entry
string key = 1;
// Versions is the map of versionID -> VersionMetadata.
// Useful when listing all versions.
map<uint64, VersionMetadata> versions = 2;
// CurrentVersion is the latest version of the value
uint64 current_version = 3;
// OldestVersion is the oldest version of the value.
uint64 oldest_version = 4;
// Created time is when the metadata was created.
google.protobuf.Timestamp created_time = 5;
// Updated time was the last time the metadata version
// was updated.
google.protobuf.Timestamp updated_time = 6;
// MaxVersions specifies how many versions to keep around.
// If empty value, defaults to the configured Max
// for the mount.
uint32 max_versions = 7;
// CasRequired specifies if the cas parameter is
// required for this key
bool cas_required = 8;
// DeleteVersionAfter specifies how long to keep versions around. If
// empty value, defaults to the configured delete_version_after for the
// mount.
google.protobuf.Duration delete_version_after = 9;
// CustomMetadata is a map of string key-value pairs used to store
// user-provided information about the secret.
map<string, string> custom_metadata = 10;
}
message Version {
// Data is a JSON object with string keys that
// represents the user supplied data.
bytes data = 1;
// CreatedTime is when the version was created.
google.protobuf.Timestamp created_time = 2;
// DeletionTime is the time this version becomes invalid.
// Set to Now() to delete the version before the configured
// deletion time.
google.protobuf.Timestamp deletion_time = 3;
}
message UpgradeInfo {
// Started time is when the upgrade was started.
google.protobuf.Timestamp started_time = 1;
// done is set to true once the backend has been successfully
// upgraded.
bool done = 2;
}