Documentation ¶
Index ¶
- func Base64Decode(value string) ([]byte, error)
- func Base64Encode(value string) string
- 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, drv, que 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)
- func UpdateCookie(w http.ResponseWriter, req *http.Request, user schema.User)
- type Api
- type Bridger
- type DHCPLease
- 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) Router(router *mux.Router)
- func (disk Disk) Travel(instance schema.Instance) map[string]libvirts.VolumeInfo
- type Graphics
- type History
- type Hyper
- type ISO
- type Instance
- func (ins Instance) Delete(w http.ResponseWriter, r *http.Request)
- func (ins Instance) Destroy(w http.ResponseWriter, r *http.Request)
- func (ins Instance) Execute(w http.ResponseWriter, uuid, action string)
- 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) Reset(w http.ResponseWriter, r *http.Request)
- func (ins Instance) Resume(w http.ResponseWriter, r *http.Request)
- func (ins Instance) Router(router *mux.Router)
- func (ins Instance) Shutdown(w http.ResponseWriter, r *http.Request)
- func (ins Instance) Start(w http.ResponseWriter, r *http.Request)
- func (ins Instance) Stats(w http.ResponseWriter, r *http.Request)
- func (ins Instance) Suspend(w http.ResponseWriter, r *http.Request)
- func (ins Instance) Title(w http.ResponseWriter, r *http.Request)
- func (ins Instance) Undefine(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) List(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) 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) Remote(user *schema.User) []schema.Target
- func (pro ProxyTcp) Router(router *mux.Router)
- type Snapshot
- func (in Snapshot) Delete(w http.ResponseWriter, r *http.Request)
- func (in Snapshot) Get(w http.ResponseWriter, r *http.Request)
- func (in Snapshot) Post(w http.ResponseWriter, r *http.Request)
- func (in Snapshot) Revert(w http.ResponseWriter, r *http.Request)
- func (in Snapshot) 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 Base64Decode ¶ added in v0.9.1
func Base64Encode ¶ added in v0.9.1
func GetTypeByVolume ¶
func Interface2XML ¶
func Interface2XML(source, model, seq, typ, drv, que 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)
func UpdateCookie ¶
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.