Documentation ¶
Index ¶
- type ISCSIExtent
- type ISCSITarget
- type ISCSITargetExtend
- type ISCSITargetGroup
- type PoolDataset
- type TruenasBackend
- func (b *TruenasBackend) CommentVolume(ctx context.Context, id string, comment string) error
- func (b *TruenasBackend) CreateVolume(ctx context.Context, name string, size int64) (string, error)
- func (b *TruenasBackend) DeleteVolume(ctx context.Context, id string) error
- func (b *TruenasBackend) ExpandVolume(ctx context.Context, id string, size int64) error
- func (b *TruenasBackend) GetISCSISecrets() *backends.ISCSISecrets
- func (b *TruenasBackend) LoadParameters(parameters map[string]string) error
- func (b *TruenasBackend) LoadPublishContext(context map[string]string) error
- func (b *TruenasBackend) LoadSecrets(secrets map[string]string) error
- type TruenasHttpClient
- func (c *TruenasHttpClient) ISCSIExtentGet(ctx context.Context, limit int) (*[]ISCSIExtent, error)
- func (c *TruenasHttpClient) ISCSIExtentPost(ctx context.Context, name string, disk string) (*ISCSIExtent, error)
- func (c *TruenasHttpClient) ISCSITargetExtendGet(ctx context.Context, limit int) (*[]ISCSITargetExtend, error)
- func (c *TruenasHttpClient) ISCSITargetExtendPost(ctx context.Context, targetId int, extentId int) (*ISCSITargetExtend, error)
- func (c *TruenasHttpClient) ISCSITargetGet(ctx context.Context, limit int) (*[]ISCSITarget, error)
- func (c *TruenasHttpClient) ISCSITargetPost(ctx context.Context, name string, portalId int, initiatorId int) (*ISCSITarget, error)
- func (c *TruenasHttpClient) PoolDatasetGet(ctx context.Context, limit int, offset int) (*[]PoolDataset, error)
- func (c *TruenasHttpClient) PoolDatasetIdIdDelete(ctx context.Context, id string, recursive bool, force bool) error
- func (c *TruenasHttpClient) PoolDatasetIdIdGet(ctx context.Context, id string) (*PoolDataset, error)
- func (c *TruenasHttpClient) PoolDatasetPost(ctx context.Context, name string, volsize int64) (*PoolDataset, error)
- func (c *TruenasHttpClient) PoolDatasetPutComments(ctx context.Context, id string, comments string) (*PoolDataset, error)
- func (c *TruenasHttpClient) PoolDatasetPutVolsize(ctx context.Context, id string, volsize int64) (*PoolDataset, error)
- type TruenasSecrets
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ISCSIExtent ¶
type ISCSITarget ¶
type ISCSITarget struct { Id int `json:"id"` Name string `json:"name"` Groups []ISCSITargetGroup `json:"groups"` }
type ISCSITargetExtend ¶
type ISCSITargetGroup ¶
type PoolDataset ¶
type PoolDataset struct { Id string `json:"id"` Type string `json:"type"` Name string `json:"name"` Pool string `json:"pool"` Children []PoolDataset `json:"children"` }
type TruenasBackend ¶
type TruenasBackend struct {
// contains filtered or unexported fields
}
func NewTruenasBackend ¶
func NewTruenasBackend() TruenasBackend
func (*TruenasBackend) CommentVolume ¶
func (*TruenasBackend) CreateVolume ¶
func (*TruenasBackend) DeleteVolume ¶
func (b *TruenasBackend) DeleteVolume(ctx context.Context, id string) error
func (*TruenasBackend) ExpandVolume ¶
func (*TruenasBackend) GetISCSISecrets ¶
func (b *TruenasBackend) GetISCSISecrets() *backends.ISCSISecrets
func (*TruenasBackend) LoadParameters ¶
func (b *TruenasBackend) LoadParameters(parameters map[string]string) error
func (*TruenasBackend) LoadPublishContext ¶
func (b *TruenasBackend) LoadPublishContext(context map[string]string) error
func (*TruenasBackend) LoadSecrets ¶
func (b *TruenasBackend) LoadSecrets(secrets map[string]string) error
type TruenasHttpClient ¶
type TruenasHttpClient struct { BaseURL string ApiKey string TLSSkipVerify bool // contains filtered or unexported fields }
func NewTruenasHttpClient ¶
func NewTruenasHttpClient(baseUrl string, apiKey string, tlsSkipVerify bool) *TruenasHttpClient
func (*TruenasHttpClient) ISCSIExtentGet ¶
func (c *TruenasHttpClient) ISCSIExtentGet(ctx context.Context, limit int) (*[]ISCSIExtent, error)
https://www.truenas.com/docs/api/rest.html#api-IscsiExtent-iscsiExtentGet
func (*TruenasHttpClient) ISCSIExtentPost ¶
func (c *TruenasHttpClient) ISCSIExtentPost(ctx context.Context, name string, disk string) (*ISCSIExtent, error)
https://www.truenas.com/docs/api/rest.html#api-IscsiExtent-iscsiExtentPost
func (*TruenasHttpClient) ISCSITargetExtendGet ¶
func (c *TruenasHttpClient) ISCSITargetExtendGet(ctx context.Context, limit int) (*[]ISCSITargetExtend, error)
https://www.truenas.com/docs/api/rest.html#api-IscsiTargetExtent-iscsiTargetExtentGet
func (*TruenasHttpClient) ISCSITargetExtendPost ¶
func (c *TruenasHttpClient) ISCSITargetExtendPost(ctx context.Context, targetId int, extentId int) (*ISCSITargetExtend, error)
https://www.truenas.com/docs/api/rest.html#api-IscsiTargetextent-iscsiTargetextentPost
func (*TruenasHttpClient) ISCSITargetGet ¶
func (c *TruenasHttpClient) ISCSITargetGet(ctx context.Context, limit int) (*[]ISCSITarget, error)
https://www.truenas.com/docs/api/rest.html#api-IscsiTarget-iscsiTargetGet
func (*TruenasHttpClient) ISCSITargetPost ¶
func (c *TruenasHttpClient) ISCSITargetPost(ctx context.Context, name string, portalId int, initiatorId int) (*ISCSITarget, error)
https://www.truenas.com/docs/api/rest.html#api-IscsiTarget-iscsiTargetPost
func (*TruenasHttpClient) PoolDatasetGet ¶
func (c *TruenasHttpClient) PoolDatasetGet(ctx context.Context, limit int, offset int) (*[]PoolDataset, error)
https://www.truenas.com/docs/api/rest.html#api-PoolDataset-poolDatasetGet
func (*TruenasHttpClient) PoolDatasetIdIdDelete ¶
func (c *TruenasHttpClient) PoolDatasetIdIdDelete(ctx context.Context, id string, recursive bool, force bool) error
https://www.truenas.com/docs/api/rest.html#api-PoolDataset-poolDatasetIdIdDelete
func (*TruenasHttpClient) PoolDatasetIdIdGet ¶
func (c *TruenasHttpClient) PoolDatasetIdIdGet(ctx context.Context, id string) (*PoolDataset, error)
https://www.truenas.com/docs/api/rest.html#api-PoolDataset-poolDatasetIdIdGet
func (*TruenasHttpClient) PoolDatasetPost ¶
func (c *TruenasHttpClient) PoolDatasetPost(ctx context.Context, name string, volsize int64) (*PoolDataset, error)
https://www.truenas.com/docs/api/rest.html#api-PoolDataset-poolDatasetPost
func (*TruenasHttpClient) PoolDatasetPutComments ¶
func (c *TruenasHttpClient) PoolDatasetPutComments(ctx context.Context, id string, comments string) (*PoolDataset, error)
https://www.truenas.com/docs/api/rest.html#api-PoolDataset-poolDatasetPut
func (*TruenasHttpClient) PoolDatasetPutVolsize ¶
func (c *TruenasHttpClient) PoolDatasetPutVolsize(ctx context.Context, id string, volsize int64) (*PoolDataset, error)
https://www.truenas.com/docs/api/rest.html#api-PoolDataset-poolDatasetPut