plugin rename zltx -> ZLTX

This commit is contained in:
李子铭 2024-07-18 11:29:44 +08:00
parent 2e867e2a7d
commit a30bae8f66
3 changed files with 6 additions and 6 deletions

View File

@ -23,9 +23,9 @@ const (
queryMethod = "/recharge/query"
)
type ZltxService struct{}
type ZLTXService struct{}
func (p *ZltxService) Order(ctx context.Context, request *proto.OrderRequest) (*proto.OrderResponse, error) {
func (p *ZLTXService) Order(ctx context.Context, request *proto.OrderRequest) (*proto.OrderResponse, error) {
c, err := transConfig(request.Config)
if err != nil {
return nil, err
@ -49,7 +49,7 @@ func (p *ZltxService) Order(ctx context.Context, request *proto.OrderRequest) (*
return orderResp(request, response), nil
}
func (p *ZltxService) Query(ctx context.Context, request *proto.QueryRequest) (*proto.QueryResponse, error) {
func (p *ZLTXService) Query(ctx context.Context, request *proto.QueryRequest) (*proto.QueryResponse, error) {
c, err := transConfig(request.Config)
if err != nil {
return nil, err
@ -72,7 +72,7 @@ func (p *ZltxService) Query(ctx context.Context, request *proto.QueryRequest) (*
return queryResp(request, response), nil
}
func (p *ZltxService) Notify(_ context.Context, request *proto.NotifyRequest) (*proto.NotifyResponse, error) {
func (p *ZLTXService) Notify(_ context.Context, request *proto.NotifyRequest) (*proto.NotifyResponse, error) {
c, err := transConfig(request.Config)
if err != nil {
return nil, err

View File

@ -9,7 +9,7 @@ import (
"testing"
)
var zltx = &ZltxService{}
var zltx = &ZLTXService{}
func config() []byte {
c := &Config{

View File

@ -9,7 +9,7 @@ import (
func main() {
plugin.Serve(&plugin.ServeConfig{
HandshakeConfig: shared.HandshakeConfig(internal.Version, internal.CookieKey, internal.CookieValue),
Plugins: shared.PluginSet(shared.NewPlugin(&internal.ZltxService{}, internal.Tag)),
Plugins: shared.PluginSet(shared.NewPlugin(&internal.ZLTXService{}, internal.Tag)),
GRPCServer: plugin.DefaultGRPCServer,
})
}