Documentation ¶
Index ¶
- type AuthCredential
- type Dataset
- type ErrorResponse
- type Extent
- type ISCSIConfig
- type Initiator
- type Portal
- type Resource
- type Server
- type Target
- func (t *Target) CopyFrom(source Resource) error
- func (t *Target) Create(server *Server) (*http.Response, error)
- func (t *Target) Delete(server *Server) (*http.Response, error)
- func (t *Target) Get(server *Server) (*http.Response, error)
- func (t *Target) GetByName(server *Server) (*http.Response, error)
- type TargetGroup
- type TargetToExtent
- type Zvol
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthCredential ¶
type AuthCredential struct { ID int `json:"id,omitempty"` Tag int `json:"tag,omitempty"` User string `json:"iscsi_target_auth_user,omitempty"` Secret string `json:"iscsi_target_auth_secret,omitempty"` Peeruser string `json:"iscsi_target_auth_peeruser,omitempty"` Peersecret string `json:"iscsi_target_auth_peersecret,omitempty"` }
AuthCredential represents an ISCSI credential
func (*AuthCredential) CopyFrom ¶
func (a *AuthCredential) CopyFrom(source Resource) error
CopyFrom copies data from a response into an existing resource instance
func (*AuthCredential) Create ¶
func (a *AuthCredential) Create(server *Server) (*http.Response, error)
Create creates an AuthCredential instance
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"` 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"` }
Dataset represents an zfs dataset
type ErrorResponse ¶
type ErrorResponse struct {
DefaultAll []string `json:"__all__,omitempty"`
}
ErrorResponse generic object to contain FreeNAS API errors
type Extent ¶
type Extent struct { ID int `json:"id,omitempty"` AvailThreshold int `json:"iscsi_target_extent_avail_threshold,omitempty"` Blocksize int `json:"iscsi_target_extent_blocksize,omitempty"` Comment string `json:"iscsi_target_extent_comment,omitempty"` Filesize string `json:"iscsi_target_extent_filesize,omitempty"` InsecureTpc bool `json:"iscsi_target_extent_insecure_tpc"` Legacy bool `json:"iscsi_target_extent_legacy,omitempty"` Naa string `json:"iscsi_target_extent_naa,omitempty"` Name string `json:"iscsi_target_extent_name,omitempty"` Path string `json:"iscsi_target_extent_path,omitempty"` Disk string `json:"iscsi_target_extent_disk,omitempty"` Pblocksize bool `json:"iscsi_target_extent_pblocksize,omitempty"` Ro bool `json:"iscsi_target_extent_ro,omitempty"` Rpm string `json:"iscsi_target_extent_rpm,omitempty"` Serial string `json:"iscsi_target_extent_serial,omitempty"` Type string `json:"iscsi_target_extent_type,omitempty"` Xen bool `json:"iscsi_target_extent_xen,omitempty"` }
Extent represents an ISCSI extent
type ISCSIConfig ¶
type ISCSIConfig struct { ID int `json:"id,omitempty"` Basename string `json:"iscsi_basename,omitempty"` ISNSServers string `json:"iscsi_isns_servers,omitempty"` PoolAvailThreshold int `json:"iscsi_pool_avail_threshold,omitempty"` }
ISCSIConfig represents an ISCSIConfig instance
func (*ISCSIConfig) CopyFrom ¶
func (i *ISCSIConfig) CopyFrom(source Resource) error
CopyFrom copies data from a response into an existing resource instance
func (*ISCSIConfig) Create ¶
func (i *ISCSIConfig) Create(server *Server) (*http.Response, error)
Create creates an ISCSIConfig instance
type Initiator ¶
type Initiator struct { ID int `json:"id,omitempty"` Tag int `json:"iscsi_target_initiator_tag,omitempty"` AuthNetwork string `json:"iscsi_target_initiator_auth_network,omitempty"` Comment string `json:"iscsi_target_Initiator_comment,omitempty"` Initiators string `json:"iscsi_target_initiator_initiators,omitempty"` }
Initiator represents an Initiator instance
func (*Initiator) CopyFrom ¶
CopyFrom copies data from a response into an existing resource instance
type Portal ¶
type Portal struct { ID int `json:"id,omitempty"` Tag int `json:"iscsi_target_portal_tag,omitempty"` Comment string `json:"iscsi_target_portal_comment,omitempty"` Discoveryauthgroup string `json:"iscsi_target_portal_discoveryauthgroup,omitempty"` Discoveryauthmethod string `json:"iscsi_target_portal_discoveryauthmethod,omitempty"` Ips []string `json:"iscsi_target_portal_ips,omitempty"` }
Portal represents a Portal instance
type Resource ¶
type Resource interface { CopyFrom(source Resource) error Get(server *Server) (*http.Response, error) Create(server *Server) (*http.Response, error) Delete(server *Server) (*http.Response, error) }
Resource basic interface for http interactions with various FreeNAS resources
type Server ¶
type Server struct { Protocol string Host, Username, Password string Port int InsecureSkipVerify bool // contains filtered or unexported fields }
Server struct representing connection details
type Target ¶
type Target struct { ID int `json:"id,omitempty"` Name string `json:"iscsi_target_name,omitempty"` Alias string `json:"iscsi_target_alias,omitempty"` Mode string `json:"iscsi_target_mode,omitempty"` }
Target represents a Target instance
type TargetGroup ¶
type TargetGroup struct { ID int `json:"id,omitempty"` Target int `json:"iscsi_target,omitempty"` Authgroup int `json:"iscsi_target_authgroup,omitempty"` Authtype string `json:"iscsi_target_authtype,omitempty"` Initialdigest string `json:"iscsi_target_initialdigest,omitempty"` Initiatorgroup int `json:"iscsi_target_initiatorgroup,omitempty"` Portalgroup int `json:"iscsi_target_portalgroup,omitempty"` }
TargetGroup represents a TargetGroup instance
func (*TargetGroup) CopyFrom ¶
func (t *TargetGroup) CopyFrom(source Resource) error
CopyFrom copies data from a response into an existing resource instance
func (*TargetGroup) Create ¶
func (t *TargetGroup) Create(server *Server) (*http.Response, error)
Create creates a TargetGroup instance
type TargetToExtent ¶
type TargetToExtent struct { ID int `json:"id,omitempty"` Extent int `json:"iscsi_extent,omitempty"` Lunid *int `json:"iscsi_lunid,omitempty"` Target int `json:"iscsi_target,omitempty"` }
TargetToExtent represents a TargetToExtent instance
func (*TargetToExtent) CopyFrom ¶
func (t *TargetToExtent) CopyFrom(source Resource) error
CopyFrom copies data from a response into an existing resource instance
func (*TargetToExtent) Create ¶
func (t *TargetToExtent) Create(server *Server) (*http.Response, error)
Create creates a TargetToExtent instance
type Zvol ¶
type Zvol struct { Name string `json:"name,omitempty"` Avail int64 `json:"avail,omitempty"` Comments string `json:"comments,omitempty"` Compression string `json:"compression,omitempty"` Dedup string `json:"dedup,omitempty"` Refer int64 `json:"refer,omitempty"` Used int64 `json:"used,omitempty"` //Volsize int64 `json:"volsize,omitempty"` Volsize string `json:"volsize,omitempty,"` Sparse bool `json:"sparse,omitempty"` Force bool `json:"force,omitempty"` Blocksize string `json:"blocksize,omitempty"` Dataset Dataset `json:"-"` }
Zvol represents a zvol instance