Documentation
¶
Index ¶
- func DelVolumeAndPool(name string) error
- func DiskConf2XML(conf *schema.DiskConf) (*libvirtc.DiskXML, error)
- func GetArg(r *http.Request, name string) (string, bool)
- func GetData(r *http.Request, v interface{}) error
- func GetFile(name string) string
- func GetPath(store, name string) string
- func GetQueryOne(req *http.Request, name string) string
- func GetStatic() string
- func InstanceConf2XML(conf *schema.InstanceConf) (libvirtc.DomainXML, error)
- func InterfaceConf2XML(conf *schema.InterfaceConf) (*libvirtc.InterfaceXML, error)
- func IsVolume(file string) bool
- func NewCDROMXML(file string) libvirtc.DiskXML
- func NewDiskXML(format, file, bus string) libvirtc.DiskXML
- func NewISOXML(file string) libvirtc.DiskXML
- func NewVolume(name, disk string, size uint64) (*libvirts.VolumeXML, error)
- func NewVolumeAndPool(store, name, disk string, size uint64) (*libvirts.VolumeXML, error)
- func ParseFiles(w http.ResponseWriter, name string, data interface{}) error
- func ResponseJson(w http.ResponseWriter, v interface{})
- func ResponseMsg(w http.ResponseWriter, code int, message string)
- func ResponseXML(w http.ResponseWriter, v string)
- func SetStatic(dir string)
- func Slot2Disk(slot uint8) string
- type Api
- type Bridger
- type DataStore
- type Disk
- type ISO
- type Instance
- func (ins Instance) DELETE(w http.ResponseWriter, r *http.Request)
- func (ins Instance) GET(w http.ResponseWriter, r *http.Request)
- func (ins Instance) POST(w http.ResponseWriter, r *http.Request)
- func (ins Instance) PUT(w http.ResponseWriter, r *http.Request)
- func (ins Instance) Router(router *mux.Router)
- type Interface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstanceConf2XML ¶
func InstanceConf2XML(conf *schema.InstanceConf) (libvirtc.DomainXML, error)
func InterfaceConf2XML ¶
func InterfaceConf2XML(conf *schema.InterfaceConf) (*libvirtc.InterfaceXML, error)
func NewCDROMXML ¶
func NewDiskXML ¶
func NewVolumeAndPool ¶
name: Domain name. store: like: datatore@01
func ParseFiles ¶
func ParseFiles(w http.ResponseWriter, name string, data interface{}) error
func ResponseJson ¶
func ResponseJson(w http.ResponseWriter, v interface{})
func ResponseMsg ¶
func ResponseMsg(w http.ResponseWriter, code int, message string)
func ResponseXML ¶
func ResponseXML(w http.ResponseWriter, v string)
Types ¶
type Api ¶
type Api interface {
Router(router *mux.Router)
GET(w http.ResponseWriter, r *http.Request)
POST(w http.ResponseWriter, r *http.Request)
DELETE(w http.ResponseWriter, r *http.Request)
PUT(w http.ResponseWriter, r *http.Request)
}
Click to show internal directories.
Click to hide internal directories.