api

package
v0.4.83 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2020 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataStore2XML added in v0.4.83

func DataStore2XML(conf schema.DataStore) libvirts.Pool

func DelVolumeAndPool

func DelVolumeAndPool(name string) error

name: Domain name.

func Disk2XML added in v0.4.83

func Disk2XML(conf *schema.Disk) (*libvirtc.DiskXML, error)

func GetArg

func GetArg(r *http.Request, name string) (string, bool)

func GetData

func GetData(r *http.Request, v interface{}) error

func GetFile

func GetFile(name string) string

func GetPath

func GetPath(store, name string) string

store: datastore@01 name: domain name

func GetQueryOne

func GetQueryOne(req *http.Request, name string) string

func GetStatic

func GetStatic() string

func Instance2XML added in v0.4.83

func Instance2XML(conf *schema.Instance) (libvirtc.DomainXML, error)

func Interface2XML added in v0.4.83

func Interface2XML(conf *schema.Interface) (*libvirtc.InterfaceXML, error)

func IsUnicast added in v0.4.83

func IsUnicast(address string) bool

func IsVolume

func IsVolume(file string) bool

func Network2XML added in v0.4.83

func Network2XML(conf schema.Network) libvirtn.NetworkXML

func NewCDROMXML

func NewCDROMXML(file string) libvirtc.DiskXML

func NewDiskXML

func NewDiskXML(format, file, bus string) libvirtc.DiskXML

func NewISOXML

func NewISOXML(file string) libvirtc.DiskXML

func NewVolume

func NewVolume(name, disk string, size uint64) (*libvirts.VolumeXML, error)

name: domain name disk: disk name size: disk size using bytes

func NewVolumeAndPool

func NewVolumeAndPool(store, name, disk string, size uint64) (*libvirts.VolumeXML, error)

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)

func SetStatic

func SetStatic(dir string)

func Slot2Disk

func Slot2Disk(slot uint8) 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)

func (Bridger) GET

func (br Bridger) GET(w http.ResponseWriter, r *http.Request)

func (Bridger) POST added in v0.4.83

func (br Bridger) POST(w http.ResponseWriter, r *http.Request)

func (Bridger) PUT added in v0.4.83

func (br Bridger) PUT(w http.ResponseWriter, r *http.Request)

func (Bridger) Router

func (br Bridger) Router(router *mux.Router)

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) GET

func (store DataStore) GET(w http.ResponseWriter, r *http.Request)

func (DataStore) POST added in v0.4.83

func (store DataStore) POST(w http.ResponseWriter, r *http.Request)

func (DataStore) PUT added in v0.4.83

func (store DataStore) PUT(w http.ResponseWriter, r *http.Request)

func (DataStore) Router

func (store DataStore) Router(router *mux.Router)

type Disk

type Disk struct {
}

func (Disk) DELETE

func (disk Disk) DELETE(w http.ResponseWriter, r *http.Request)

func (Disk) GET added in v0.4.83

func (disk Disk) GET(w http.ResponseWriter, r *http.Request)

func (Disk) POST

func (disk Disk) POST(w http.ResponseWriter, r *http.Request)

func (Disk) PUT added in v0.4.83

func (disk Disk) PUT(w http.ResponseWriter, r *http.Request)

func (Disk) Router

func (disk Disk) Router(router *mux.Router)

type Hyper added in v0.4.83

type Hyper struct {
}

func (Hyper) GET added in v0.4.83

func (h Hyper) GET(w http.ResponseWriter, r *http.Request)

func (Hyper) Router added in v0.4.83

func (h Hyper) Router(router *mux.Router)

type ISO

type ISO struct {
}

func (ISO) DELETE added in v0.4.83

func (iso ISO) DELETE(w http.ResponseWriter, r *http.Request)

func (ISO) GET

func (iso ISO) GET(w http.ResponseWriter, r *http.Request)

func (ISO) POST added in v0.4.83

func (iso ISO) POST(w http.ResponseWriter, r *http.Request)

func (ISO) PUT added in v0.4.83

func (iso ISO) PUT(w http.ResponseWriter, r *http.Request)

func (ISO) Router

func (iso ISO) Router(router *mux.Router)

type Instance

type Instance struct {
}

func (Instance) DELETE

func (ins Instance) DELETE(w http.ResponseWriter, r *http.Request)

func (Instance) GET

func (ins Instance) GET(w http.ResponseWriter, r *http.Request)

func (Instance) POST

func (ins Instance) POST(w http.ResponseWriter, r *http.Request)

func (Instance) PUT

func (ins Instance) PUT(w http.ResponseWriter, r *http.Request)

func (Instance) Router

func (ins Instance) Router(router *mux.Router)

type Interface

type Interface struct {
}

func (Interface) DELETE

func (in Interface) DELETE(w http.ResponseWriter, r *http.Request)

func (Interface) GET added in v0.4.83

func (in Interface) GET(w http.ResponseWriter, r *http.Request)

func (Interface) POST

func (in Interface) POST(w http.ResponseWriter, r *http.Request)

func (Interface) PUT added in v0.4.83

func (in Interface) PUT(w http.ResponseWriter, r *http.Request)

func (Interface) Router

func (in Interface) Router(router *mux.Router)

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)

func (Network) PUT added in v0.4.83

func (net Network) PUT(w http.ResponseWriter, r *http.Request)

func (Network) Router added in v0.4.83

func (net Network) Router(router *mux.Router)

type Upload added in v0.4.83

type Upload struct {
}

func (Upload) Router added in v0.4.83

func (up Upload) Router(router *mux.Router)

func (Upload) Upload added in v0.4.83

func (up Upload) Upload(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL