src

package
v0.5.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommitMessageService_GenerateCommitMessage_FullMethodName = "/commit_message.CommitMessageService/GenerateCommitMessage"
)
View Source
const (
	SeparateCommitService_GenerateMultipleCommitMessage_FullMethodName = "/separate_commit.SeparateCommitService/GenerateMultipleCommitMessage"
)

Variables

View Source
var (
	CodeFormatType_name = map[int32]string{
		0: "UNKNOWN_FORMAT",
		1: "NORMAL",
		2: "PREFIX",
		3: "EMOJI",
	}
	CodeFormatType_value = map[string]int32{
		"UNKNOWN_FORMAT": 0,
		"NORMAL":         1,
		"PREFIX":         2,
		"EMOJI":          3,
	}
)

Enum value maps for CodeFormatType.

View Source
var (
	LanguageType_name = map[int32]string{
		0: "UNKNOWN_LANGUAGE",
		1: "ENGLISH",
		2: "JAPANESE",
	}
	LanguageType_value = map[string]int32{
		"UNKNOWN_LANGUAGE": 0,
		"ENGLISH":          1,
		"JAPANESE":         2,
	}
)

Enum value maps for LanguageType.

View Source
var (
	ChangeType_name = map[int32]string{
		0: "UNKNOWN_CHANGE",
		1: "CREATE",
		2: "UPDATE",
		3: "DELETE",
	}
	ChangeType_value = map[string]int32{
		"UNKNOWN_CHANGE": 0,
		"CREATE":         1,
		"UPDATE":         2,
		"DELETE":         3,
	}
)

Enum value maps for ChangeType.

View Source
var CommitMessageService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "commit_message.CommitMessageService",
	HandlerType: (*CommitMessageServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GenerateCommitMessage",
			Handler:    _CommitMessageService_GenerateCommitMessage_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "commit_message_service.proto",
}

CommitMessageService_ServiceDesc is the grpc.ServiceDesc for CommitMessageService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_code_type_proto protoreflect.FileDescriptor
View Source
var File_commit_message_service_proto protoreflect.FileDescriptor
View Source
var File_separate_commit_service_proto protoreflect.FileDescriptor
View Source
var SeparateCommitService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "separate_commit.SeparateCommitService",
	HandlerType: (*SeparateCommitServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GenerateMultipleCommitMessage",
			Handler:    _SeparateCommitService_GenerateMultipleCommitMessage_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "separate_commit_service.proto",
}

SeparateCommitService_ServiceDesc is the grpc.ServiceDesc for SeparateCommitService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterCommitMessageServiceServer

func RegisterCommitMessageServiceServer(s grpc.ServiceRegistrar, srv CommitMessageServiceServer)

func RegisterSeparateCommitServiceServer

func RegisterSeparateCommitServiceServer(s grpc.ServiceRegistrar, srv SeparateCommitServiceServer)

Types

type ChangeType

type ChangeType int32

ChangeType specifies the type of

const (
	ChangeType_UNKNOWN_CHANGE ChangeType = 0
	ChangeType_CREATE         ChangeType = 1
	ChangeType_UPDATE         ChangeType = 2
	ChangeType_DELETE         ChangeType = 3
)

func (ChangeType) Descriptor

func (ChangeType) Descriptor() protoreflect.EnumDescriptor

func (ChangeType) Enum

func (x ChangeType) Enum() *ChangeType

func (ChangeType) EnumDescriptor deprecated

func (ChangeType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ChangeType.Descriptor instead.

func (ChangeType) Number

func (x ChangeType) Number() protoreflect.EnumNumber

func (ChangeType) String

func (x ChangeType) String() string

func (ChangeType) Type

type CodeDiff

type CodeDiff struct {
	Added   []*LineDiff `protobuf:"bytes,1,rep,name=added,proto3" json:"added,omitempty"`
	Deleted []*LineDiff `protobuf:"bytes,2,rep,name=deleted,proto3" json:"deleted,omitempty"`
	// contains filtered or unexported fields
}

func (*CodeDiff) Descriptor deprecated

func (*CodeDiff) Descriptor() ([]byte, []int)

Deprecated: Use CodeDiff.ProtoReflect.Descriptor instead.

func (*CodeDiff) GetAdded

func (x *CodeDiff) GetAdded() []*LineDiff

func (*CodeDiff) GetDeleted

func (x *CodeDiff) GetDeleted() []*LineDiff

func (*CodeDiff) ProtoMessage

func (*CodeDiff) ProtoMessage()

func (*CodeDiff) ProtoReflect

func (x *CodeDiff) ProtoReflect() protoreflect.Message

func (*CodeDiff) Reset

func (x *CodeDiff) Reset()

func (*CodeDiff) String

func (x *CodeDiff) String() string

type CodeFormatType

type CodeFormatType int32

CodeFormatType specifies the type of commit message to generate

const (
	CodeFormatType_UNKNOWN_FORMAT CodeFormatType = 0
	CodeFormatType_NORMAL         CodeFormatType = 1
	CodeFormatType_PREFIX         CodeFormatType = 2
	CodeFormatType_EMOJI          CodeFormatType = 3
)

func (CodeFormatType) Descriptor

func (CodeFormatType) Enum

func (x CodeFormatType) Enum() *CodeFormatType

func (CodeFormatType) EnumDescriptor deprecated

func (CodeFormatType) EnumDescriptor() ([]byte, []int)

Deprecated: Use CodeFormatType.Descriptor instead.

func (CodeFormatType) Number

func (CodeFormatType) String

func (x CodeFormatType) String() string

func (CodeFormatType) Type

type CommitMessageRequest

type CommitMessageRequest struct {
	InputCode  string         `protobuf:"bytes,1,opt,name=inputCode,proto3" json:"inputCode,omitempty"`
	CodeFormat CodeFormatType `protobuf:"varint,2,opt,name=codeFormat,proto3,enum=code_type.CodeFormatType" json:"codeFormat,omitempty"`
	Language   LanguageType   `protobuf:"varint,3,opt,name=language,proto3,enum=code_type.LanguageType" json:"language,omitempty"`
	// contains filtered or unexported fields
}

CommitMessageRequest is the request format for generating messages

func (*CommitMessageRequest) Descriptor deprecated

func (*CommitMessageRequest) Descriptor() ([]byte, []int)

Deprecated: Use CommitMessageRequest.ProtoReflect.Descriptor instead.

func (*CommitMessageRequest) GetCodeFormat

func (x *CommitMessageRequest) GetCodeFormat() CodeFormatType

func (*CommitMessageRequest) GetInputCode

func (x *CommitMessageRequest) GetInputCode() string

func (*CommitMessageRequest) GetLanguage

func (x *CommitMessageRequest) GetLanguage() LanguageType

func (*CommitMessageRequest) ProtoMessage

func (*CommitMessageRequest) ProtoMessage()

func (*CommitMessageRequest) ProtoReflect

func (x *CommitMessageRequest) ProtoReflect() protoreflect.Message

func (*CommitMessageRequest) Reset

func (x *CommitMessageRequest) Reset()

func (*CommitMessageRequest) String

func (x *CommitMessageRequest) String() string

type CommitMessageResponse

type CommitMessageResponse struct {
	Messages []string `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
	// contains filtered or unexported fields
}

CommitMessageResponse returns generated commit messages

func (*CommitMessageResponse) Descriptor deprecated

func (*CommitMessageResponse) Descriptor() ([]byte, []int)

Deprecated: Use CommitMessageResponse.ProtoReflect.Descriptor instead.

func (*CommitMessageResponse) GetMessages

func (x *CommitMessageResponse) GetMessages() []string

func (*CommitMessageResponse) ProtoMessage

func (*CommitMessageResponse) ProtoMessage()

func (*CommitMessageResponse) ProtoReflect

func (x *CommitMessageResponse) ProtoReflect() protoreflect.Message

func (*CommitMessageResponse) Reset

func (x *CommitMessageResponse) Reset()

func (*CommitMessageResponse) String

func (x *CommitMessageResponse) String() string

type CommitMessageServiceClient

type CommitMessageServiceClient interface {
	GenerateCommitMessage(ctx context.Context, in *CommitMessageRequest, opts ...grpc.CallOption) (*CommitMessageResponse, error)
}

CommitMessageServiceClient is the client API for CommitMessageService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type CommitMessageServiceServer

type CommitMessageServiceServer interface {
	GenerateCommitMessage(context.Context, *CommitMessageRequest) (*CommitMessageResponse, error)
	// contains filtered or unexported methods
}

CommitMessageServiceServer is the server API for CommitMessageService service. All implementations must embed UnimplementedCommitMessageServiceServer for forward compatibility

type FileChange

type FileChange struct {
	CodeDiff   *CodeDiff  `protobuf:"bytes,1,opt,name=codeDiff,proto3" json:"codeDiff,omitempty"`
	Filename   string     `protobuf:"bytes,2,opt,name=filename,proto3" json:"filename,omitempty"`
	ChangeType ChangeType `protobuf:"varint,3,opt,name=changeType,proto3,enum=separate_commit.ChangeType" json:"changeType,omitempty"`
	// contains filtered or unexported fields
}

func (*FileChange) Descriptor deprecated

func (*FileChange) Descriptor() ([]byte, []int)

Deprecated: Use FileChange.ProtoReflect.Descriptor instead.

func (*FileChange) GetChangeType

func (x *FileChange) GetChangeType() ChangeType

func (*FileChange) GetCodeDiff

func (x *FileChange) GetCodeDiff() *CodeDiff

func (*FileChange) GetFilename

func (x *FileChange) GetFilename() string

func (*FileChange) ProtoMessage

func (*FileChange) ProtoMessage()

func (*FileChange) ProtoReflect

func (x *FileChange) ProtoReflect() protoreflect.Message

func (*FileChange) Reset

func (x *FileChange) Reset()

func (*FileChange) String

func (x *FileChange) String() string

type LanguageType

type LanguageType int32

LanguageType specifies the language of the commit message to generate

const (
	LanguageType_UNKNOWN_LANGUAGE LanguageType = 0
	LanguageType_ENGLISH          LanguageType = 1
	LanguageType_JAPANESE         LanguageType = 2
)

func (LanguageType) Descriptor

func (LanguageType) Enum

func (x LanguageType) Enum() *LanguageType

func (LanguageType) EnumDescriptor deprecated

func (LanguageType) EnumDescriptor() ([]byte, []int)

Deprecated: Use LanguageType.Descriptor instead.

func (LanguageType) Number

func (LanguageType) String

func (x LanguageType) String() string

func (LanguageType) Type

type LineDiff

type LineDiff struct {
	Index int32  `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	Line  string `protobuf:"bytes,2,opt,name=line,proto3" json:"line,omitempty"`
	// contains filtered or unexported fields
}

func (*LineDiff) Descriptor deprecated

func (*LineDiff) Descriptor() ([]byte, []int)

Deprecated: Use LineDiff.ProtoReflect.Descriptor instead.

func (*LineDiff) GetIndex

func (x *LineDiff) GetIndex() int32

func (*LineDiff) GetLine

func (x *LineDiff) GetLine() string

func (*LineDiff) ProtoMessage

func (*LineDiff) ProtoMessage()

func (*LineDiff) ProtoReflect

func (x *LineDiff) ProtoReflect() protoreflect.Message

func (*LineDiff) Reset

func (x *LineDiff) Reset()

func (*LineDiff) String

func (x *LineDiff) String() string

type SeparateCommitRequest

type SeparateCommitRequest struct {
	FileChanges []*FileChange  `protobuf:"bytes,1,rep,name=fileChanges,proto3" json:"fileChanges,omitempty"`
	CodeFormat  CodeFormatType `protobuf:"varint,2,opt,name=codeFormat,proto3,enum=code_type.CodeFormatType" json:"codeFormat,omitempty"`
	Language    LanguageType   `protobuf:"varint,3,opt,name=language,proto3,enum=code_type.LanguageType" json:"language,omitempty"`
	// contains filtered or unexported fields
}

SeparateCommitRequest is the request format for generating messages

func (*SeparateCommitRequest) Descriptor deprecated

func (*SeparateCommitRequest) Descriptor() ([]byte, []int)

Deprecated: Use SeparateCommitRequest.ProtoReflect.Descriptor instead.

func (*SeparateCommitRequest) GetCodeFormat

func (x *SeparateCommitRequest) GetCodeFormat() CodeFormatType

func (*SeparateCommitRequest) GetFileChanges

func (x *SeparateCommitRequest) GetFileChanges() []*FileChange

func (*SeparateCommitRequest) GetLanguage

func (x *SeparateCommitRequest) GetLanguage() LanguageType

func (*SeparateCommitRequest) ProtoMessage

func (*SeparateCommitRequest) ProtoMessage()

func (*SeparateCommitRequest) ProtoReflect

func (x *SeparateCommitRequest) ProtoReflect() protoreflect.Message

func (*SeparateCommitRequest) Reset

func (x *SeparateCommitRequest) Reset()

func (*SeparateCommitRequest) String

func (x *SeparateCommitRequest) String() string

type SeparateCommitResponse

type SeparateCommitResponse struct {
	SeparatedCommits []*SeparatedCommitMessages `protobuf:"bytes,1,rep,name=separatedCommits,proto3" json:"separatedCommits,omitempty"`
	// contains filtered or unexported fields
}

SeparateCommitResponse returns generated and separated commit messages

func (*SeparateCommitResponse) Descriptor deprecated

func (*SeparateCommitResponse) Descriptor() ([]byte, []int)

Deprecated: Use SeparateCommitResponse.ProtoReflect.Descriptor instead.

func (*SeparateCommitResponse) GetSeparatedCommits

func (x *SeparateCommitResponse) GetSeparatedCommits() []*SeparatedCommitMessages

func (*SeparateCommitResponse) ProtoMessage

func (*SeparateCommitResponse) ProtoMessage()

func (*SeparateCommitResponse) ProtoReflect

func (x *SeparateCommitResponse) ProtoReflect() protoreflect.Message

func (*SeparateCommitResponse) Reset

func (x *SeparateCommitResponse) Reset()

func (*SeparateCommitResponse) String

func (x *SeparateCommitResponse) String() string

type SeparateCommitServiceClient

type SeparateCommitServiceClient interface {
	GenerateMultipleCommitMessage(ctx context.Context, in *SeparateCommitRequest, opts ...grpc.CallOption) (*SeparateCommitResponse, error)
}

SeparateCommitServiceClient is the client API for SeparateCommitService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type SeparateCommitServiceServer

type SeparateCommitServiceServer interface {
	GenerateMultipleCommitMessage(context.Context, *SeparateCommitRequest) (*SeparateCommitResponse, error)
	// contains filtered or unexported methods
}

SeparateCommitServiceServer is the server API for SeparateCommitService service. All implementations must embed UnimplementedSeparateCommitServiceServer for forward compatibility

type SeparatedCommitMessages

type SeparatedCommitMessages struct {
	Messages   []string   `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
	Filename   string     `protobuf:"bytes,2,opt,name=filename,proto3" json:"filename,omitempty"`
	ChangeType ChangeType `protobuf:"varint,3,opt,name=changeType,proto3,enum=separate_commit.ChangeType" json:"changeType,omitempty"`
	// contains filtered or unexported fields
}

func (*SeparatedCommitMessages) Descriptor deprecated

func (*SeparatedCommitMessages) Descriptor() ([]byte, []int)

Deprecated: Use SeparatedCommitMessages.ProtoReflect.Descriptor instead.

func (*SeparatedCommitMessages) GetChangeType

func (x *SeparatedCommitMessages) GetChangeType() ChangeType

func (*SeparatedCommitMessages) GetFilename

func (x *SeparatedCommitMessages) GetFilename() string

func (*SeparatedCommitMessages) GetMessages

func (x *SeparatedCommitMessages) GetMessages() []string

func (*SeparatedCommitMessages) ProtoMessage

func (*SeparatedCommitMessages) ProtoMessage()

func (*SeparatedCommitMessages) ProtoReflect

func (x *SeparatedCommitMessages) ProtoReflect() protoreflect.Message

func (*SeparatedCommitMessages) Reset

func (x *SeparatedCommitMessages) Reset()

func (*SeparatedCommitMessages) String

func (x *SeparatedCommitMessages) String() string

type UnimplementedCommitMessageServiceServer

type UnimplementedCommitMessageServiceServer struct {
}

UnimplementedCommitMessageServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCommitMessageServiceServer) GenerateCommitMessage

type UnimplementedSeparateCommitServiceServer

type UnimplementedSeparateCommitServiceServer struct {
}

UnimplementedSeparateCommitServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedSeparateCommitServiceServer) GenerateMultipleCommitMessage

type UnsafeCommitMessageServiceServer

type UnsafeCommitMessageServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeCommitMessageServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CommitMessageServiceServer will result in compilation errors.

type UnsafeSeparateCommitServiceServer

type UnsafeSeparateCommitServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeSeparateCommitServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SeparateCommitServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL