freenas

package
v0.0.0-...-abce766 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dataset

type Dataset struct {
	Avail          int64  `json:"avail,omitempty"`
	Mountpoint     string `json:"mountpoint,omitempty"`
	Name           string `json:"name"`
	Pool           string `json:"pool"`
	Recordsize     int64  `json:"recordsize,omitempty"`
	Quota          int64  `json:"quota,omitempty"`
	Reservation    int64  `json:"reservation,omitempty"`
	Refquota       int64  `json:"refquota,omitempty"`
	Refreservation int64  `json:"refreservation,omitempty"`
	Refer          int64  `json:"refer,omitempty"`
	Used           int64  `json:"used,omitempty"`
	Comments       string `json:"comments,omitempty"`
}

func (*Dataset) CopyFrom

func (d *Dataset) CopyFrom(source FreenasResource) error

func (*Dataset) Create

func (d *Dataset) Create(server *FreenasServer) error

func (*Dataset) Delete

func (d *Dataset) Delete(server *FreenasServer) error

func (*Dataset) Get

func (d *Dataset) Get(server *FreenasServer) error

func (*Dataset) MarshalJSON

func (d *Dataset) MarshalJSON() ([]byte, error)

func (*Dataset) String

func (d *Dataset) String() string

type FreenasResource

type FreenasResource interface {
	Delete(server *FreenasServer) error
	CopyFrom(source FreenasResource) error
	Get(server *FreenasServer) error
	Create(server *FreenasServer) error
}

type FreenasServer

type FreenasServer struct {
	Protocol                 string
	Host, Username, Password string
	Port                     int
	InsecureSkipVerify       bool
	// contains filtered or unexported fields
}

func NewFreenasServer

func NewFreenasServer(protocol string, host string, port int, username, password string, insecure bool) *FreenasServer

type NfsShare

type NfsShare struct {
	Id           int      `json:"id,omitempty"`
	Alldirs      bool     `json:"nfs_alldirs,omitempty"`
	Comment      string   `json:"nfs_comment,omitempty"`
	Hosts        string   `json:"nfs_hosts,omitempty"`
	MapallUser   string   `json:"nfs_mapall_user,omitempty"`
	MapallGroup  string   `json:"nfs_mapall_group,omitempty"`
	MaprootUser  string   `json:"nfs_maproot_user,omitempty"`
	MaprootGroup string   `json:"nfs_maproot_group,omitempty"`
	Network      string   `json:"nfs_network,omitempty"`
	Paths        []string `json:"nfs_paths"`
	Security     []string `json:"nfs_security"`
	Quiet        bool     `json:"nfs_quiet,omitempty"`
	ReadOnly     bool     `json:"nfs_ro,omitempty"`
}

func (*NfsShare) CopyFrom

func (n *NfsShare) CopyFrom(source FreenasResource) error

func (*NfsShare) Create

func (n *NfsShare) Create(server *FreenasServer) error

func (*NfsShare) Delete

func (n *NfsShare) Delete(server *FreenasServer) error

func (*NfsShare) Get

func (n *NfsShare) Get(server *FreenasServer) error

type Permission

type Permission struct {
	Path  string `json:"mp_path"`
	Acl   string `json:"mp_acl"`
	Mode  string `json:"mp_mode"`
	User  string `json:"mp_user"`
	Group string `json:"mp_group"`
}

func (*Permission) Put

func (p *Permission) Put(server *FreenasServer) error

Jump to

Keyboard shortcuts

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