Documentation
¶
Index ¶
- func CleanPool(name string) error
- func DataStore2XML(conf schema.DataStore) libvirts.Pool
- func Disk2XML(conf *schema.Disk) (*libvirtc.DiskXML, error)
- func GetArg(r *http.Request, name string) (string, bool)
- func GetAuth(req *http.Request) (name, pass string, ok 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 GetTypeByVolume(file string) (string, string)
- func GetUser(req *http.Request) (schema.User, bool)
- func Instance2XML(conf *schema.Instance) (libvirtc.DomainXML, error)
- func Interface2XML(source, model, seq, typ string) libvirtc.InterfaceXML
- func IsUniCast(address string) bool
- func IsVolume(file string) bool
- func Network2XML(conf schema.Network) libvirtn.NetworkXML
- func NewBackingVolumeAndPool(store, name, disk, backingFle, backingFmt string) (*libvirts.VolumeXML, error)
- func NewCdXML(file, family string, seq *diskSeq) libvirtc.DiskXML
- func NewDiskXML(format, file, bus string, seq *diskSeq) libvirtc.DiskXML
- func NewFileXML(disk *schema.Disk, conf *schema.Instance, seq *diskSeq) (libvirtc.DiskXML, error)
- func NewIsoXML(file, family string, seq *diskSeq) libvirtc.DiskXML
- func NewVolume(name, disk string, size uint64) (*libvirts.VolumeXML, error)
- func NewVolumeAndPool(store, name, disk string, size uint64) (*libvirts.VolumeXML, error)
- func ParseBasicAuth(auth string) (username, password string, ok bool)
- func ParseFiles(w http.ResponseWriter, name string, data interface{}) error
- func RemovePool(name string) 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)
- type Api
- type Bridger
- type DHCPLease
- func (l DHCPLease) DELETE(w http.ResponseWriter, r *http.Request)
- func (l DHCPLease) GET(w http.ResponseWriter, r *http.Request)
- func (l DHCPLease) Get(data schema.DHCPLeases) error
- func (l DHCPLease) POST(w http.ResponseWriter, r *http.Request)
- func (l DHCPLease) PUT(w http.ResponseWriter, r *http.Request)
- func (l DHCPLease) Router(router *mux.Router)
- 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
- func (disk Disk) DELETE(w http.ResponseWriter, r *http.Request)
- func (disk Disk) FindByDev(devices *libvirtc.DevicesXML, dev string) *libvirtc.DiskXML
- func (disk Disk) GET(w http.ResponseWriter, r *http.Request)
- func (disk Disk) POST(w http.ResponseWriter, r *http.Request)
- func (disk Disk) PUT(w http.ResponseWriter, r *http.Request)
- func (disk Disk) Router(router *mux.Router)
- func (disk Disk) Travel(instance schema.Instance) map[string]libvirts.VolumeInfo
- type Graphics
- func (gra Graphics) DELETE(w http.ResponseWriter, r *http.Request)
- func (gra Graphics) GET(w http.ResponseWriter, r *http.Request)
- func (gra Graphics) POST(w http.ResponseWriter, r *http.Request)
- func (gra Graphics) PUT(w http.ResponseWriter, r *http.Request)
- func (gra Graphics) Router(router *mux.Router)
- 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) GetByUser(user *schema.User, list *schema.ListInstance)
- func (ins Instance) HasPermission(user *schema.User, instance string) bool
- 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)
- func (ins Instance) Stats(w http.ResponseWriter, r *http.Request)
- 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 Memory
- 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 Password
- type Processor
- func (proc Processor) DELETE(w http.ResponseWriter, r *http.Request)
- func (proc Processor) GET(w http.ResponseWriter, r *http.Request)
- func (proc Processor) POST(w http.ResponseWriter, r *http.Request)
- func (proc Processor) PUT(w http.ResponseWriter, r *http.Request)
- func (proc Processor) Router(router *mux.Router)
- type ProxyTcp
- func (pro ProxyTcp) DELETE(w http.ResponseWriter, r *http.Request)
- func (pro ProxyTcp) GET(w http.ResponseWriter, r *http.Request)
- func (pro ProxyTcp) GetTarget(host string, inst *schema.Instance, leases schema.DHCPLeases) []schema.Target
- func (pro ProxyTcp) Graphics(inst *schema.Instance) []schema.Target
- func (pro ProxyTcp) Local(user *schema.User) []schema.Target
- func (pro ProxyTcp) POST(w http.ResponseWriter, r *http.Request)
- func (pro ProxyTcp) PUT(w http.ResponseWriter, r *http.Request)
- func (pro ProxyTcp) Remote(user *schema.User) []schema.Target
- func (pro ProxyTcp) Router(router *mux.Router)
- type Upload
- type User
- func (u User) DELETE(writer http.ResponseWriter, request *http.Request)
- func (u User) GET(writer http.ResponseWriter, request *http.Request)
- func (u User) POST(writer http.ResponseWriter, request *http.Request)
- func (u User) PUT(writer http.ResponseWriter, request *http.Request)
- func (u User) Router(router *mux.Router)
- type Volume
- type Zone
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTypeByVolume ¶
func Interface2XML ¶
func Interface2XML(source, model, seq, typ string) libvirtc.InterfaceXML
func Network2XML ¶
func Network2XML(conf schema.Network) libvirtn.NetworkXML
func NewBackingVolumeAndPool ¶
func NewBackingVolumeAndPool(store, name, disk, backingFle, backingFmt string) (*libvirts.VolumeXML, error)
name: Domain name. store: like: datatore@01
func NewDiskXML ¶
func NewFileXML ¶
func NewVolumeAndPool ¶
name: Domain name. store: like: datatore@01
func ParseBasicAuth ¶
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 Instance ¶
type Instance struct {
}
func (Instance) GetByUser ¶
func (ins Instance) GetByUser(user *schema.User, list *schema.ListInstance)
func (Instance) HasPermission ¶
Click to show internal directories.
Click to hide internal directories.