Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.12
// protoc (unknown)
// source: store/task.proto
package store
import (
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)
)
// Type represents the type of database operation to perform.
type Task_Type int32
const (
Task_TASK_TYPE_UNSPECIFIED Task_Type = 0
// Create a new database.
Task_DATABASE_CREATE Task_Type = 1
// Apply schema/data migrations to an existing database.
// Execution strategy is determined by release type (VERSIONED/DECLARATIVE)
// or sheet content for non-release tasks.
Task_DATABASE_MIGRATE Task_Type = 2
)
// Enum value maps for Task_Type.
var (
Task_Type_name = map[int32]string{
0: "TASK_TYPE_UNSPECIFIED",
1: "DATABASE_CREATE",
2: "DATABASE_MIGRATE",
}
Task_Type_value = map[string]int32{
"TASK_TYPE_UNSPECIFIED": 0,
"DATABASE_CREATE": 1,
"DATABASE_MIGRATE": 2,
}
)
func (x Task_Type) Enum() *Task_Type {
p := new(Task_Type)
*p = x
return p
}
func (x Task_Type) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Task_Type) Descriptor() protoreflect.EnumDescriptor {
return file_store_task_proto_enumTypes[0].Descriptor()
}
func (Task_Type) Type() protoreflect.EnumType {
return &file_store_task_proto_enumTypes[0]
}
func (x Task_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Task_Type.Descriptor instead.
func (Task_Type) EnumDescriptor() ([]byte, []int) {
return file_store_task_proto_rawDescGZIP(), []int{0, 0}
}
// Task is the metadata for database operation tasks.
type Task struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Whether the task was skipped during execution.
Skipped bool `protobuf:"varint,1,opt,name=skipped,proto3" json:"skipped,omitempty"`
// Reason why the task was skipped.
SkippedReason string `protobuf:"bytes,2,opt,name=skipped_reason,json=skippedReason,proto3" json:"skipped_reason,omitempty"`
// UUID that identifies the spec this task implements.
SpecId string `protobuf:"bytes,3,opt,name=spec_id,json=specId,proto3" json:"spec_id,omitempty"`
// Source of the task's SQL content - either a single sheet or an entire release.
//
// Types that are valid to be assigned to Source:
//
// *Task_SheetSha256
// *Task_Release
Source isTask_Source `protobuf_oneof:"source"`
// Whether to create an automatic backup before applying changes.
EnablePriorBackup bool `protobuf:"varint,11,opt,name=enable_prior_backup,json=enablePriorBackup,proto3" json:"enable_prior_backup,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Task) Reset() {
*x = Task{}
mi := &file_store_task_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Task) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Task) ProtoMessage() {}
func (x *Task) ProtoReflect() protoreflect.Message {
mi := &file_store_task_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 Task.ProtoReflect.Descriptor instead.
func (*Task) Descriptor() ([]byte, []int) {
return file_store_task_proto_rawDescGZIP(), []int{0}
}
func (x *Task) GetSkipped() bool {
if x != nil {
return x.Skipped
}
return false
}
func (x *Task) GetSkippedReason() string {
if x != nil {
return x.SkippedReason
}
return ""
}
func (x *Task) GetSpecId() string {
if x != nil {
return x.SpecId
}
return ""
}
func (x *Task) GetSource() isTask_Source {
if x != nil {
return x.Source
}
return nil
}
func (x *Task) GetSheetSha256() string {
if x != nil {
if x, ok := x.Source.(*Task_SheetSha256); ok {
return x.SheetSha256
}
}
return ""
}
func (x *Task) GetRelease() string {
if x != nil {
if x, ok := x.Source.(*Task_Release); ok {
return x.Release
}
}
return ""
}
func (x *Task) GetEnablePriorBackup() bool {
if x != nil {
return x.EnablePriorBackup
}
return false
}
type isTask_Source interface {
isTask_Source()
}
type Task_SheetSha256 struct {
// The SHA256 hash of a single sheet content (hex-encoded).
// Used for non-release tasks.
SheetSha256 string `protobuf:"bytes,10,opt,name=sheet_sha256,json=sheetSha256,proto3,oneof"`
}
type Task_Release struct {
// The release resource name: projects/{project}/releases/{release}.
// Used for GitOps release-based tasks that execute multiple files.
Release string `protobuf:"bytes,13,opt,name=release,proto3,oneof"`
}
func (*Task_SheetSha256) isTask_Source() {}
func (*Task_Release) isTask_Source() {}
var File_store_task_proto protoreflect.FileDescriptor
const file_store_task_proto_rawDesc = "" +
"\n" +
"\x10store/task.proto\x12\x0ebytebase.store\"\xb5\x02\n" +
"\x04Task\x12\x18\n" +
"\askipped\x18\x01 \x01(\bR\askipped\x12%\n" +
"\x0eskipped_reason\x18\x02 \x01(\tR\rskippedReason\x12\x17\n" +
"\aspec_id\x18\x03 \x01(\tR\x06specId\x12#\n" +
"\fsheet_sha256\x18\n" +
" \x01(\tH\x00R\vsheetSha256\x12\x1a\n" +
"\arelease\x18\r \x01(\tH\x00R\arelease\x12.\n" +
"\x13enable_prior_backup\x18\v \x01(\bR\x11enablePriorBackup\"L\n" +
"\x04Type\x12\x19\n" +
"\x15TASK_TYPE_UNSPECIFIED\x10\x00\x12\x13\n" +
"\x0fDATABASE_CREATE\x10\x01\x12\x14\n" +
"\x10DATABASE_MIGRATE\x10\x02B\b\n" +
"\x06sourceJ\x04\b\x04\x10\n" +
"J\x04\b\f\x10\rB\x8c\x01\n" +
"\x12com.bytebase.storeB\tTaskProtoP\x01Z\x12generated-go/store\xa2\x02\x03BSX\xaa\x02\x0eBytebase.Store\xca\x02\x0eBytebase\\Store\xe2\x02\x1aBytebase\\Store\\GPBMetadata\xea\x02\x0fBytebase::Storeb\x06proto3"
var (
file_store_task_proto_rawDescOnce sync.Once
file_store_task_proto_rawDescData []byte
)
func file_store_task_proto_rawDescGZIP() []byte {
file_store_task_proto_rawDescOnce.Do(func() {
file_store_task_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_store_task_proto_rawDesc), len(file_store_task_proto_rawDesc)))
})
return file_store_task_proto_rawDescData
}
var file_store_task_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_store_task_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_store_task_proto_goTypes = []any{
(Task_Type)(0), // 0: bytebase.store.Task.Type
(*Task)(nil), // 1: bytebase.store.Task
}
var file_store_task_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_store_task_proto_init() }
func file_store_task_proto_init() {
if File_store_task_proto != nil {
return
}
file_store_task_proto_msgTypes[0].OneofWrappers = []any{
(*Task_SheetSha256)(nil),
(*Task_Release)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_task_proto_rawDesc), len(file_store_task_proto_rawDesc)),
NumEnums: 1,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_store_task_proto_goTypes,
DependencyIndexes: file_store_task_proto_depIdxs,
EnumInfos: file_store_task_proto_enumTypes,
MessageInfos: file_store_task_proto_msgTypes,
}.Build()
File_store_task_proto = out.File
file_store_task_proto_goTypes = nil
file_store_task_proto_depIdxs = nil
}