github.com/yasker/longhorn-engine@v0.0.0-20160621014712-6ed6cfca0729/agent/replica/rest/model.go (about) 1 package rest 2 3 import ( 4 "github.com/rancher/go-rancher/client" 5 ) 6 7 type BackupTarget struct { 8 client.Resource 9 UUID string `json:"uuid,omitempty"` 10 Name string `json:"name,omitempty"` 11 Type string `json:"type,omitempty"` 12 NFSConfig NFSConfig `json:"nfsConfig,omitempty"` 13 } 14 15 type NFSConfig struct { 16 Server string `json:"server"` 17 Share string `json:"share"` 18 MountOptions string `json:"mountOptions"` 19 } 20 21 func newSchema() *client.Schemas { 22 schemas := &client.Schemas{} 23 24 schemas.AddType("error", client.ServerApiError{}) 25 schemas.AddType("apiVersion", client.Resource{}) 26 schemas.AddType("schema", client.Schema{}) 27 28 target := schemas.AddType("backupTarget", BackupTarget{}) 29 target.CollectionMethods = []string{"POST", "GET"} 30 31 schemas.AddType("nfsConfig", NFSConfig{}) 32 33 return schemas 34 }