driver

package
v0.0.0-...-54690b2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Domain

type Domain interface {
	// Name is the name of the domain
	Name() (string, error)

	// XML returns the XML description of the domain
	XML() (string, error)
}

Domain is the common interface representing domains

type Driver

type Driver interface {
	// Close close the current driver connection
	Close() error

	// ListDomain returns a list of domains using
	// options
	ListDomain(opts Options) ([]Domain, error)

	// GetDomain returns a domain from its name
	GetDomain(name string) (Domain, error)
}

Driver interface represents the middleware between the APIs and the TUI

type ListFlag

type ListFlag int

ListFlag is an optional flag to pass to the ListDomain method

const (
	// All lists all the domains
	All ListFlag = iota
	// Shutdown lists only shutdowned domains
	Shutdown
	// Active lists only active domains
	Active
)

type Options

type Options struct {
	// ListOptions is the options to pass
	// to the ListDomain methods
	ListOptions ListFlag
}

Options is the helper to handle driver options for requests

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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