mirror of
https://github.com/nicotsx/zerobyte.git
synced 2025-12-10 12:10:51 +01:00
feat: api
This commit is contained in:
28
internal/api/types.go
Normal file
28
internal/api/types.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package api
|
||||
|
||||
type CreateVolumeBody struct {
|
||||
Name string `json:"name" binding:"required"`
|
||||
}
|
||||
|
||||
type CreateVolumeResponse struct {
|
||||
Name string `json:"name"`
|
||||
Mountpoint string `json:"mountpoint"`
|
||||
Err string `json:"err,omitempty"`
|
||||
}
|
||||
|
||||
type GetVolumeResponse struct {
|
||||
Name string `json:"name"`
|
||||
Mountpoint string `json:"mountpoint"`
|
||||
Err string `json:"err,omitempty"`
|
||||
}
|
||||
|
||||
type VolumeInfo struct {
|
||||
Name string `json:"name"`
|
||||
Mountpoint string `json:"mountpoint"`
|
||||
Err string `json:"err,omitempty"`
|
||||
}
|
||||
|
||||
type ListVolumesResponse struct {
|
||||
Volumes []VolumeInfo `json:"volumes"`
|
||||
Err string `json:"err,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user