Help us shape the future of Go! Take the 2026 Go Developer Survey

gounity

package module
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: Apache-2.0 Imports: 14 Imported by: 1

README

gounity

A portable Go library for unity related operations such as create-volume, list-volume, etc.__

[TBD]

Documentation

Overview

Copyright (c) 2019 Dell EMC Corporation All Rights Reserved

Copyright (c) 2019 Dell EMC Corporation All Rights Reserved

Copyright (c) 2019 Dell EMC Corporation All Rights Reserved

Copyright (c) 2019 Dell EMC Corporation All Rights Reserved

Copyright (c) 2019 Dell EMC Corporation All Rights Reserved

Index

Constants

View Source
const (
	ReadOnlyAccessType      = AccessType("READ_ONLY")
	ReadWriteAccessType     = AccessType("READ_WRITE")
	ReadOnlyRootAccessType  = AccessType("READ_ONLY_ROOT")
	ReadWriteRootAccessType = AccessType("READ_WRITE_ROOT")
)
View Source
const (
	NoneDefaultAccess          = NFSShareDefaultAccess("0")
	ReadOnlyDefaultAccess      = NFSShareDefaultAccess("1")
	ReadWriteDefaultAccess     = NFSShareDefaultAccess("2")
	ReadOnlyRootDefaultAccess  = NFSShareDefaultAccess("3")
	ReadWriteRootDefaultAccess = NFSShareDefaultAccess("4")
)
View Source
const (
	FsNameMaxLength = 63
)

Variables

View Source
var (
	HostNotFoundError          = errors.New("unable to find host")
	MultipleHostFoundError     = errors.New("Found multiple hosts with same name. Delete the duplicate entries on the array")
	MultipleHostFoundErrorCode = "0x7d13158"
)
View Source
var FilesystemNotFoundError = errors.New("Unable to find filesystem")
View Source
var VolumeNotFoundError = errors.New("Unable to find volume")

Functions

func NewFilesystem added in v1.1.0

func NewFilesystem(client *Client) *filesystem

func NewHost

func NewHost(client *Client) *host

func NewIpInterface added in v1.1.0

func NewIpInterface(client *Client) *ipinterface

func NewSnapshot

func NewSnapshot(client *Client) *snapshot

func NewStoragePool

func NewStoragePool(client *Client) *storagepool

func NewVolume

func NewVolume(client *Client) *volume

Types

type AccessType added in v1.2.0

type AccessType string

type Client

type Client struct {
	// contains filtered or unexported fields
}

Struct holds the configuration & REST Client.

func NewClient

func NewClient(ctx context.Context) (client *Client, err error)

NewClient initialize the new REST Client with default options.

func NewClientWithArgs

func NewClientWithArgs(ctx context.Context, endpoint string, insecure bool) (client *Client, err error)

NewClientWithArgs initialize the new REST Client with the given arguments.

func (*Client) Authenticate

func (c *Client) Authenticate(ctx context.Context, configConnect *ConfigConnect) error

Authenticate make a REST API call [/loginSessionInfo] to Unity to get authenticate the given credentials. The response contains the EMC-CSRF-TOKEN and the client caches it for further communication.

func (*Client) GetToken

func (c *Client) GetToken() string

func (*Client) SetToken

func (c *Client) SetToken(token string)

type ConfigConnect

type ConfigConnect struct {
	Endpoint string
	Username string
	Password string
}

Struct holds the endpoint & credential info.

type LicenseType added in v1.1.0

type LicenseType string
const (
	LunNameMaxLength             = 63
	ThinProvisioning LicenseType = "THIN_PROVISIONING"
	DataReduction    LicenseType = "DATA_REDUCTION"
)

type NFSShareDefaultAccess added in v1.2.0

type NFSShareDefaultAccess string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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