package
19.10.0+incompatible
Repository: https://github.com/safescale-dev-team/safescale.git
Documentation: pkg.go.dev

# Functions

LoadGateway returns the metadata of the Gateway of a network.
LoadHost gets the host definition from Object Storage logic: Read by ID; if error is ErrNotFound then read by name; if error is ErrNotFound return this error In case of any other error, abort the retry to propagate the error If retry times out, return errNotFound.
LoadNetwork gets the Network definition from Object Storage logic: Read by ID; if error is ErrNotFound then read by name; if error is ErrNotFound return this error In case of any other error, abort the retry to propagate the error If retry times out, return errNotFound.
LoadShare returns the name of the host owing the share 'ref', read from Object Storage logic: Read by ID; if error is ErrNotFound then read by name; if error is ErrNotFound return this error In case of any other error, abort the retry to propagate the error If retry times out, return errNotFound.
LoadVolume gets the Volume definition from Object Storage logic: Read by ID; if error is ErrNotFound then read by name; if error is ErrNotFound return this error In case of any other error, abort the retry to propagate the error If retry times out, return errNotFound.
NewGateway creates an instance of metadata.Gateway.
NewHost creates an instance of api.Host.
NewNetwork creates an instance of network.Metadata.
NewShare creates an instance of metadata.Nas.
NewVolume creates an instance of metadata.Volume.
RemoveHost removes the host definition from Object Storage.
RemoveNetwork removes the Network definition from Object Storage.
RemoveShare removes the share definition from Object Storage.
RemoveVolume removes the Volume definition from Object Storage.
SaveGateway saves the metadata of a gateway.
SaveHost saves the Host definition in Object Storage.
SaveNetwork saves the Network definition in Object Storage.
SaveShare saves the Nas definition in Object Storage.
SaveVolume saves the Volume definition in Object Storage.

# Constants

BucketNamePrefix is the beginning of the name of the bucket for Metadata.
ByIDFolderName tells in what folder to put 'byID' information.
ByNameFolderName tells in what folder to store 'byName' information.

# Structs

Gateway links Object Storage folder and Network.
Host links Object Storage folder and Network.
Network links Object Storage folder and Network.
Share contains information to maintain in Object Storage a list of shared folders.
Volume links Object Storage folder and Volumes.