Improving

This commit is contained in:
2021-11-28 19:08:32 -03:00
parent 984592b7fd
commit 3cc08c6bb9
6 changed files with 101 additions and 16 deletions
+1
View File
@@ -191,6 +191,7 @@ func Init() *API {
})
mux.HandleFunc("/some2", func(w http.ResponseWriter, r *http.Request) {
switch r.Method {
case "POST":
h_Dosome2(w, r)
default:
+90 -12
View File
@@ -1,21 +1,99 @@
types:
AStr:
name: AStr
fields:
Arrofpstr:
type: string
array: true
tags:
json:
key: json
name: arrofpstr
opts:
- omitempty
City:
type: string
Country:
type: string
HouseNumber:
type: int64
IsCondo:
type: bool
Recursive:
map: true
mapkey: string
mapval: AStr
Some:
type: crypto.Decrypter
SomeWeirdTest:
type: string
tags:
json:
key: json
name: SUPERCALIFRAGILISPEALIDOUX
opts: []
When:
type: time.Time
methods:
SomeAPI3:
desc: SomeAPI3
verb: PUT
SomeAPI:
name: SomeAPI
desc: SomeAPI
verb: POST
path: /someapi
perm: ASD
raw: false
reqtype:
typename: time.Time
ispointer: false
typename: AStr
ispointer: true
isarray: false
restype:
typename: string
ispointer: false
isarray: true
raw: false
namespace: ""
typename: AStr
ispointer: true
isarray: false
namespace: goapi
imports:
context: context
crypto: crypto
time: time
used_imports:
- time
used_imports_types:
crypto: crypto
time: time
used_imports_functions: {}
paths:
/someapi:
path: /someapi
map_verbs:
POST:
verb: POST
method:
name: SomeAPI
desc: SomeAPI
verb: POST
path: /someapi
perm: ASD
raw: false
reqtype:
typename: AStr
ispointer: true
isarray: false
restype:
typename: AStr
ispointer: true
isarray: false
sorted_verbs:
- verb: POST
method:
name: SomeAPI
desc: SomeAPI
verb: POST
path: /someapi
perm: ASD
raw: false
reqtype:
typename: AStr
ispointer: true
isarray: false
restype:
typename: AStr
ispointer: true
isarray: false
+1 -1
View File
@@ -25,7 +25,7 @@ type AStr struct {
@PERM: ASD
@VERB: POST
*/
func SomeAPI(ctx context.Context, s *AStr, c int) (out *AStr, err error) {
func SomeAPI(ctx context.Context, s *AStr) (out *AStr, err error) {
//print("Got:" + s)
//out = time.Now().String() + " - Hey Ya!"
return