mirror of https://github.com/hashicorp/boundary
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
429 lines
14 KiB
429 lines
14 KiB
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.10
|
|
// protoc (unknown)
|
|
// source: controller/storage/oplog/store/v1/oplog.proto
|
|
|
|
// define an oplog package within the Boundary controller
|
|
|
|
package store
|
|
|
|
import (
|
|
timestamp "github.com/hashicorp/boundary/internal/db/timestamp"
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
// Entry provides a message for oplog entries that's compatible with gorm
|
|
type Entry struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// @inject_tag: gorm:"primary_key"
|
|
Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" gorm:"primary_key"`
|
|
// @inject_tag: `gorm:"default:current_timestamp"`
|
|
CreateTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty" gorm:"default:current_timestamp"`
|
|
// @inject_tag: `gorm:"default:current_timestamp"`
|
|
UpdateTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty" gorm:"default:current_timestamp"`
|
|
// @inject_tag: gorm:"not_null"
|
|
Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty" gorm:"not_null"`
|
|
// @inject_tat: gorm:"not_null"
|
|
AggregateName string `protobuf:"bytes,5,opt,name=aggregate_name,json=aggregateName,proto3" json:"aggregate_name,omitempty"`
|
|
// one to many relationship
|
|
// @inject_tag: gorm:"foreignkey:entry_id"
|
|
Metadata []*Metadata `protobuf:"bytes,6,rep,name=metadata,proto3" json:"metadata,omitempty" gorm:"foreignkey:entry_id"`
|
|
// ciphertext entry data stored in the database
|
|
// @inject_tag: gorm:"column:data;not_null" wrapping:"ct,entry_data"
|
|
CtData []byte `protobuf:"bytes,7,opt,name=ct_data,json=ctData,proto3" json:"ct_data,omitempty" gorm:"column:data;not_null" wrapping:"ct,entry_data"`
|
|
// plain text version of the decrypted entry data
|
|
// we are NOT storing this plain-text entry data in the db
|
|
// @inject_tag: gorm:"-" wrapping:"pt,entry_data"
|
|
Data []byte `protobuf:"bytes,8,opt,name=data,proto3" json:"data,omitempty" gorm:"-" wrapping:"pt,entry_data"`
|
|
// the private id of the data key version used to encrypt the data.
|
|
// @inject_tag: gorm:"not_null"
|
|
KeyId string `protobuf:"bytes,9,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty" gorm:"not_null"`
|
|
// the scope id associated with the key used to encrypt the data.
|
|
// This value is populated from the key_id in a trigger.
|
|
// @inject_tag: gorm:"default:null"
|
|
ScopeId string `protobuf:"bytes,10,opt,name=scope_id,json=scopeId,proto3" json:"scope_id,omitempty" gorm:"default:null"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *Entry) Reset() {
|
|
*x = Entry{}
|
|
mi := &file_controller_storage_oplog_store_v1_oplog_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *Entry) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Entry) ProtoMessage() {}
|
|
|
|
func (x *Entry) ProtoReflect() protoreflect.Message {
|
|
mi := &file_controller_storage_oplog_store_v1_oplog_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use Entry.ProtoReflect.Descriptor instead.
|
|
func (*Entry) Descriptor() ([]byte, []int) {
|
|
return file_controller_storage_oplog_store_v1_oplog_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *Entry) GetId() uint32 {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Entry) GetCreateTime() *timestamp.Timestamp {
|
|
if x != nil {
|
|
return x.CreateTime
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Entry) GetUpdateTime() *timestamp.Timestamp {
|
|
if x != nil {
|
|
return x.UpdateTime
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Entry) GetVersion() string {
|
|
if x != nil {
|
|
return x.Version
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Entry) GetAggregateName() string {
|
|
if x != nil {
|
|
return x.AggregateName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Entry) GetMetadata() []*Metadata {
|
|
if x != nil {
|
|
return x.Metadata
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Entry) GetCtData() []byte {
|
|
if x != nil {
|
|
return x.CtData
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Entry) GetData() []byte {
|
|
if x != nil {
|
|
return x.Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Entry) GetKeyId() string {
|
|
if x != nil {
|
|
return x.KeyId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Entry) GetScopeId() string {
|
|
if x != nil {
|
|
return x.ScopeId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// Metadata provides a message for oplog metadata that's compatible with gorm
|
|
type Metadata struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// @inject_tag: gorm:"primary_key"
|
|
Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" gorm:"primary_key"`
|
|
// @inject_tag: `gorm:"default:current_timestamp"`
|
|
CreateTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty" gorm:"default:current_timestamp"` // @inject_tag: gorm:"not_nul
|
|
EntryId uint32 `protobuf:"varint,3,opt,name=entry_id,json=entryId,proto3" json:"entry_id,omitempty"`
|
|
// @inject_tag: gorm:"foreignkey:EntryId"
|
|
Entry *Entry `protobuf:"bytes,4,opt,name=entry,proto3" json:"entry,omitempty" gorm:"foreignkey:EntryId"`
|
|
// @inject_tag: gorm:"not_null"
|
|
Key string `protobuf:"bytes,5,opt,name=key,proto3" json:"key,omitempty" gorm:"not_null"`
|
|
// @inject_tag: gorm:"not_null"
|
|
Value string `protobuf:"bytes,6,opt,name=value,proto3" json:"value,omitempty" gorm:"not_null"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *Metadata) Reset() {
|
|
*x = Metadata{}
|
|
mi := &file_controller_storage_oplog_store_v1_oplog_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *Metadata) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Metadata) ProtoMessage() {}
|
|
|
|
func (x *Metadata) ProtoReflect() protoreflect.Message {
|
|
mi := &file_controller_storage_oplog_store_v1_oplog_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use Metadata.ProtoReflect.Descriptor instead.
|
|
func (*Metadata) Descriptor() ([]byte, []int) {
|
|
return file_controller_storage_oplog_store_v1_oplog_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *Metadata) GetId() uint32 {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Metadata) GetCreateTime() *timestamp.Timestamp {
|
|
if x != nil {
|
|
return x.CreateTime
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Metadata) GetEntryId() uint32 {
|
|
if x != nil {
|
|
return x.EntryId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Metadata) GetEntry() *Entry {
|
|
if x != nil {
|
|
return x.Entry
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Metadata) GetKey() string {
|
|
if x != nil {
|
|
return x.Key
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Metadata) GetValue() string {
|
|
if x != nil {
|
|
return x.Value
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// Ticket provides a message for oplog tickets that's compatible with gorm
|
|
type Ticket struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// @inject_tag: gorm:"primary_key"
|
|
Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" gorm:"primary_key"`
|
|
// @inject_tag: `gorm:"default:current_timestamp"`
|
|
CreateTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty" gorm:"default:current_timestamp"`
|
|
// @inject_tag: `gorm:"default:current_timestamp"`
|
|
UpdateTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty" gorm:"default:current_timestamp"`
|
|
// @inject_tat: gorm:"not_null"
|
|
Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"`
|
|
// @inject_tat: gorm:"not_null;default:'1'"
|
|
Version uint32 `protobuf:"varint,7,opt,name=version,proto3" json:"version,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *Ticket) Reset() {
|
|
*x = Ticket{}
|
|
mi := &file_controller_storage_oplog_store_v1_oplog_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *Ticket) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Ticket) ProtoMessage() {}
|
|
|
|
func (x *Ticket) ProtoReflect() protoreflect.Message {
|
|
mi := &file_controller_storage_oplog_store_v1_oplog_proto_msgTypes[2]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use Ticket.ProtoReflect.Descriptor instead.
|
|
func (*Ticket) Descriptor() ([]byte, []int) {
|
|
return file_controller_storage_oplog_store_v1_oplog_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *Ticket) GetId() uint32 {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Ticket) GetCreateTime() *timestamp.Timestamp {
|
|
if x != nil {
|
|
return x.CreateTime
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Ticket) GetUpdateTime() *timestamp.Timestamp {
|
|
if x != nil {
|
|
return x.UpdateTime
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Ticket) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Ticket) GetVersion() uint32 {
|
|
if x != nil {
|
|
return x.Version
|
|
}
|
|
return 0
|
|
}
|
|
|
|
var File_controller_storage_oplog_store_v1_oplog_proto protoreflect.FileDescriptor
|
|
|
|
const file_controller_storage_oplog_store_v1_oplog_proto_rawDesc = "" +
|
|
"\n" +
|
|
"-controller/storage/oplog/store/v1/oplog.proto\x12!controller.storage.oplog.store.v1\x1a/controller/storage/timestamp/v1/timestamp.proto\"\x9a\x03\n" +
|
|
"\x05Entry\x12\x0e\n" +
|
|
"\x02id\x18\x01 \x01(\rR\x02id\x12K\n" +
|
|
"\vcreate_time\x18\x02 \x01(\v2*.controller.storage.timestamp.v1.TimestampR\n" +
|
|
"createTime\x12K\n" +
|
|
"\vupdate_time\x18\x03 \x01(\v2*.controller.storage.timestamp.v1.TimestampR\n" +
|
|
"updateTime\x12\x18\n" +
|
|
"\aversion\x18\x04 \x01(\tR\aversion\x12%\n" +
|
|
"\x0eaggregate_name\x18\x05 \x01(\tR\raggregateName\x12G\n" +
|
|
"\bmetadata\x18\x06 \x03(\v2+.controller.storage.oplog.store.v1.MetadataR\bmetadata\x12\x17\n" +
|
|
"\act_data\x18\a \x01(\fR\x06ctData\x12\x12\n" +
|
|
"\x04data\x18\b \x01(\fR\x04data\x12\x15\n" +
|
|
"\x06key_id\x18\t \x01(\tR\x05keyId\x12\x19\n" +
|
|
"\bscope_id\x18\n" +
|
|
" \x01(\tR\ascopeId\"\xea\x01\n" +
|
|
"\bMetadata\x12\x0e\n" +
|
|
"\x02id\x18\x01 \x01(\rR\x02id\x12K\n" +
|
|
"\vcreate_time\x18\x02 \x01(\v2*.controller.storage.timestamp.v1.TimestampR\n" +
|
|
"createTime\x12\x19\n" +
|
|
"\bentry_id\x18\x03 \x01(\rR\aentryId\x12>\n" +
|
|
"\x05entry\x18\x04 \x01(\v2(.controller.storage.oplog.store.v1.EntryR\x05entry\x12\x10\n" +
|
|
"\x03key\x18\x05 \x01(\tR\x03key\x12\x14\n" +
|
|
"\x05value\x18\x06 \x01(\tR\x05value\"\xe0\x01\n" +
|
|
"\x06Ticket\x12\x0e\n" +
|
|
"\x02id\x18\x01 \x01(\rR\x02id\x12K\n" +
|
|
"\vcreate_time\x18\x02 \x01(\v2*.controller.storage.timestamp.v1.TimestampR\n" +
|
|
"createTime\x12K\n" +
|
|
"\vupdate_time\x18\x03 \x01(\v2*.controller.storage.timestamp.v1.TimestampR\n" +
|
|
"updateTime\x12\x12\n" +
|
|
"\x04name\x18\x06 \x01(\tR\x04name\x12\x18\n" +
|
|
"\aversion\x18\a \x01(\rR\aversionB:Z8github.com/hashicorp/boundary/internal/oplog/store;storeb\x06proto3"
|
|
|
|
var (
|
|
file_controller_storage_oplog_store_v1_oplog_proto_rawDescOnce sync.Once
|
|
file_controller_storage_oplog_store_v1_oplog_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_controller_storage_oplog_store_v1_oplog_proto_rawDescGZIP() []byte {
|
|
file_controller_storage_oplog_store_v1_oplog_proto_rawDescOnce.Do(func() {
|
|
file_controller_storage_oplog_store_v1_oplog_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_controller_storage_oplog_store_v1_oplog_proto_rawDesc), len(file_controller_storage_oplog_store_v1_oplog_proto_rawDesc)))
|
|
})
|
|
return file_controller_storage_oplog_store_v1_oplog_proto_rawDescData
|
|
}
|
|
|
|
var file_controller_storage_oplog_store_v1_oplog_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
|
var file_controller_storage_oplog_store_v1_oplog_proto_goTypes = []any{
|
|
(*Entry)(nil), // 0: controller.storage.oplog.store.v1.Entry
|
|
(*Metadata)(nil), // 1: controller.storage.oplog.store.v1.Metadata
|
|
(*Ticket)(nil), // 2: controller.storage.oplog.store.v1.Ticket
|
|
(*timestamp.Timestamp)(nil), // 3: controller.storage.timestamp.v1.Timestamp
|
|
}
|
|
var file_controller_storage_oplog_store_v1_oplog_proto_depIdxs = []int32{
|
|
3, // 0: controller.storage.oplog.store.v1.Entry.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
|
|
3, // 1: controller.storage.oplog.store.v1.Entry.update_time:type_name -> controller.storage.timestamp.v1.Timestamp
|
|
1, // 2: controller.storage.oplog.store.v1.Entry.metadata:type_name -> controller.storage.oplog.store.v1.Metadata
|
|
3, // 3: controller.storage.oplog.store.v1.Metadata.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
|
|
0, // 4: controller.storage.oplog.store.v1.Metadata.entry:type_name -> controller.storage.oplog.store.v1.Entry
|
|
3, // 5: controller.storage.oplog.store.v1.Ticket.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
|
|
3, // 6: controller.storage.oplog.store.v1.Ticket.update_time:type_name -> controller.storage.timestamp.v1.Timestamp
|
|
7, // [7:7] is the sub-list for method output_type
|
|
7, // [7:7] is the sub-list for method input_type
|
|
7, // [7:7] is the sub-list for extension type_name
|
|
7, // [7:7] is the sub-list for extension extendee
|
|
0, // [0:7] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_controller_storage_oplog_store_v1_oplog_proto_init() }
|
|
func file_controller_storage_oplog_store_v1_oplog_proto_init() {
|
|
if File_controller_storage_oplog_store_v1_oplog_proto != nil {
|
|
return
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_controller_storage_oplog_store_v1_oplog_proto_rawDesc), len(file_controller_storage_oplog_store_v1_oplog_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 3,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_controller_storage_oplog_store_v1_oplog_proto_goTypes,
|
|
DependencyIndexes: file_controller_storage_oplog_store_v1_oplog_proto_depIdxs,
|
|
MessageInfos: file_controller_storage_oplog_store_v1_oplog_proto_msgTypes,
|
|
}.Build()
|
|
File_controller_storage_oplog_store_v1_oplog_proto = out.File
|
|
file_controller_storage_oplog_store_v1_oplog_proto_goTypes = nil
|
|
file_controller_storage_oplog_store_v1_oplog_proto_depIdxs = nil
|
|
}
|