Documentation ¶
Index ¶
- type CteraClient
- func (c *CteraClient) AddTrustedNfsClient(shareName, address, netmask string, perm ctera.FileAccessMode) error
- func (c *CteraClient) Authenticate(ctx context.Context, username, password string) error
- func (c *CteraClient) ConnectToPortal(portalAddress, portalUser, portalPassword string, trust bool) (bool, error)
- func (c *CteraClient) CreateShare(name, path string, uuid *string, ...) (*ctera.Share, error)
- func (c *CteraClient) DeleteShareSafe(name string) error
- func (c *CteraClient) EnableCache() (bool, error)
- func (c *CteraClient) GetNfsConfiguration() (*ctera.NfsConfiguration, error)
- func (c *CteraClient) GetShareSafe(name string) (*ctera.Share, error)
- func (c *CteraClient) InitializeFiler(ctx context.Context, username, password string) (bool, error)
- func (c *CteraClient) RefreshFolders() error
- func (c *CteraClient) RemoveTrustedNfsClient(shareName, address, netmask string) error
- func (c *CteraClient) SetLinuxAvoidUsingFanotify(newValue bool) (bool, error)
- func (c *CteraClient) SetNfsConfiguration(configuration *ctera.NfsConfiguration) error
- func (c *CteraClient) UnsuspendSync() (bool, error)
- type Error
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CteraClient ¶
type CteraClient struct {
// contains filtered or unexported fields
}
CteraClient wrapper on top the actual ctera-openapi
func GetAuthenticatedCteraClient ¶
func GetAuthenticatedCteraClient(ctx context.Context, logger Logger, filerAddress, username, password string) (*CteraClient, error)
GetAuthenticatedCteraClient Create a CteraClient object and login to the filer with the provided credentials
func NewCteraClient ¶
func NewCteraClient(logger Logger, filerAddress string) (*CteraClient, error)
NewCteraClient Get an unauthenticated CteraClient object
func (*CteraClient) AddTrustedNfsClient ¶
func (c *CteraClient) AddTrustedNfsClient(shareName, address, netmask string, perm ctera.FileAccessMode) error
AddTrustedNfsClient adds a trusted NFS client definition to the share
func (*CteraClient) Authenticate ¶
func (c *CteraClient) Authenticate(ctx context.Context, username, password string) error
Authenticate login to the filer with the provided credentials
func (*CteraClient) ConnectToPortal ¶
func (c *CteraClient) ConnectToPortal(portalAddress, portalUser, portalPassword string, trust bool) (bool, error)
func (*CteraClient) CreateShare ¶
func (c *CteraClient) CreateShare(name, path string, uuid *string, trustedNfsClients []ctera.NFSv3AccessControlEntry) (*ctera.Share, error)
CreateShare creates a share with the provided name and path and exports it to NFS
func (*CteraClient) DeleteShareSafe ¶
func (c *CteraClient) DeleteShareSafe(name string) error
DeleteShareSafe deletes the share. Does not return an error if the share does not exists
func (*CteraClient) EnableCache ¶
func (c *CteraClient) EnableCache() (bool, error)
func (*CteraClient) GetNfsConfiguration ¶
func (c *CteraClient) GetNfsConfiguration() (*ctera.NfsConfiguration, error)
func (*CteraClient) GetShareSafe ¶
func (c *CteraClient) GetShareSafe(name string) (*ctera.Share, error)
GetShareSafe returns the share by name. If the share does not exist returns nil without an error
func (*CteraClient) InitializeFiler ¶
func (*CteraClient) RefreshFolders ¶
func (c *CteraClient) RefreshFolders() error
func (*CteraClient) RemoveTrustedNfsClient ¶
func (c *CteraClient) RemoveTrustedNfsClient(shareName, address, netmask string) error
RemoveTrustedNfsClient removes the trusted NFS client definition from the share
func (*CteraClient) SetLinuxAvoidUsingFanotify ¶
func (c *CteraClient) SetLinuxAvoidUsingFanotify(newValue bool) (bool, error)
func (*CteraClient) SetNfsConfiguration ¶
func (c *CteraClient) SetNfsConfiguration(configuration *ctera.NfsConfiguration) error
func (*CteraClient) UnsuspendSync ¶
func (c *CteraClient) UnsuspendSync() (bool, error)