forked from TykTechnologies/tyk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ctx: inject API definition when using Go plugins (TykTechnologies#2624)
This is a potential solution for allowing API definition access from Go plugins: ```go package main import ( "fmt" "net/http" "github.com/TykTechnologies/tyk/ctx" ) func main() {} func MyCustomPlugin(w http.ResponseWriter, r *http.Request) { fmt.Println("MyCustomPlugin is called") apidef := ctx.GetDefinition(r) fmt.Println("apidef=", apidef) } ```
- Loading branch information
1 parent
afb45a8
commit 861856e
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters