2020-11-04 16:14:18 +00:00
|
|
|
package goapi
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2021-01-30 09:53:34 +00:00
|
|
|
"time"
|
2020-11-04 16:14:18 +00:00
|
|
|
)
|
|
|
|
|
2020-12-12 12:21:12 +00:00
|
|
|
//
|
2021-01-30 09:53:34 +00:00
|
|
|
/*@API*/
|
|
|
|
type ARequestStruct struct {
|
|
|
|
A *string `json:"SUPERCALIFRAGILISPEALIDOUX"`
|
|
|
|
B int64 `json:"bcd"`
|
|
|
|
C time.Time
|
|
|
|
D *string
|
|
|
|
}
|
2020-11-04 16:14:18 +00:00
|
|
|
|
|
|
|
/*@API*/
|
2021-01-30 09:53:34 +00:00
|
|
|
type AResponseStruct struct {
|
2020-11-04 16:14:18 +00:00
|
|
|
A string
|
2021-01-30 09:53:34 +00:00
|
|
|
B int64
|
|
|
|
C time.Time
|
|
|
|
D *string
|
|
|
|
}
|
|
|
|
|
|
|
|
/*@API*/
|
|
|
|
type AStr struct {
|
|
|
|
Country string
|
|
|
|
City string
|
|
|
|
HouseNumber int64
|
|
|
|
IsCondo bool
|
|
|
|
SomeWeirdTest string `json:"SUPERCALIFRAGILISPEALIDOUX"`
|
2020-11-04 16:14:18 +00:00
|
|
|
}
|
|
|
|
|
2021-01-30 09:53:34 +00:00
|
|
|
/*@API*/
|
|
|
|
type AStr2 struct {
|
|
|
|
Firstname string `json:"firstname"`
|
|
|
|
Lastname string `json:"lastname"`
|
|
|
|
Products []string
|
|
|
|
Addresses map[string]AStr
|
|
|
|
}
|
|
|
|
|
|
|
|
/*@API*/
|
|
|
|
type Noop struct{}
|
|
|
|
|
2020-11-04 16:14:18 +00:00
|
|
|
/*
|
|
|
|
@API
|
2020-11-06 23:16:52 +00:00
|
|
|
@PATH: /someapi
|
2021-01-30 09:53:34 +00:00
|
|
|
@PERM: ASD
|
|
|
|
@VERB: PUT
|
|
|
|
*/
|
|
|
|
func SomeAPI(ctx context.Context, a *Noop) ([]*AStr, error) {
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
@API
|
|
|
|
@PATH: /someapi
|
|
|
|
*/
|
|
|
|
func SomeAPI2(ctx context.Context, a *AStr2) ([]*AStr, error) {
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
@API
|
|
|
|
@PATH: /someapi3
|
2020-11-04 16:14:18 +00:00
|
|
|
*/
|
2021-01-30 09:53:34 +00:00
|
|
|
func SomeAPI3(ctx context.Context, a *AStr) ([]*AStr, error) {
|
2020-11-04 16:14:18 +00:00
|
|
|
return nil, nil
|
|
|
|
}
|