完善docker配置文件

This commit is contained in:
flswld
2023-01-20 00:36:06 +08:00
parent cda96a81df
commit 32d57be1ce
15 changed files with 188 additions and 1461 deletions

View File

@@ -1,56 +0,0 @@
// Code generated by protoc-gen-natsrpc. DO NOT EDIT.
// versions:
// - protoc-gen-natsrpc v0.5.0
// source: api.proto
package api
import (
context "context"
fmt "fmt"
natsrpc "github.com/byebyebruce/natsrpc"
nats_go "github.com/nats-io/nats.go"
proto "google.golang.org/protobuf/proto"
)
var _ = new(context.Context)
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = natsrpc.Version
var _ = nats_go.Version
// GM 服务
type GMNATSRPCServer interface {
Cmd(ctx context.Context, req *CmdRequest) (*CmdReply, error)
}
// RegisterGMNATSRPCServer register GM service
func RegisterGMNATSRPCServer(server *natsrpc.Server, s GMNATSRPCServer, opts ...natsrpc.ServiceOption) (natsrpc.IService, error) {
return server.Register("hk4e.gs.api.GM", s, opts...)
}
// GM 服务
type GMNATSRPCClient interface {
Cmd(ctx context.Context, req *CmdRequest, opt ...natsrpc.CallOption) (*CmdReply, error)
}
type _GMNATSRPCClient struct {
c *natsrpc.Client
}
// NewGMNATSRPCClient
func NewGMNATSRPCClient(enc *nats_go.EncodedConn, opts ...natsrpc.ClientOption) (GMNATSRPCClient, error) {
c, err := natsrpc.NewClient(enc, "hk4e.gs.api.GM", opts...)
if err != nil {
return nil, err
}
ret := &_GMNATSRPCClient{
c: c,
}
return ret, nil
}
func (c *_GMNATSRPCClient) Cmd(ctx context.Context, req *CmdRequest, opt ...natsrpc.CallOption) (*CmdReply, error) {
rep := &CmdReply{}
err := c.c.Request(ctx, "Cmd", req, rep, opt...)
return rep, err
}

View File

@@ -1,228 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.7.0
// source: api.proto
package api
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
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 CmdRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
FuncName string `protobuf:"bytes,1,opt,name=func_name,json=funcName,proto3" json:"func_name,omitempty"`
Param []string `protobuf:"bytes,2,rep,name=param,proto3" json:"param,omitempty"`
}
func (x *CmdRequest) Reset() {
*x = CmdRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CmdRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CmdRequest) ProtoMessage() {}
func (x *CmdRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CmdRequest.ProtoReflect.Descriptor instead.
func (*CmdRequest) Descriptor() ([]byte, []int) {
return file_api_proto_rawDescGZIP(), []int{0}
}
func (x *CmdRequest) GetFuncName() string {
if x != nil {
return x.FuncName
}
return ""
}
func (x *CmdRequest) GetParam() []string {
if x != nil {
return x.Param
}
return nil
}
type CmdReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // 0 表示成功
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *CmdReply) Reset() {
*x = CmdReply{}
if protoimpl.UnsafeEnabled {
mi := &file_api_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CmdReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CmdReply) ProtoMessage() {}
func (x *CmdReply) ProtoReflect() protoreflect.Message {
mi := &file_api_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CmdReply.ProtoReflect.Descriptor instead.
func (*CmdReply) Descriptor() ([]byte, []int) {
return file_api_proto_rawDescGZIP(), []int{1}
}
func (x *CmdReply) GetCode() int32 {
if x != nil {
return x.Code
}
return 0
}
func (x *CmdReply) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
var File_api_proto protoreflect.FileDescriptor
var file_api_proto_rawDesc = []byte{
0x0a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x67, 0x73, 0x2e,
0x61, 0x70, 0x69, 0x22, 0x3f, 0x0a, 0x0a, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14,
0x0a, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x70,
0x61, 0x72, 0x61, 0x6d, 0x22, 0x38, 0x0a, 0x08, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79,
0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04,
0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x33,
0x0a, 0x02, 0x47, 0x4d, 0x12, 0x2d, 0x0a, 0x03, 0x43, 0x6d, 0x64, 0x12, 0x12, 0x2e, 0x67, 0x73,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x10, 0x2e, 0x67, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x70, 0x6c,
0x79, 0x22, 0x00, 0x42, 0x11, 0x5a, 0x0f, 0x68, 0x6b, 0x34, 0x65, 0x2f, 0x67, 0x73, 0x2f, 0x61,
0x70, 0x69, 0x3b, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_api_proto_rawDescOnce sync.Once
file_api_proto_rawDescData = file_api_proto_rawDesc
)
func file_api_proto_rawDescGZIP() []byte {
file_api_proto_rawDescOnce.Do(func() {
file_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_proto_rawDescData)
})
return file_api_proto_rawDescData
}
var file_api_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_api_proto_goTypes = []interface{}{
(*CmdRequest)(nil), // 0: gs.api.CmdRequest
(*CmdReply)(nil), // 1: gs.api.CmdReply
}
var file_api_proto_depIdxs = []int32{
0, // 0: gs.api.GM.Cmd:input_type -> gs.api.CmdRequest
1, // 1: gs.api.GM.Cmd:output_type -> gs.api.CmdReply
1, // [1:2] is the sub-list for method output_type
0, // [0:1] 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_api_proto_init() }
func file_api_proto_init() {
if File_api_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CmdRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CmdReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_api_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_api_proto_goTypes,
DependencyIndexes: file_api_proto_depIdxs,
MessageInfos: file_api_proto_msgTypes,
}.Build()
File_api_proto = out.File
file_api_proto_rawDesc = nil
file_api_proto_goTypes = nil
file_api_proto_depIdxs = nil
}