12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- package cli
- import "time"
- type Param struct {
- Key string
- Value string
- }
- type Params []Param
- type HandleFunc func(ctx *Context) (err error)
- type Middleware func(next HandleFunc) HandleFunc
- type responsePayload struct {
- Type uint8 `json:"-"`
- Code int `json:"code"`
- Reason string `json:"reason,omitempty"`
- Data any `json:"data,omitempty"`
- }
- type Info struct {
- ID int64 `json:"id"`
- OS string `json:"os"`
- Name string `json:"name"`
- Version string `json:"version"`
- ServerTime time.Time `json:"server_time"`
- RemoteAddr string `json:"remote_addr"`
- }
- type Command struct {
- Path string
- Handle HandleFunc
- Description string
- }
- type commander struct {
- Name string
- Path string
- Description string
- }
- type encoder interface {
- Marshal() ([]byte, error)
- }
|