-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.go
More file actions
33 lines (25 loc) · 815 Bytes
/
Copy pathexample.go
File metadata and controls
33 lines (25 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright 2022 NotOne Lv <aiphalv0010@gmail.com>. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package main
import (
"log"
"github.com/notone0010/pigpig/internal/pigpig/dudu"
"github.com/notone0010/pigpig/internal/pkg/plugins"
)
type example struct{}
// NewPlugin for plugins example.
func NewPlugin() plugins.PigPigPlugins {
return &example{}
}
// ModifyRequest for plugins example.
func (e example) ModifyRequest(r *dudu.RequestDetail) {
log.Printf("modify request")
}
// ModifyResponse for plugins example.
func (e example) ModifyResponse(r *dudu.RequestDetail, resp *dudu.ResponseDetail) {
log.Println("modify response")
}
// ModifyError ...
func (e example) ModifyError(c *dudu.RequestDetail, errors []error) {
}