feat: api

This commit is contained in:
Nicolas Meienberger
2025-08-10 16:51:16 +02:00
parent 2c38a551cc
commit fd91751673
8 changed files with 177 additions and 43 deletions

28
internal/api/types.go Normal file
View 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"`
}