Documentation
¶
Index ¶
- func DataStore2XML(conf schema.DataStore) libvirts.Pool
- func DelVolumeAndPool(name string) error
- func Disk2XML(conf *schema.Disk) (*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 Instance2XML(conf *schema.Instance) (libvirtc.DomainXML, error)
- func Interface2XML(conf *schema.Interface) (*libvirtc.InterfaceXML, error)
- func IsUnicast(address string) bool
- func IsVolume(file string) bool
- func Network2XML(conf schema.Network) libvirtn.NetworkXML
- 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
- func (store DataStore) DELETE(w http.ResponseWriter, r *http.Request)
- func (store DataStore) GET(w http.ResponseWriter, r *http.Request)
- func (store DataStore) POST(w http.ResponseWriter, r *http.Request)
- func (store DataStore) PUT(w http.ResponseWriter, r *http.Request)
- func (store DataStore) Router(router *mux.Router)
- type Disk
- type Hyper
- 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
- func (in Interface) DELETE(w http.ResponseWriter, r *http.Request)
- func (in Interface) GET(w http.ResponseWriter, r *http.Request)
- func (in Interface) POST(w http.ResponseWriter, r *http.Request)
- func (in Interface) PUT(w http.ResponseWriter, r *http.Request)
- func (in Interface) Router(router *mux.Router)
- type Network
- func (net Network) DELETE(w http.ResponseWriter, r *http.Request)
- func (net Network) GET(w http.ResponseWriter, r *http.Request)
- func (net Network) POST(w http.ResponseWriter, r *http.Request)
- func (net Network) PUT(w http.ResponseWriter, r *http.Request)
- func (net Network) Router(router *mux.Router)
- type Upload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Instance2XML ¶ added in v0.4.83
func Interface2XML ¶ added in v0.4.83
func Interface2XML(conf *schema.Interface) (*libvirtc.InterfaceXML, error)
func Network2XML ¶ added in v0.4.83
func Network2XML(conf schema.Network) libvirtn.NetworkXML
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)
}
type Bridger ¶
type Bridger struct {
}
func (Bridger) DELETE ¶ added in v0.4.83
func (br Bridger) DELETE(w http.ResponseWriter, r *http.Request)
type DataStore ¶
type DataStore struct {
}
func (DataStore) DELETE ¶ added in v0.4.83
func (store DataStore) DELETE(w http.ResponseWriter, r *http.Request)
func (DataStore) POST ¶ added in v0.4.83
func (store DataStore) POST(w http.ResponseWriter, r *http.Request)
type Interface ¶
type Interface struct {
}
func (Interface) GET ¶ added in v0.4.83
func (in Interface) GET(w http.ResponseWriter, r *http.Request)
type Network ¶ added in v0.4.83
type Network struct {
}
func (Network) DELETE ¶ added in v0.4.83
func (net Network) DELETE(w http.ResponseWriter, r *http.Request)
func (Network) GET ¶ added in v0.4.83
func (net Network) GET(w http.ResponseWriter, r *http.Request)
func (Network) POST ¶ added in v0.4.83
func (net Network) POST(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.