v2

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2016 License: Apache-2.0 Imports: 9 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// PPersonaIDTypeUnknown is used to get adddress of the constant.
	PPersonaTypeUnknown = PersonaTypeUnknown

	// PPersonaTypeUser is used to get adddress of the constant.
	PPersonaTypeUser = PersonaTypeUser

	// PPersonaTypeGroup is used to get adddress of the constant.
	PPersonaTypeGroup = PersonaTypeGroup

	// PPersonaTypeWellKnown is used to get adddress of the constant.
	PPersonaTypeWellKnown = PersonaTypeWellKnown
)

Functions

func ExportCreate

func ExportCreate(
	ctx context.Context,
	client api.Client,
	export *Export) (int, error)

ExportCreate POSTs an Export object to the Isilon server.

func ExportDelete

func ExportDelete(
	ctx context.Context,
	client api.Client,
	id int) error

ExportDelete DELETEs an Export object on the Isilon server.

func ExportUpdate

func ExportUpdate(
	ctx context.Context,
	client api.Client,
	export *Export) error

ExportUpdate PUTs an Export object to the Isilon server.

func SetExportClients

func SetExportClients(
	ctx context.Context,
	client api.Client,
	id int,
	addrs ...string) error

SetExportClients sets an Export's clients property.

func SetExportRootClients

func SetExportRootClients(
	ctx context.Context,
	client api.Client,
	id int,
	addrs ...string) error

SetExportRootClients sets an Export's root_clients property.

func Unexport

func Unexport(
	ctx context.Context,
	client api.Client,
	id int) error

Unexport is an alias for ExportDelete.

Types

type Export

type Export struct {
	ID          int          `json:"-"`
	Paths       *[]string    `json:"paths,omitempty"`
	Clients     *[]string    `json:"clients,omitempty"`
	RootClients *[]string    `json:"root_clients,omitempty"`
	MapAll      *UserMapping `json:"map_all,omitempty"`
	MapNonRoot  *UserMapping `json:"map_non_root,omitempty"`
	MapRoot     *UserMapping `json:"map_root,omitempty"`
}

Export is an Isilon Export.

func ExportInspect

func ExportInspect(
	ctx context.Context,
	client api.Client,
	id int) (*Export, error)

ExportInspect GETs an export.

func ExportsList

func ExportsList(
	ctx context.Context,
	client api.Client) ([]*Export, error)

ExportList GETs all exports.

func (*Export) UnmarshalJSON

func (e *Export) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals a Export from JSON.

type ExportList

type ExportList []*Export

ExportList is a list of Isilon Exports.

func (ExportList) MarshalJSON

func (l ExportList) MarshalJSON() ([]byte, error)

MarshalJSON marshals an ExportList to JSON.

func (*ExportList) UnmarshalJSON

func (l *ExportList) UnmarshalJSON(text []byte) error

UnmarshalJSON unmarshals an ExportList from JSON.

type Persona

type Persona struct {
	ID   *PersonaID   `json:"id,omitempty"`
	Type *PersonaType `json:"type,omitempty"`
	Name *string      `json:"name,omitempty"`
}

Persona maps to the ISI <persona> type.

func (*Persona) MarshalJSON

func (p *Persona) MarshalJSON() ([]byte, error)

MarshalJSON marshals a Persona to JSON.

func (*Persona) UnmarshalJSON

func (p *Persona) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals a Persona from JSON.

type PersonaID

type PersonaID struct {
	ID   string
	Type PersonaIDType
}

PersonaID maps to the ISI <persona-id> type.

func (*PersonaID) MarshalJSON

func (p *PersonaID) MarshalJSON() ([]byte, error)

MarshalJSON marshals a PersonaID to JSON.

func (*PersonaID) UnmarshalJSON

func (p *PersonaID) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals a PersonaID from JSON.

type PersonaIDType

type PersonaIDType uint8

PersonaIDType is a valid Persona ID type.

const (
	// PersonaIDTypeUnknown is an unknown PersonaID type.
	PersonaIDTypeUnknown PersonaIDType = iota

	// PersonaIDTypeUser is a PersonaID user type.
	PersonaIDTypeUser

	// PersonaIDTypeGroup is a PersonaID group type.
	PersonaIDTypeGroup

	// PersonaIDTypeSID is a PersonaID SID type.
	PersonaIDTypeSID

	// PersonaIDTypeUID is a PersonaID UID type.
	PersonaIDTypeUID

	// PersonaIDTypeGID is a PersonaID GID type.
	PersonaIDTypeGID
)

func ParsePersonaIDType

func ParsePersonaIDType(text string) PersonaIDType

ParsePersonaIDType parses a PersonaIDType from a string.

func (PersonaIDType) MarshalJSON

func (p PersonaIDType) MarshalJSON() ([]byte, error)

MarshalJSON marshals a PersonaIDType value to JSON.

func (PersonaIDType) String

func (p PersonaIDType) String() string

String returns the string representation of a PersonaIDType value.

func (*PersonaIDType) UnmarshalJSON

func (p *PersonaIDType) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals a PersonaIDType value from JSON.

type PersonaType

type PersonaType uint8

PersonaType is a valid Persona type.

const (
	// PersonaTypeUnknown is an unknown Persona type.
	PersonaTypeUnknown PersonaType = iota

	// PersonaIDTypeUser is a Persona user type.
	PersonaTypeUser

	// PersonaTypeGroup is a Persona group type.
	PersonaTypeGroup

	// PersonaTypeWellKnown is a Persona wellknown type.
	PersonaTypeWellKnown
)

func ParsePersonaType

func ParsePersonaType(text string) PersonaType

ParsePersonaType parses a PersonaType from a string.

func (PersonaType) MarshalJSON

func (p PersonaType) MarshalJSON() ([]byte, error)

MarshalJSON marshals a PersonaType value to JSON.

func (PersonaType) String

func (p PersonaType) String() string

String returns the string representation of a PersonaType value.

func (*PersonaType) UnmarshalJSON

func (p *PersonaType) UnmarshalJSON(data []byte) error

UnmarshalJSON marshals a PersonaType value from JSON.

type UserMapping

type UserMapping struct {
	Enabled        *bool      `json:"enabled,omitempty"`
	User           *Persona   `json:"user,omitempty"`
	PrimaryGroup   *Persona   `json:"primary_group,omitempty"`
	SecondaryGroup []*Persona `json:"secondary_group,omitempty"`
}

UserMapping maps to the ISI <user-mapping> type.

func (*UserMapping) UnmarshalJSON

func (um *UserMapping) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals a UserMapping from JSON.

Jump to

Keyboard shortcuts

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