Documentation ¶
Overview ¶
Package customer is responsible for constructing customer upload objects to handle deduplicated storage billing
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is used to handle managing customer objects
func NewManager ¶
func NewManager(um *models.UserManager, ipfs rtfs.Manager) *Manager
NewManager is used to instantiate our customer object manager
func (*Manager) GetDeduplicatedStorageSpaceInBytes ¶
GetDeduplicatedStorageSpaceInBytes is used to get the deduplicated storage space used by this particular hash. It calculates deduplicated storage costs based on previous uploads the user has made, and does not consider upload from other users. it is a read-only operation, and returns the storage space that will be used by this upload
type Object ¶
type Object struct { // UploadedRefs is a map used to check whether or not a particular link ref has been uploaded // the only time this value is populated is when an ipld objecct (say a folder) is uploaded, all // the links of the folder will fill this map UploadedRefs map[string]bool `json:"uploaded_nodes"` // UploadedRootNodes is a map used to check whether or not a particular entire root node has been uploaded. // each upload will always count as an uploaded root node however only ipld objects that contain links will also go to uploaded refs UploadedRootNodes map[string]bool `json:"uploaded_root_nodes"` }
Object represents a single customer
Click to show internal directories.
Click to hide internal directories.