make test

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-11-29 09:14:30 -06:00
parent f145e6e74e
commit 1c0234a442
7 changed files with 470 additions and 177 deletions

View File

@ -2,7 +2,7 @@ VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d)
run: clean build
make -C testSort/
make -C testautogen/
vet:
@GO111MODULE=off go vet
@ -30,4 +30,4 @@ reset:
reset
clean:
-rm test.sort.pb.go autogenpb
-rm autogenpb

174
autogen/gitTags.pb.go Normal file
View File

@ -0,0 +1,174 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.35.2-devel
// protoc v3.21.12
// source: gitTags.proto
package autogen
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
)
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 GitTag struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Refname string `protobuf:"bytes,1,opt,name=refname,proto3" json:"refname,omitempty"` // tag name. treated as unique
Creatordate *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=creatordate,proto3" json:"creatordate,omitempty"` // git creatordate
Authordate *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=authordate,proto3" json:"authordate,omitempty"` // git creatordate
Objectname string `protobuf:"bytes,4,opt,name=objectname,proto3" json:"objectname,omitempty"` // git hash
Subject string `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"` // git tag subject
}
func (x *GitTag) Reset() {
*x = GitTag{}
mi := &file_gitTags_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GitTag) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GitTag) ProtoMessage() {}
func (x *GitTag) ProtoReflect() protoreflect.Message {
mi := &file_gitTags_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 GitTag.ProtoReflect.Descriptor instead.
func (*GitTag) Descriptor() ([]byte, []int) {
return file_gitTags_proto_rawDescGZIP(), []int{0}
}
func (x *GitTag) GetRefname() string {
if x != nil {
return x.Refname
}
return ""
}
func (x *GitTag) GetCreatordate() *timestamppb.Timestamp {
if x != nil {
return x.Creatordate
}
return nil
}
func (x *GitTag) GetAuthordate() *timestamppb.Timestamp {
if x != nil {
return x.Authordate
}
return nil
}
func (x *GitTag) GetObjectname() string {
if x != nil {
return x.Objectname
}
return ""
}
func (x *GitTag) GetSubject() string {
if x != nil {
return x.Subject
}
return ""
}
var File_gitTags_proto protoreflect.FileDescriptor
var file_gitTags_proto_rawDesc = []byte{
0x0a, 0x0d, 0x67, 0x69, 0x74, 0x54, 0x61, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x05, 0x67, 0x69, 0x74, 0x70, 0x62, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd6, 0x01, 0x0a, 0x06, 0x47, 0x69, 0x74, 0x54,
0x61, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x66, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x66, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x0b,
0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x64, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x63,
0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x64, 0x61, 0x74, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x61, 0x75,
0x74, 0x68, 0x6f, 0x72, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x61, 0x75, 0x74, 0x68,
0x6f, 0x72, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65,
0x63, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63,
0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_gitTags_proto_rawDescOnce sync.Once
file_gitTags_proto_rawDescData = file_gitTags_proto_rawDesc
)
func file_gitTags_proto_rawDescGZIP() []byte {
file_gitTags_proto_rawDescOnce.Do(func() {
file_gitTags_proto_rawDescData = protoimpl.X.CompressGZIP(file_gitTags_proto_rawDescData)
})
return file_gitTags_proto_rawDescData
}
var file_gitTags_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_gitTags_proto_goTypes = []any{
(*GitTag)(nil), // 0: gitpb.GitTag
(*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp
}
var file_gitTags_proto_depIdxs = []int32{
1, // 0: gitpb.GitTag.creatordate:type_name -> google.protobuf.Timestamp
1, // 1: gitpb.GitTag.authordate:type_name -> google.protobuf.Timestamp
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_gitTags_proto_init() }
func file_gitTags_proto_init() {
if File_gitTags_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_gitTags_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_gitTags_proto_goTypes,
DependencyIndexes: file_gitTags_proto_depIdxs,
MessageInfos: file_gitTags_proto_msgTypes,
}.Build()
File_gitTags_proto = out.File
file_gitTags_proto_rawDesc = nil
file_gitTags_proto_goTypes = nil
file_gitTags_proto_depIdxs = nil
}

View File

@ -8,9 +8,9 @@ import (
func main() {
f, _ := os.OpenFile("test.sort.pb.go", os.O_WRONLY|os.O_CREATE, 0600)
header(f, "main")
syncLock(f, "godeplock")
iterTop(f, "GoDep")
header(f, "testautogen")
syncLock(f, "gitTagslock")
iterTop(f, "GitTag")
}
func header(w io.Writer, name string) {

View File

@ -1,172 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.35.2-devel
// protoc v3.21.12
// source: test.proto
// store go dependancies
package main
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
)
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 GoDep struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // md5sum/hash value from the go.sum file
Ctime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=ctime,proto3" json:"ctime,omitempty"` // get the go date from 'go list' ?
Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` // v1.2.2
GoPath string `protobuf:"bytes,4,opt,name=goPath,proto3" json:"goPath,omitempty"` // "go.wit.com/lib/foo"
GoVersion string `protobuf:"bytes,5,opt,name=goVersion,proto3" json:"goVersion,omitempty"` // version of golang the developer used to make this package version
}
func (x *GoDep) Reset() {
*x = GoDep{}
mi := &file_test_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GoDep) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GoDep) ProtoMessage() {}
func (x *GoDep) ProtoReflect() protoreflect.Message {
mi := &file_test_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 GoDep.ProtoReflect.Descriptor instead.
func (*GoDep) Descriptor() ([]byte, []int) {
return file_test_proto_rawDescGZIP(), []int{0}
}
func (x *GoDep) GetHash() string {
if x != nil {
return x.Hash
}
return ""
}
func (x *GoDep) GetCtime() *timestamppb.Timestamp {
if x != nil {
return x.Ctime
}
return nil
}
func (x *GoDep) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
func (x *GoDep) GetGoPath() string {
if x != nil {
return x.GoPath
}
return ""
}
func (x *GoDep) GetGoVersion() string {
if x != nil {
return x.GoVersion
}
return ""
}
var File_test_proto protoreflect.FileDescriptor
var file_test_proto_rawDesc = []byte{
0x0a, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x6d, 0x61,
0x69, 0x6e, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x01, 0x0a, 0x05, 0x47, 0x6f, 0x44, 0x65, 0x70, 0x12, 0x12, 0x0a,
0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73,
0x68, 0x12, 0x30, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x63, 0x74,
0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a,
0x06, 0x67, 0x6f, 0x50, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x67,
0x6f, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x6f, 0x56, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x6f, 0x56, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_test_proto_rawDescOnce sync.Once
file_test_proto_rawDescData = file_test_proto_rawDesc
)
func file_test_proto_rawDescGZIP() []byte {
file_test_proto_rawDescOnce.Do(func() {
file_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_test_proto_rawDescData)
})
return file_test_proto_rawDescData
}
var file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_test_proto_goTypes = []any{
(*GoDep)(nil), // 0: main.GoDep
(*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp
}
var file_test_proto_depIdxs = []int32{
1, // 0: main.GoDep.ctime:type_name -> google.protobuf.Timestamp
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_test_proto_init() }
func file_test_proto_init() {
if File_test_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_test_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_test_proto_goTypes,
DependencyIndexes: file_test_proto_depIdxs,
MessageInfos: file_test_proto_msgTypes,
}.Build()
File_test_proto = out.File
file_test_proto_rawDesc = nil
file_test_proto_goTypes = nil
file_test_proto_depIdxs = nil
}

28
testautogen/Makefile Normal file
View File

@ -0,0 +1,28 @@
VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d)
run: clean test.pb.go goimports vet
vet:
@GO111MODULE=off go vet
@echo this go library package builds okay
goimports:
goimports -w *.go
redomod:
rm -f go.*
GO111MODULE= go mod init
GO111MODULE= go mod tidy
reset:
# clear your terminal
reset
clean:
-rm -f *.pb.go
test.pb.go: test.proto
cd ~/go/src && protoc --go_out=. --proto_path=go.wit.com/apps/autogenpb/testautogen \
--go_opt=Mtest.proto=go.wit.com/apps/autogenpb/testautogen \
test.proto

244
testautogen/test.pb.go Normal file
View File

@ -0,0 +1,244 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.35.2-devel
// protoc v3.21.12
// source: test.proto
package testautogen
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
)
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 GitTag struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Refname string `protobuf:"bytes,1,opt,name=refname,proto3" json:"refname,omitempty"` // tag name. treated as unique
Creatordate *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=creatordate,proto3" json:"creatordate,omitempty"` // git creatordate
Authordate *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=authordate,proto3" json:"authordate,omitempty"` // git creatordate
Objectname string `protobuf:"bytes,4,opt,name=objectname,proto3" json:"objectname,omitempty"` // git hash
Subject string `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"` // git tag subject
}
func (x *GitTag) Reset() {
*x = GitTag{}
mi := &file_test_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GitTag) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GitTag) ProtoMessage() {}
func (x *GitTag) ProtoReflect() protoreflect.Message {
mi := &file_test_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 GitTag.ProtoReflect.Descriptor instead.
func (*GitTag) Descriptor() ([]byte, []int) {
return file_test_proto_rawDescGZIP(), []int{0}
}
func (x *GitTag) GetRefname() string {
if x != nil {
return x.Refname
}
return ""
}
func (x *GitTag) GetCreatordate() *timestamppb.Timestamp {
if x != nil {
return x.Creatordate
}
return nil
}
func (x *GitTag) GetAuthordate() *timestamppb.Timestamp {
if x != nil {
return x.Authordate
}
return nil
}
func (x *GitTag) GetObjectname() string {
if x != nil {
return x.Objectname
}
return ""
}
func (x *GitTag) GetSubject() string {
if x != nil {
return x.Subject
}
return ""
}
type GitTags struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // I guess why not just have this on each file
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // maybe can be used for protobuf schema change violations
GitTags []*GitTag `protobuf:"bytes,3,rep,name=gitTags,proto3" json:"gitTags,omitempty"`
}
func (x *GitTags) Reset() {
*x = GitTags{}
mi := &file_test_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GitTags) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GitTags) ProtoMessage() {}
func (x *GitTags) ProtoReflect() protoreflect.Message {
mi := &file_test_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 GitTags.ProtoReflect.Descriptor instead.
func (*GitTags) Descriptor() ([]byte, []int) {
return file_test_proto_rawDescGZIP(), []int{1}
}
func (x *GitTags) GetUuid() string {
if x != nil {
return x.Uuid
}
return ""
}
func (x *GitTags) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
func (x *GitTags) GetGitTags() []*GitTag {
if x != nil {
return x.GitTags
}
return nil
}
var File_test_proto protoreflect.FileDescriptor
var file_test_proto_rawDesc = []byte{
0x0a, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x67, 0x69,
0x74, 0x70, 0x62, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd6, 0x01, 0x0a, 0x06, 0x47, 0x69, 0x74, 0x54, 0x61, 0x67, 0x12,
0x18, 0x0a, 0x07, 0x72, 0x65, 0x66, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x07, 0x72, 0x65, 0x66, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x0b, 0x63, 0x72, 0x65,
0x61, 0x74, 0x6f, 0x72, 0x64, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61,
0x74, 0x6f, 0x72, 0x64, 0x61, 0x74, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f,
0x72, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x64,
0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6e, 0x61, 0x6d,
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6e,
0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x05,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x60, 0x0a,
0x07, 0x47, 0x69, 0x74, 0x54, 0x61, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07,
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x07, 0x67, 0x69, 0x74, 0x54, 0x61, 0x67,
0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x62, 0x2e,
0x47, 0x69, 0x74, 0x54, 0x61, 0x67, 0x52, 0x07, 0x67, 0x69, 0x74, 0x54, 0x61, 0x67, 0x73, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_test_proto_rawDescOnce sync.Once
file_test_proto_rawDescData = file_test_proto_rawDesc
)
func file_test_proto_rawDescGZIP() []byte {
file_test_proto_rawDescOnce.Do(func() {
file_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_test_proto_rawDescData)
})
return file_test_proto_rawDescData
}
var file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_test_proto_goTypes = []any{
(*GitTag)(nil), // 0: gitpb.GitTag
(*GitTags)(nil), // 1: gitpb.GitTags
(*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp
}
var file_test_proto_depIdxs = []int32{
2, // 0: gitpb.GitTag.creatordate:type_name -> google.protobuf.Timestamp
2, // 1: gitpb.GitTag.authordate:type_name -> google.protobuf.Timestamp
0, // 2: gitpb.GitTags.gitTags:type_name -> gitpb.GitTag
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_test_proto_init() }
func file_test_proto_init() {
if File_test_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_test_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_test_proto_goTypes,
DependencyIndexes: file_test_proto_depIdxs,
MessageInfos: file_test_proto_msgTypes,
}.Build()
File_test_proto = out.File
file_test_proto_rawDesc = nil
file_test_proto_goTypes = nil
file_test_proto_depIdxs = nil
}

19
testautogen/test.proto Normal file
View File

@ -0,0 +1,19 @@
syntax = "proto3";
package gitpb;
import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp
message GitTag {
string refname = 1; // tag name. treated as unique
google.protobuf.Timestamp creatordate = 2; // git creatordate
google.protobuf.Timestamp authordate = 3; // git creatordate
string objectname = 4; // git hash
string subject = 5; // git tag subject
}
message GitTags {
string uuid = 1; // I guess why not just have this on each file
string version = 2; // maybe can be used for protobuf schema change violations
repeated GitTag gitTags = 3;
}