truenas

package
v0.1.0-alpha.8 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ISCSIExtent

type ISCSIExtent struct {
	Id          int    `json:"id"`
	Name        string `json:"name"`
	Type        string `json:"type"`
	Disk        string `json:"disk"`
	InsecureTPC bool   `json:"insecure_tpc"`
}

type ISCSITarget

type ISCSITarget struct {
	Id     int                `json:"id"`
	Name   string             `json:"name"`
	Groups []ISCSITargetGroup `json:"groups"`
}

type ISCSITargetExtend

type ISCSITargetExtend struct {
	Id     int `json:"id"`
	Target int `json:"target"`
	Extent int `json:"extent"`
	LUNId  int `json:"lunid"`
}

type ISCSITargetGroup

type ISCSITargetGroup struct {
	PortalId    int `json:"portal"`
	InitiatorId int `json:"initiator"`
}

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 (b *TruenasBackend) CommentVolume(ctx context.Context, id string, comment string) error

func (*TruenasBackend) CreateVolume

func (b *TruenasBackend) CreateVolume(ctx context.Context, name string, size int64) (string, error)

func (*TruenasBackend) DeleteVolume

func (b *TruenasBackend) DeleteVolume(ctx context.Context, id string) error

func (*TruenasBackend) ExpandVolume

func (b *TruenasBackend) ExpandVolume(ctx context.Context, id string, size int64) error

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) 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

type TruenasSecrets

type TruenasSecrets struct {
	Url           string
	ApiKey        string
	TLSSkipVerify bool
	ParentDataset string
	ISCSI         backends.ISCSISecrets
}

Jump to

Keyboard shortcuts

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