plugin rename zltx -> ZLTX
This commit is contained in:
parent
2e867e2a7d
commit
a30bae8f66
|
@ -23,9 +23,9 @@ const (
|
||||||
queryMethod = "/recharge/query"
|
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)
|
c, err := transConfig(request.Config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -49,7 +49,7 @@ func (p *ZltxService) Order(ctx context.Context, request *proto.OrderRequest) (*
|
||||||
return orderResp(request, response), nil
|
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)
|
c, err := transConfig(request.Config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -72,7 +72,7 @@ func (p *ZltxService) Query(ctx context.Context, request *proto.QueryRequest) (*
|
||||||
return queryResp(request, response), nil
|
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)
|
c, err := transConfig(request.Config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
var zltx = &ZltxService{}
|
var zltx = &ZLTXService{}
|
||||||
|
|
||||||
func config() []byte {
|
func config() []byte {
|
||||||
c := &Config{
|
c := &Config{
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
func main() {
|
func main() {
|
||||||
plugin.Serve(&plugin.ServeConfig{
|
plugin.Serve(&plugin.ServeConfig{
|
||||||
HandshakeConfig: shared.HandshakeConfig(internal.Version, internal.CookieKey, internal.CookieValue),
|
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,
|
GRPCServer: plugin.DefaultGRPCServer,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue