-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_mux.go
54 lines (47 loc) · 3.38 KB
/
setup_mux.go
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package ethProc
// Copyright (C) Philip Schlump, 2016-2018, 2023.
// MIT Licensed. See LICENSE.mit file.
// BSD Licensed. See LICENSE.bsd file.
import "github.com/gin-gonic/gin"
func SetupMux(router *gin.Engine) {
// // ----------------------------------------------------------------------------------------------------------------------------------------------
// // Key Management
// // ----------------------------------------------------------------------------------------------------------------------------------------------
// //api/key/privatekey/ send private key - generate a keyfile using privatekey - store with user.
// //api/key/keyfile/ send private key - generate a keyfile using privatekey - store with user.
// /*
// mux.Handle("/api/key/PrivateKey", http.HandlerFunc(HandlePrivateKey)).AuthRequired().DocTag("<h2>/api/key/PrivateKey").Method("GET", "POST").Inputs([]*ymux.MuxInput{
// {Name: "title", Required: true, Label: "Unique title for this key", MinLen: 1, Type: "s"},
// {Name: "username", Required: true, Label: "Username", MinLen: 1, Type: "s"},
// {Name: "password", Required: true, Label: "Password", MinLen: 1, Type: "s"},
// {Name: "public_key", Required: true, Label: "Public Key", MinLen: 1, Type: "s"},
// {Name: "private_key", Required: true, Label: "Private Key", MinLen: 1, Type: "s"},
// {Name: "network", Required: true, Label: "Network", MinLen: 1, Type: "s"},
// })
// mux.Handle("/api/key/KeyFile", http.HandlerFunc(HandleKeyFile)).AuthRequired().DocTag("<h2>/api/key/KeyFile").Method("GET", "POST").Inputs([]*ymux.MuxInput{
// {Name: "title", Required: true, Label: "Unique title for this key", MinLen: 1, Type: "s"},
// {Name: "username", Required: true, Label: "Username", MinLen: 1, Type: "s"},
// {Name: "password", Required: true, Label: "Password For Login", MinLen: 1, Type: "s"},
// {Name: "keyfile_password", Required: true, Label: "Password For Keyfile", MinLen: 1, Type: "s"},
// {Name: "account", Required: true, Label: "Account", MinLen: 1, Type: "s"},
// {Name: "json_keyfile", Required: true, Label: "JSON Data", MinLen: 1, Type: "s"},
// {Name: "network", Required: true, Label: "Network", MinLen: 1, Type: "s"},
// })
// mux.Handle("/api/key/DeleteKey", http.HandlerFunc(HandleDeleteKey)).AuthRequired().DocTag("<h2>/api/key/DeleteKey").Method("GET", "POST").Inputs([]*ymux.MuxInput{
// {Name: "title", Required: true, Label: "Unique title for this key", MinLen: 1, Type: "s"},
// {Name: "username", Required: true, Label: "Username", MinLen: 1, Type: "s"},
// {Name: "password", Required: true, Label: "Password", MinLen: 1, Type: "s"},
// })
// mux.Handle("/api/key/ValidateKey", http.HandlerFunc(HandleValidateKey)).AuthRequired().DocTag("<h2>/api/key/ValidateKey").Method("GET").Inputs([]*ymux.MuxInput{
// {Name: "title", Required: true, Label: "Unique title for this key", MinLen: 1, Type: "s"},
// {Name: "username", Required: true, Label: "Username", MinLen: 1, Type: "s"},
// {Name: "password", Required: true, Label: "Password", MinLen: 1, Type: "s"},
// {Name: "password_keyfile", Required: true, Label: "Password For Keyfile", MinLen: 1, Type: "s"},
// {Name: "account", Required: true, Label: "Account", MinLen: 1, Type: "s"},
// })
// */
// // router.POST("/api/v1/eth/PrivateKey", vv.Fx)
router.POST("/api/v1/SendTokens", SendTokensHandler)
}
func SendTokensHandler(c *gin.Context) {
}