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

gounity

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: Apache-2.0 Imports: 16 Imported by: 1

README

gounity

GO library for Dell EMC Unity

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

Index

Constants

View Source
const (
	LunNameMaxLength = 63
)

Variables

View Source
var HostNotFoundError = errors.New("unable to find host")
View Source
var NotFoundError = errors.New("Unable to find volume")

Functions

func NewHost

func NewHost(client *Client) *host

func NewSnapshot

func NewSnapshot(client *Client) *snapshot

func NewStoragePool

func NewStoragePool(client *Client) *storagepool

func NewVolume

func NewVolume(client *Client) *volume

func SetLogger

func SetLogger(l *logrus.Logger)

Types

type Client

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

Struct holds the configuration & REST Client.

func NewClient

func NewClient() (client *Client, err error)

NewClient initialize the new REST Client with default options.

func NewClientWithArgs

func NewClientWithArgs(endpoint string, insecure, useCerts bool) (client *Client, err error)

NewClientWithArgs initialize the new REST Client with the given arguments.

func (*Client) Authenticate

func (c *Client) Authenticate(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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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