Documentation ¶
Overview ¶
Copyright (c) 2022 Dell Inc, or its subsidiaries.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) 2022 Dell Inc, or its subsidiaries.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) 2022 Dell Inc, or its subsidiaries.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) 2022 Dell Inc, or its subsidiaries.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) 2022 Dell Inc, or its subsidiaries.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func ACLUpdate(ctx context.Context, client api.Client, path string, acl *ACL) error
- func ContainerChildDelete(ctx context.Context, client api.Client, childPath string, recursive bool) error
- func ContainerChildrenGetQuery(ctx context.Context, client api.Client, containerPath string, ...) (<-chan *ContainerChild, <-chan error)
- func ContainerChildrenMapAll(ctx context.Context, client api.Client, containerPath string) (map[string]*ContainerChild, error)
- func ContainerCreateDir(ctx context.Context, client api.Client, containerPath, dirName string, ...) error
- func ContainerCreateFile(ctx context.Context, client api.Client, containerPath, fileName string, ...) error
- func ExportCreate(ctx context.Context, client api.Client, export *Export) (int, error)
- func ExportCreateWithZone(ctx context.Context, client api.Client, export *Export, zone string) (int, error)
- func ExportDelete(ctx context.Context, client api.Client, id int) error
- func ExportDeleteWithZone(ctx context.Context, client api.Client, id int, zone string) error
- func ExportUpdate(ctx context.Context, client api.Client, export *Export) error
- func ExportUpdateWithZone(ctx context.Context, client api.Client, export *Export, zone string, ...) error
- func GetAbsoluteSnapshotPath(c api.Client, snapshotName, volumeName string) string
- func SetExportClients(ctx context.Context, client api.Client, id int, addrs ...string) error
- func SetExportRootClients(ctx context.Context, client api.Client, id int, addrs ...string) error
- func Unexport(ctx context.Context, client api.Client, id int) error
- func UnexportWithZone(ctx context.Context, client api.Client, id int, zone string) error
- type ACL
- type ActionType
- type AuthoritativeType
- type ContainerChild
- type ContainerChildList
- type ContainerQuery
- type ContainerQueryScope
- type ContainerQueryScopeCondition
- type Export
- func ExportInspect(ctx context.Context, client api.Client, id int) (*Export, error)
- func ExportsList(ctx context.Context, client api.Client) ([]*Export, error)
- func ExportsListWithZone(ctx context.Context, client api.Client, zone string) ([]*Export, error)
- func GetExportByIDWithZone(ctx context.Context, client api.Client, id int, zone string) (*Export, error)
- func GetExportWithPath(ctx context.Context, client api.Client, path string) (*Export, error)
- func GetExportWithPathAndZone(ctx context.Context, client api.Client, path, zone string) (*Export, error)
- type ExportList
- type Exports
- func ExportsListWithLimit(ctx context.Context, client api.Client, limit string) (*Exports, error)
- func ExportsListWithParams(ctx context.Context, client api.Client, params api.OrderedValues) (*Exports, error)
- func ExportsListWithResume(ctx context.Context, client api.Client, resume string) (*Exports, error)
- type FileMode
- type Persona
- type PersonaID
- type PersonaIDType
- type PersonaType
- type UserMapping
Constants ¶
const ( ActionTypeUnknownStr = "unknown" ActionTypeReplaceStr = "replace" ActionTypeUpdateStr = "update" )
Variables ¶
var ( // PAuthoritativeTypeACL is used to grab a pointer to a const. PAuthoritativeTypeACL = AuthoritativeTypeACL // PAuthoritativeTypeMode is used to grab a pointer to a const. PAuthoritativeTypeMode = AuthoritativeTypeMode )
var ( // PActionTypeReplace is used to grab a pointer to a const. PActionTypeReplace = ActionTypeReplace // PActionTypeUpdate is used to grab a pointer to a const. PActionTypeUpdate = ActionTypeUpdate )
var ( // PPersonaTypeUnknown 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 )
var ActionTypesToStrs = [ActionTypeCount]string{ ActionTypeUnknownStr, ActionTypeReplaceStr, ActionTypeUpdateStr, }
Functions ¶
func ContainerChildDelete ¶
func ContainerChildDelete( ctx context.Context, client api.Client, childPath string, recursive bool, ) error
ContainerChildDelete deletes a child of a container.
func ContainerChildrenGetQuery ¶
func ContainerChildrenGetQuery( ctx context.Context, client api.Client, containerPath string, limit, maxDepth int, objectType, sortDir string, sort, detail []string, ) (<-chan *ContainerChild, <-chan error)
ContainerChildrenGetQuery queries a container for children regardless of ACLs preventing traversal.
func ContainerChildrenMapAll ¶
func ContainerChildrenMapAll( ctx context.Context, client api.Client, containerPath string, ) (map[string]*ContainerChild, error)
ContainerChildrenMapAll GETs all descendent children of a container and returns a map with the children's paths as the key.
func ContainerCreateDir ¶
func ContainerCreateDir( ctx context.Context, client api.Client, containerPath, dirName string, fileMode FileMode, overwrite, recursive bool, ) error
ContainerCreateDir creates a directory as a child object of a container.
func ContainerCreateFile ¶
func ContainerCreateFile( ctx context.Context, client api.Client, containerPath, fileName string, fileSize int, fileMode FileMode, fileHndl io.ReadCloser, overwrite bool, ) error
ContainerCreateFile creates a file as a child object of a container.
func ExportCreate ¶
ExportCreate POSTs an Export object to the Isilon server.
func ExportCreateWithZone ¶
func ExportCreateWithZone( ctx context.Context, client api.Client, export *Export, zone string, ) (int, error)
ExportCreateWithZone POSTs an Export object with zone to the Isilon server.
func ExportDelete ¶
ExportDelete DELETEs an Export object on the Isilon server.
func ExportDeleteWithZone ¶
ExportDeleteWithZone DELETEs an Export object in the specified zone on the Isilon server.
func ExportUpdate ¶
ExportUpdate PUTs an Export object to the Isilon server.
func ExportUpdateWithZone ¶
func ExportUpdateWithZone( ctx context.Context, client api.Client, export *Export, zone string, ignoreUnresolvableHosts bool, ) error
ExportUpdateWithZone PUTs an Export object in a specified zone to the Isilon server.
func GetAbsoluteSnapshotPath ¶
GetAbsoluteSnapshotPath get the absolute path of a snapshot
func SetExportClients ¶
SetExportClients sets an Export's clients property.
func SetExportRootClients ¶
SetExportRootClients sets an Export's root_clients property.
Types ¶
type ACL ¶
type ACL struct { Authoritative *AuthoritativeType `json:"authoritative,omitempty"` Action *ActionType `json:"action,omitempty"` Owner *Persona `json:"owner,omitempty"` Group *Persona `json:"group,omitempty"` Mode *FileMode `json:"mode,omitempty"` }
ACL is an Isilon Access Control List used for managing an object's security.
type ActionType ¶
type ActionType uint8
ActionType is a possible value used with an ACL's Action field.
const ( // ActionTypeUnknown is an unknown ActionType. ActionTypeUnknown ActionType = iota // ActionTypeReplace sets an ACL's Action field to "replace". ActionTypeReplace // ActionTypeUpdate sets an ACL's Action field to "update". ActionTypeUpdate ActionTypeCount )
func ParseActionType ¶
func ParseActionType(text string) ActionType
ParseActionType parses an ActionType from a string.
func (ActionType) MarshalJSON ¶
func (p ActionType) MarshalJSON() ([]byte, error)
MarshalJSON marshals an ActionType value to JSON.
func (ActionType) String ¶
func (p ActionType) String() string
String returns the string representation of an ActionType value.
func (*ActionType) UnmarshalJSON ¶
func (p *ActionType) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals an ActionType value from JSON.
type AuthoritativeType ¶
type AuthoritativeType uint8
AuthoritativeType is a possible value used with an ACL's Authoritative field.
const ( // AuthoritativeTypeUnknown is an unknown AuthoritativeType. AuthoritativeTypeUnknown AuthoritativeType = iota // AuthoritativeTypeACL sets an ACL's Authoritative field to "acl". AuthoritativeTypeACL // AuthoritativeTypeMode sets an ACL's Authoritative field to "mode". AuthoritativeTypeMode )
func ParseAuthoritativeType ¶
func ParseAuthoritativeType(text string) AuthoritativeType
ParseAuthoritativeType parses an AuthoritativeType from a string.
func (AuthoritativeType) MarshalJSON ¶
func (p AuthoritativeType) MarshalJSON() ([]byte, error)
MarshalJSON marshals an AuthoritativeType value to JSON.
func (AuthoritativeType) String ¶
func (p AuthoritativeType) String() string
String returns the string representation of an AuthoritativeType value.
func (*AuthoritativeType) UnmarshalJSON ¶
func (p *AuthoritativeType) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals an AuthoritativeType value from JSON.
type ContainerChild ¶
type ContainerChild struct { Name *string `json:"name,omitempty"` Path *string `json:"container_path,omitempty"` Type *string `json:"type,omitempty"` Owner *string `json:"owner,omitempty"` Group *string `json:"group,omitempty"` Mode *FileMode `json:"mode,omitempty"` Size *int `json:"size,omitempty"` }
ContainerChild is a child object of a container.
func ContainerChildrenGetAll ¶
func ContainerChildrenGetAll( ctx context.Context, client api.Client, containerPath string, ) ([]*ContainerChild, error)
ContainerChildrenGetAll GETs all descendent children of a container.
func ContainerChildrenPostQuery ¶
func ContainerChildrenPostQuery( ctx context.Context, client api.Client, containerPath string, limit, maxDepth int, query *ContainerQuery, ) ([]*ContainerChild, error)
ContainerChildrenPostQuery queries a container for children with additional traversal options and matching capabilities, but is subject to ACLs that may prevent traversal.
type ContainerChildList ¶
type ContainerChildList []*ContainerChild
ContainerChildList is a list of a container's children.
func (ContainerChildList) MarshalJSON ¶
func (l ContainerChildList) MarshalJSON() ([]byte, error)
MarshalJSON marshals a ContainerChildList to JSON.
func (*ContainerChildList) UnmarshalJSON ¶
func (l *ContainerChildList) UnmarshalJSON(text []byte) error
UnmarshalJSON unmarshals a ContainerChildList from JSON.
type ContainerQuery ¶
type ContainerQuery struct { Result []string `json:"result,omitempty"` Scope *ContainerQueryScope `json:"scope,omitempty"` }
ContainerQuery is used to query a container.
type ContainerQueryScope ¶
type ContainerQueryScope struct { Logic string `json:"logic,omitempty"` Conditions []interface{} `json:"conditions,omitempty"` }
ContainerQueryScope is the query's scope.
type ContainerQueryScopeCondition ¶
type ContainerQueryScopeCondition struct { Operator string `json:"operator,omitempty"` Attr string `json:"attr,omitempty"` Value string `json:"value,omitempty"` }
ContainerQueryScopeCondition is the query's condition.
type Export ¶
type Export struct { ID int `json:"id,omitmarshal"` Paths *[]string `json:"paths,omitempty"` Clients *[]string `json:"clients,omitempty"` RootClients *[]string `json:"root_clients,omitempty"` ReadWriteClients *[]string `json:"read_write_clients,omitempty"` ReadOnlyClients *[]string `json:"read_only_clients,omitempty"` MapAll *UserMapping `json:"map_all,omitempty"` MapRoot *UserMapping `json:"map_root,omitempty"` MapNonRoot *UserMapping `json:"map_non_root,omitempty"` MapFailure *UserMapping `json:"map_failure,omitempty"` Description string `json:"description,omitempty"` Zone string `json:"zone,omitempty"` }
Export is an Isilon Export.
func ExportInspect ¶
ExportInspect GETs an export.
func ExportsList ¶
ExportsList GETs all exports.
func ExportsListWithZone ¶
ExportsListWithZone GETs all exports in the specified zone.
func GetExportByIDWithZone ¶
func GetExportByIDWithZone( ctx context.Context, client api.Client, id int, zone string, ) (*Export, error)
GetExportByIDWithZone get the export by export id and access zone
func GetExportWithPath ¶
GetExportWithPath GETs an export with the specified target path
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 Exports ¶
type Exports struct { Digest string `json:"digest,omitempty"` Exports []*Export `json:"exports,omitempty"` Resume string `json:"resume,omitempty"` Total int `json:"total,omitempty"` }
Exports is the whole struct of return JSON from the exports REST API
func ExportsListWithLimit ¶
func ExportsListWithLimit( ctx context.Context, client api.Client, limit string, ) (*Exports, error)
ExportsListWithLimit GETs a number of exports in the default sequence and the number is the parameter limit.
func ExportsListWithParams ¶
func ExportsListWithParams( ctx context.Context, client api.Client, params api.OrderedValues, ) (*Exports, error)
ExportsListWithParams GETs exports based on the parmapeters.
type FileMode ¶
FileMode is an alias for the Go os.FileMode.
func ParseFileMode ¶
ParseFileMode parses a string and returns a FileMode.
func (FileMode) MarshalText ¶
MarshalText marshals a FileMode value to text.
func (*FileMode) UnmarshalText ¶
UnmarshalText unmarshals a FileMode value from text.
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 ¶
MarshalJSON marshals a Persona to JSON.
func (*Persona) UnmarshalJSON ¶
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 ¶
MarshalJSON marshals a PersonaID to JSON.
func (*PersonaID) UnmarshalJSON ¶
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 // PersonaTypeUser 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.