Documentation
¶
Index ¶
- Variables
- 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 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 GetUser(req *http.Request) (schema.User, bool)
- func HasPermission(req *http.Request) bool
- 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, family string) libvirtc.DiskXML
- func NewDiskXML(format, file, bus string) libvirtc.DiskXML
- func NewISOXML(file, family 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 ParseBasicAuth(auth string) (username, password string, ok bool)
- 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 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) 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 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 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 RouteItem
- type RouteMatch
- type RouteMatcher
- type Upload
Constants ¶
This section is empty.
Variables ¶
View Source
var ROUTER = &RouteMatcher{ Match: make([]RouteMatch, 0, 32), }
Functions ¶
func HasPermission ¶ added in v0.5.90
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 ParseBasicAuth ¶ added in v0.5.90
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 Graphics ¶ added in v0.5.90
type Graphics struct {
}
func (Graphics) DELETE ¶ added in v0.5.90
func (gra Graphics) DELETE(w http.ResponseWriter, r *http.Request)
func (Graphics) GET ¶ added in v0.5.90
func (gra Graphics) GET(w http.ResponseWriter, r *http.Request)
func (Graphics) POST ¶ added in v0.5.90
func (gra Graphics) 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 Memory ¶ added in v0.5.90
type Memory struct {
}
func (Memory) DELETE ¶ added in v0.5.90
func (mem Memory) DELETE(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)
type Processor ¶ added in v0.5.90
type Processor struct {
}
func (Processor) DELETE ¶ added in v0.5.90
func (proc Processor) DELETE(w http.ResponseWriter, r *http.Request)
func (Processor) GET ¶ added in v0.5.90
func (proc Processor) GET(w http.ResponseWriter, r *http.Request)
func (Processor) POST ¶ added in v0.5.90
func (proc Processor) POST(w http.ResponseWriter, r *http.Request)
type RouteMatch ¶ added in v0.5.90
type RouteMatcher ¶ added in v0.5.90
type RouteMatcher struct {
Match []RouteMatch
}
func (*RouteMatcher) Add ¶ added in v0.5.90
func (r *RouteMatcher) Add(m RouteMatch)
Click to show internal directories.
Click to hide internal directories.