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.
boundary/internal/scheduler/job/store/job.pb.go

334 lines
12 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/job/store/v1/job.proto
// Package store provides protobufs for storing types in the job package.
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)
)
type Job struct {
state protoimpl.MessageState `protogen:"open.v1"`
// plugin_id is the primary key of the plugin that registered and owns the job
// @inject_tag: `gorm:"primary_key"`
PluginId string `protobuf:"bytes,1,opt,name=plugin_id,json=pluginId,proto3" json:"plugin_id,omitempty" gorm:"primary_key"`
// The name of the job.
// @inject_tag: `gorm:"primary_key"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" gorm:"primary_key"`
// The human friendly description of the job.
// @inject_tag: `gorm:"not_null"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty" gorm:"not_null"`
// next_scheduled_run is the time that the next run should be created.
// @inject_tag: `gorm:"default:current_timestamp"`
NextScheduledRun *timestamp.Timestamp `protobuf:"bytes,4,opt,name=next_scheduled_run,json=nextScheduledRun,proto3" json:"next_scheduled_run,omitempty" gorm:"default:current_timestamp"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Job) Reset() {
*x = Job{}
mi := &file_controller_storage_job_store_v1_job_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Job) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Job) ProtoMessage() {}
func (x *Job) ProtoReflect() protoreflect.Message {
mi := &file_controller_storage_job_store_v1_job_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 Job.ProtoReflect.Descriptor instead.
func (*Job) Descriptor() ([]byte, []int) {
return file_controller_storage_job_store_v1_job_proto_rawDescGZIP(), []int{0}
}
func (x *Job) GetPluginId() string {
if x != nil {
return x.PluginId
}
return ""
}
func (x *Job) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Job) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Job) GetNextScheduledRun() *timestamp.Timestamp {
if x != nil {
return x.NextScheduledRun
}
return nil
}
type JobRun struct {
state protoimpl.MessageState `protogen:"open.v1"`
// private_id is used to access the job run but not intended to be available via the API
// @inject_tag: `gorm:"primary_key;default:null"`
PrivateId string `protobuf:"bytes,1,opt,name=private_id,json=privateId,proto3" json:"private_id,omitempty" gorm:"primary_key;default:null"`
// The job_plugin_id is the id of the plugin that owns the job.
// @inject_tag: `gorm:"not_null"`
JobPluginId string `protobuf:"bytes,2,opt,name=job_plugin_id,json=jobPluginId,proto3" json:"job_plugin_id,omitempty" gorm:"not_null"`
// The job_name is the name of the job and must be set.
// @inject_tag: `gorm:"not_null"`
JobName string `protobuf:"bytes,3,opt,name=job_name,json=jobName,proto3" json:"job_name,omitempty" gorm:"not_null"`
// The create_time is set by the database.
// @inject_tag: `gorm:"default:current_timestamp"`
CreateTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty" gorm:"default:current_timestamp"`
// The update_time is set by the database.
// @inject_tag: `gorm:"default:current_timestamp"`
UpdateTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty" gorm:"default:current_timestamp"`
// The end_time is set when the job run completes.
// @inject_tag: `gorm:"default:null"`
EndTime *timestamp.Timestamp `protobuf:"bytes,7,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty" gorm:"default:null"`
// completed_count is set during an update to indicate the current progress.
// @inject_tag: `gorm:"default:0"`
CompletedCount uint32 `protobuf:"varint,8,opt,name=completed_count,json=completedCount,proto3" json:"completed_count,omitempty" gorm:"default:0"`
// total_count is set during an update to indicate the progress goal.
// @inject_tag: `gorm:"default:0"`
TotalCount uint32 `protobuf:"varint,9,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty" gorm:"default:0"`
// retries_count is set during an update to indicate the number of times
// a job has retried work.
// @inject_tag: `gorm:"default:0"`
RetriesCount uint32 `protobuf:"varint,12,opt,name=retries_count,json=retriesCount,proto3" json:"retries_count,omitempty" gorm:"default:0"`
// status of the job run (running, failed or interrupted).
// @inject_tag: `gorm:"not_null"`
Status string `protobuf:"bytes,10,opt,name=status,proto3" json:"status,omitempty" gorm:"not_null"`
// The controller_id of the controller running the job and must be set.
// @inject_tag: `gorm:"not_null"`
ControllerId string `protobuf:"bytes,11,opt,name=controller_id,json=controllerId,proto3" json:"controller_id,omitempty" gorm:"not_null"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *JobRun) Reset() {
*x = JobRun{}
mi := &file_controller_storage_job_store_v1_job_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *JobRun) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*JobRun) ProtoMessage() {}
func (x *JobRun) ProtoReflect() protoreflect.Message {
mi := &file_controller_storage_job_store_v1_job_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 JobRun.ProtoReflect.Descriptor instead.
func (*JobRun) Descriptor() ([]byte, []int) {
return file_controller_storage_job_store_v1_job_proto_rawDescGZIP(), []int{1}
}
func (x *JobRun) GetPrivateId() string {
if x != nil {
return x.PrivateId
}
return ""
}
func (x *JobRun) GetJobPluginId() string {
if x != nil {
return x.JobPluginId
}
return ""
}
func (x *JobRun) GetJobName() string {
if x != nil {
return x.JobName
}
return ""
}
func (x *JobRun) GetCreateTime() *timestamp.Timestamp {
if x != nil {
return x.CreateTime
}
return nil
}
func (x *JobRun) GetUpdateTime() *timestamp.Timestamp {
if x != nil {
return x.UpdateTime
}
return nil
}
func (x *JobRun) GetEndTime() *timestamp.Timestamp {
if x != nil {
return x.EndTime
}
return nil
}
func (x *JobRun) GetCompletedCount() uint32 {
if x != nil {
return x.CompletedCount
}
return 0
}
func (x *JobRun) GetTotalCount() uint32 {
if x != nil {
return x.TotalCount
}
return 0
}
func (x *JobRun) GetRetriesCount() uint32 {
if x != nil {
return x.RetriesCount
}
return 0
}
func (x *JobRun) GetStatus() string {
if x != nil {
return x.Status
}
return ""
}
func (x *JobRun) GetControllerId() string {
if x != nil {
return x.ControllerId
}
return ""
}
var File_controller_storage_job_store_v1_job_proto protoreflect.FileDescriptor
const file_controller_storage_job_store_v1_job_proto_rawDesc = "" +
"\n" +
")controller/storage/job/store/v1/job.proto\x12\x1fcontroller.storage.job.store.v1\x1a/controller/storage/timestamp/v1/timestamp.proto\"\xb2\x01\n" +
"\x03Job\x12\x1b\n" +
"\tplugin_id\x18\x01 \x01(\tR\bpluginId\x12\x12\n" +
"\x04name\x18\x02 \x01(\tR\x04name\x12 \n" +
"\vdescription\x18\x03 \x01(\tR\vdescription\x12X\n" +
"\x12next_scheduled_run\x18\x04 \x01(\v2*.controller.storage.timestamp.v1.TimestampR\x10nextScheduledRun\"\xfe\x03\n" +
"\x06JobRun\x12\x1d\n" +
"\n" +
"private_id\x18\x01 \x01(\tR\tprivateId\x12\"\n" +
"\rjob_plugin_id\x18\x02 \x01(\tR\vjobPluginId\x12\x19\n" +
"\bjob_name\x18\x03 \x01(\tR\ajobName\x12K\n" +
"\vcreate_time\x18\x05 \x01(\v2*.controller.storage.timestamp.v1.TimestampR\n" +
"createTime\x12K\n" +
"\vupdate_time\x18\x06 \x01(\v2*.controller.storage.timestamp.v1.TimestampR\n" +
"updateTime\x12E\n" +
"\bend_time\x18\a \x01(\v2*.controller.storage.timestamp.v1.TimestampR\aendTime\x12'\n" +
"\x0fcompleted_count\x18\b \x01(\rR\x0ecompletedCount\x12\x1f\n" +
"\vtotal_count\x18\t \x01(\rR\n" +
"totalCount\x12#\n" +
"\rretries_count\x18\f \x01(\rR\fretriesCount\x12\x16\n" +
"\x06status\x18\n" +
" \x01(\tR\x06status\x12#\n" +
"\rcontroller_id\x18\v \x01(\tR\fcontrollerIdR\tserver_idBBZ@github.com/hashicorp/boundary/internal/scheduler/job/store;storeb\x06proto3"
var (
file_controller_storage_job_store_v1_job_proto_rawDescOnce sync.Once
file_controller_storage_job_store_v1_job_proto_rawDescData []byte
)
func file_controller_storage_job_store_v1_job_proto_rawDescGZIP() []byte {
file_controller_storage_job_store_v1_job_proto_rawDescOnce.Do(func() {
file_controller_storage_job_store_v1_job_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_controller_storage_job_store_v1_job_proto_rawDesc), len(file_controller_storage_job_store_v1_job_proto_rawDesc)))
})
return file_controller_storage_job_store_v1_job_proto_rawDescData
}
var file_controller_storage_job_store_v1_job_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_controller_storage_job_store_v1_job_proto_goTypes = []any{
(*Job)(nil), // 0: controller.storage.job.store.v1.Job
(*JobRun)(nil), // 1: controller.storage.job.store.v1.JobRun
(*timestamp.Timestamp)(nil), // 2: controller.storage.timestamp.v1.Timestamp
}
var file_controller_storage_job_store_v1_job_proto_depIdxs = []int32{
2, // 0: controller.storage.job.store.v1.Job.next_scheduled_run:type_name -> controller.storage.timestamp.v1.Timestamp
2, // 1: controller.storage.job.store.v1.JobRun.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
2, // 2: controller.storage.job.store.v1.JobRun.update_time:type_name -> controller.storage.timestamp.v1.Timestamp
2, // 3: controller.storage.job.store.v1.JobRun.end_time:type_name -> controller.storage.timestamp.v1.Timestamp
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_controller_storage_job_store_v1_job_proto_init() }
func file_controller_storage_job_store_v1_job_proto_init() {
if File_controller_storage_job_store_v1_job_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_job_store_v1_job_proto_rawDesc), len(file_controller_storage_job_store_v1_job_proto_rawDesc)),
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_controller_storage_job_store_v1_job_proto_goTypes,
DependencyIndexes: file_controller_storage_job_store_v1_job_proto_depIdxs,
MessageInfos: file_controller_storage_job_store_v1_job_proto_msgTypes,
}.Build()
File_controller_storage_job_store_v1_job_proto = out.File
file_controller_storage_job_store_v1_job_proto_goTypes = nil
file_controller_storage_job_store_v1_job_proto_depIdxs = nil
}