111 lines
3.3 KiB
Go
111 lines
3.3 KiB
Go
package common
|
|
|
|
type TokenResp struct {
|
|
Success bool `json:"success"`
|
|
Payload struct {
|
|
Token string `json:"token"`
|
|
Expiration int `json:"expiration"`
|
|
} `json:"payload"`
|
|
Error interface{} `json:"error"`
|
|
}
|
|
|
|
type SuiyuanResp struct {
|
|
Success bool `json:"success"`
|
|
Payload struct {
|
|
MapResourceSpecIdList struct {
|
|
Debug struct {
|
|
ResourceSpecs []struct {
|
|
Id string `json:"id"`
|
|
Name string `json:"name"`
|
|
Price int `json:"price"`
|
|
ResourceQuantity struct {
|
|
Cpu string `json:"cpu,omitempty"`
|
|
EnflameComDtu string `json:"enflame.com/dtu,omitempty"`
|
|
Memory string `json:"memory"`
|
|
Shm string `json:"shm,omitempty"`
|
|
CpuCpu string `json:"cpu_cpu,omitempty"`
|
|
} `json:"resourceQuantity"`
|
|
} `json:"resourceSpecs"`
|
|
} `json:"debug"`
|
|
Deploy struct {
|
|
ResourceSpecs []interface{} `json:"resourceSpecs"`
|
|
} `json:"deploy"`
|
|
Train struct {
|
|
ResourceSpecs []struct {
|
|
Id string `json:"id"`
|
|
Name string `json:"name"`
|
|
Price int `json:"price"`
|
|
ResourceQuantity struct {
|
|
Cpu string `json:"cpu"`
|
|
EnflameComDtu string `json:"enflame.com/dtu"`
|
|
Memory string `json:"memory"`
|
|
Shm string `json:"shm"`
|
|
} `json:"resourceQuantity"`
|
|
} `json:"resourceSpecs"`
|
|
} `json:"train"`
|
|
} `json:"mapResourceSpecIdList"`
|
|
} `json:"payload"`
|
|
Error interface{} `json:"error"`
|
|
}
|
|
|
|
type HanwujiResp struct {
|
|
Success bool `json:"success"`
|
|
Payload struct {
|
|
MapResourceSpecIdList struct {
|
|
Debug struct {
|
|
ResourceSpecs []struct {
|
|
Id string `json:"id"`
|
|
Name string `json:"name"`
|
|
Price int `json:"price"`
|
|
ResourceQuantity struct {
|
|
CambriconComMlu string `json:"cambricon.com/mlu,omitempty"`
|
|
Cpu string `json:"cpu"`
|
|
Memory string `json:"memory"`
|
|
Shm string `json:"shm,omitempty"`
|
|
} `json:"resourceQuantity"`
|
|
} `json:"resourceSpecs"`
|
|
} `json:"debug"`
|
|
Deploy struct {
|
|
ResourceSpecs []interface{} `json:"resourceSpecs"`
|
|
} `json:"deploy"`
|
|
Train struct {
|
|
ResourceSpecs []struct {
|
|
Id string `json:"id"`
|
|
Name string `json:"name"`
|
|
Price int `json:"price"`
|
|
ResourceQuantity struct {
|
|
CambriconComMlu string `json:"cambricon.com/mlu,omitempty"`
|
|
Cpu string `json:"cpu"`
|
|
Memory string `json:"memory"`
|
|
Shm string `json:"shm,omitempty"`
|
|
} `json:"resourceQuantity"`
|
|
} `json:"resourceSpecs"`
|
|
} `json:"train"`
|
|
} `json:"mapResourceSpecIdList"`
|
|
} `json:"payload"`
|
|
Error interface{} `json:"error"`
|
|
}
|
|
|
|
type SailingsiResp struct {
|
|
Success bool `json:"success"`
|
|
Payload struct {
|
|
MapResourceSpecIdList struct {
|
|
Debug struct {
|
|
ResourceSpecs []interface{} `json:"resourceSpecs"`
|
|
} `json:"debug"`
|
|
Deploy struct {
|
|
ResourceSpecs []interface{} `json:"resourceSpecs"`
|
|
} `json:"deploy"`
|
|
Train struct {
|
|
ResourceSpecs []interface{} `json:"resourceSpecs"`
|
|
} `json:"train"`
|
|
} `json:"mapResourceSpecIdList"`
|
|
} `json:"payload"`
|
|
Error interface{} `json:"error"`
|
|
}
|
|
|
|
type Login struct {
|
|
Username string `json:"username"`
|
|
Password string `json:"password"`
|
|
}
|